Skip to content

Commit bba92bc

Browse files
committed
Run all the integration tests - 2021-08-17 PT
1 parent 275b778 commit bba92bc

File tree

8 files changed

+27
-6
lines changed

8 files changed

+27
-6
lines changed

json-logs/samples/api/users.info.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
""
6262
]
6363
},
64-
"is_stranger": false
64+
"is_stranger": false,
65+
"who_can_share_contact_card": ""
6566
},
6667
"error": "",
6768
"needed": "",

json-logs/samples/api/users.lookupByEmail.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"is_app_user": false,
4747
"updated": 12345,
4848
"has_2fa": false,
49-
"is_email_confirmed": false
49+
"is_email_confirmed": false,
50+
"who_can_share_contact_card": ""
5051
},
5152
"error": "",
5253
"needed": "",

json-logs/samples/events/TeamJoinPayload.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
"two_factor_type": "",
8383
"has_files": false,
8484
"locale": "",
85-
"is_workflow_bot": false
85+
"is_workflow_bot": false,
86+
"who_can_share_contact_card": false
8687
}
8788
}
8889
}

json-logs/samples/events/UserChangePayload.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
"two_factor_type": "",
8383
"has_files": false,
8484
"locale": "",
85-
"is_workflow_bot": false
85+
"is_workflow_bot": false,
86+
"who_can_share_contact_card": false
8687
},
8788
"cache_ts": 123
8889
}

json-logs/samples/rtm/TeamJoinEvent.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"two_factor_type": "",
6767
"has_files": false,
6868
"locale": "",
69-
"is_workflow_bot": false
69+
"is_workflow_bot": false,
70+
"who_can_share_contact_card": false
7071
}
7172
}

json-logs/samples/rtm/UserChangeEvent.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
"two_factor_type": "",
6767
"has_files": false,
6868
"locale": "",
69-
"is_workflow_bot": false
69+
"is_workflow_bot": false,
70+
"who_can_share_contact_card": false
7071
},
7172
"cache_ts": 123
7273
}

slack-api-client/src/test/java/test_with_remote_apis/methods/users_Test.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616

1717
import java.io.File;
1818
import java.io.IOException;
19+
import java.util.ArrayList;
1920
import java.util.Arrays;
2021
import java.util.List;
2122

2223
import static config.Constants.SLACK_SDK_TEST_GRID_SHARED_CHANNEL_OTHER_ORG_USER_ID;
24+
import static java.util.stream.Collectors.toList;
2325
import static junit.framework.TestCase.assertEquals;
2426
import static org.hamcrest.CoreMatchers.*;
2527
import static org.hamcrest.MatcherAssert.assertThat;
@@ -54,6 +56,18 @@ public void showUsers_bot() throws IOException, SlackApiException {
5456
assertThat(usersInfo.getUser().getLocale(), is(notNullValue()));
5557
}
5658

59+
@Test
60+
public void traverseAllUsers() throws Exception {
61+
List<String> userIds = new ArrayList<>();
62+
String nextCursor = null;
63+
while (nextCursor == null || !nextCursor.equals("")) {
64+
UsersListResponse response = slack.methods(userToken).usersList(r -> r.includeLocale(true).limit(3000));
65+
nextCursor = response.getResponseMetadata().getNextCursor();
66+
userIds.addAll(response.getMembers().stream().map(u -> u.getId()).collect(toList()));
67+
}
68+
assertThat(userIds.size(), is(greaterThan(0)));
69+
}
70+
5771
@Test
5872
public void showUsers_user() throws IOException, SlackApiException {
5973
UsersListResponse users = slack.methods(userToken).usersList(r -> r.includeLocale(true).limit(10));

slack-api-model/src/main/java/com/slack/api/model/User.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class User {
6161
private String locale;
6262
@SerializedName("is_workflow_bot")
6363
private boolean workflowBot;
64+
private boolean whoCanShareContactCard;
6465

6566

6667
@Data

0 commit comments

Comments
 (0)