diff --git a/json-logs/samples/api/chat.postMessage.json b/json-logs/samples/api/chat.postMessage.json index e966f1c0a..2e2b93302 100644 --- a/json-logs/samples/api/chat.postMessage.json +++ b/json-logs/samples/api/chat.postMessage.json @@ -54,9 +54,46 @@ "blocks": [ { "type": "", + "block_id": "", "elements": [ { "type": "", + "elements": [ + { + "type": "", + "text": "" + }, + { + "type": "", + "elements": [ + { + "type": "", + "range": "", + "text": "", + "style": { + "bold": false, + "italic": false, + "strike": false, + "code": false + }, + "channel_id": "", + "value": "", + "timestamp": "", + "url": "", + "team_id": "", + "user_id": "", + "usergroup_id": "", + "name": "", + "skin_tone": 12345, + "unicode": "" + } + ], + "style": "", + "indent": 12345, + "offset": 12345, + "border": 12345 + } + ], "text": { "type": "", "text": "", @@ -199,6 +236,166 @@ "initial_users": [ "" ], + "indent": 12345, + "offset": 12345, + "border": 12345 + }, + { + "type": "", + "text": { + "type": "", + "text": "", + "emoji": false + }, + "action_id": "", + "url": "", + "value": "", + "style": "", + "confirm": { + "title": { + "type": "", + "text": "", + "emoji": false + }, + "text": { + "type": "", + "text": "", + "emoji": false + }, + "confirm": { + "type": "", + "text": "", + "emoji": false + }, + "deny": { + "type": "", + "text": "", + "emoji": false + }, + "style": "" + }, + "accessibility_label": "", + "options": [ + { + "text": { + "type": "", + "text": "", + "emoji": false + }, + "value": "", + "description": { + "type": "", + "text": "", + "emoji": false + }, + "url": "" + } + ], + "initial_options": [ + { + "text": { + "type": "", + "text": "", + "emoji": false + }, + "value": "", + "description": { + "type": "", + "text": "", + "emoji": false + }, + "url": "" + } + ], + "focus_on_load": false, + "initial_option": { + "text": { + "type": "", + "text": "", + "emoji": false + }, + "value": "", + "description": { + "type": "", + "text": "", + "emoji": false + }, + "url": "" + }, + "placeholder": { + "type": "", + "text": "", + "emoji": false + }, + "initial_channel": "", + "response_url_enabled": false, + "initial_channels": [ + "" + ], + "max_selected_items": 12345, + "initial_conversation": "", + "default_to_current_conversation": false, + "filter": { + "include": [ + "" + ], + "exclude_external_shared_channels": false, + "exclude_bot_users": false + }, + "initial_conversations": [ + "" + ], + "initial_date": "", + "initial_time": "", + "timezone": "", + "min_query_length": 12345, + "image_url": "", + "alt_text": "", + "fallback": "", + "image_width": 12345, + "image_height": 12345, + "image_bytes": 12345, + "option_groups": [ + { + "label": { + "type": "", + "text": "", + "emoji": false + }, + "options": [ + { + "text": { + "type": "", + "text": "", + "emoji": false + }, + "value": "", + "description": { + "type": "", + "text": "", + "emoji": false + }, + "url": "" + } + ] + } + ], + "initial_user": "", + "initial_users": [ + "" + ] + }, + { + "type": "", + "image_url": "", + "alt_text": "", + "fallback": "", + "image_width": 12345, + "image_height": 12345, + "image_bytes": 12345 + }, + { + "type": "", "elements": [ { "type": "", @@ -231,12 +428,12 @@ "border": 12345 } ], + "style": "", "indent": 12345, "offset": 12345, "border": 12345 } ], - "block_id": "", "call_id": "", "api_decoration_available": false, "call": { @@ -1135,42 +1332,7 @@ "initial_user": "", "initial_users": [ "" - ], - "elements": [ - { - "type": "", - "elements": [ - { - "type": "", - "range": "", - "text": "", - "style": { - "bold": false, - "italic": false, - "strike": false, - "code": false - }, - "channel_id": "", - "value": "", - "timestamp": "", - "url": "", - "team_id": "", - "user_id": "", - "usergroup_id": "", - "name": "", - "skin_tone": 12345, - "unicode": "" - } - ], - "style": "", - "indent": 12345, - "offset": 12345, - "border": 12345 - } - ], - "indent": 12345, - "offset": 12345, - "border": 12345 + ] }, { "type": "", diff --git a/slack-api-client/src/test/java/test_with_remote_apis/methods/files_Test.java b/slack-api-client/src/test/java/test_with_remote_apis/methods/files_Test.java index 8d3bf80ff..e945eeaeb 100644 --- a/slack-api-client/src/test/java/test_with_remote_apis/methods/files_Test.java +++ b/slack-api-client/src/test/java/test_with_remote_apis/methods/files_Test.java @@ -283,7 +283,7 @@ public void createLongTextFile() throws IOException, SlackApiException { } @Test - public void createLongTextFile_v2() throws IOException, SlackApiException { + public void createLongTextFile_v2() throws Exception { File file = new File("src/test/resources/sample_long.txt"); com.slack.api.model.File fileObj; { @@ -295,7 +295,10 @@ public void createLongTextFile_v2() throws IOException, SlackApiException { .title("file title")); assertThat(response.getError(), is(nullValue())); assertThat(response.isOk(), is(true)); - fileObj = response.getFile(); + + Thread.sleep(3000L); + + fileObj = slack.methods(botToken).filesInfo(r -> r.file(response.getFile().getId())).getFile(); assertThat(fileObj.getTitle(), is("file title")); assertThat(fileObj.getName(), is("sample.txt")); @@ -303,7 +306,7 @@ public void createLongTextFile_v2() throws IOException, SlackApiException { assertThat(fileObj.getFiletype(), is(anyOf(is(""), is("text")))); // only "text" for legacy assertThat(fileObj.getPrettyType(), is(anyOf(is(""), is("Plain Text")))); // only "Plain Text" for legacy assertThat(fileObj.getSize(), is(19648)); - // assertThat(fileObj.isEditable(), is(true)); + assertThat(fileObj.isEditable(), is(true)); assertThat(fileObj.isPreviewTruncated(), is(true)); assertThat(fileObj.getLines(), is(182));