summaryrefslogtreecommitdiffstats
path: root/tests/test-slack-attachments.json
diff options
context:
space:
mode:
authorAndy Lo-A-Foe <andy.loafoe@aemian.com>2016-04-06 14:23:26 +0200
committerChristopher Speller <crspeller@gmail.com>2016-04-06 08:23:26 -0400
commit1a1fd39cf8e42c143fe9057b50aad5e074b91947 (patch)
treea610b5f411f3c4a0efd713e13e6fce935ceb7afc /tests/test-slack-attachments.json
parent1954c449931344baca04b126c86b00f95677a570 (diff)
downloadchat-1a1fd39cf8e42c143fe9057b50aad5e074b91947.tar.gz
chat-1a1fd39cf8e42c143fe9057b50aad5e074b91947.tar.bz2
chat-1a1fd39cf8e42c143fe9057b50aad5e074b91947.zip
PLT-2525: Render attachment fields similar to Slack
* Render attachment fields similar to Slack * Add /loadtest json url command This allows us to easily create test posts with more props like Slack attachments
Diffstat (limited to 'tests/test-slack-attachments.json')
-rw-r--r--tests/test-slack-attachments.json56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/test-slack-attachments.json b/tests/test-slack-attachments.json
new file mode 100644
index 000000000..1c499b4ca
--- /dev/null
+++ b/tests/test-slack-attachments.json
@@ -0,0 +1,56 @@
+{
+ "message": "Hello world",
+ "props": {
+ "attachments": [
+ {
+ "color": "#7CD197",
+ "fields": [
+ {
+ "short": false,
+ "title": "Area",
+ "value": "Testing with a very long piece of text that will take up the whole width of the table. This is one more sentence to really make it a long field."
+ },
+ {
+ "short": true,
+ "title": "Iteration",
+ "value": "Testing"
+ },
+ {
+ "short": true,
+ "title": "State",
+ "value": "New"
+ },
+ {
+ "short": false,
+ "title": "Reason",
+ "value": "New defect reported"
+ },
+ {
+ "short": false,
+ "title": "Random field",
+ "value": "This is a field which is not marked as short so it should be rendered on a separate row"
+ },
+ {
+ "short": true,
+ "title": "Short 1",
+ "value": "Short field"
+ },
+ {
+ "short": true,
+ "title": "Short 2",
+ "value": "Another one"
+ }
+ ],
+ "mrkdwn_in": [
+ "pretext"
+ ],
+ "pretext": "Some text here",
+ "text": "This is the text of the attachment. It should appear just above the image",
+ "thumb_url": "https://slack.global.ssl.fastly.net/7bf4/img/services/jenkins-ci_128.png",
+ "title": "A slack attachment",
+ "title_link": "https://www.google.com"
+ }
+ ]
+ },
+ "type": "slack_attachment"
+}