1 jest.setTimeout(120000);
5 searchForBetaCommunity,
7 checkFollowedCommunities,
11 beforeAll(async () => {
15 afterAll(async () => {
16 await unfollowRemotes(alpha);
19 test('Follow federated community', async () => {
20 let search = await searchForBetaCommunity(alpha); // TODO sometimes this is returning null?
21 let follow = await followCommunity(alpha, true, search.communities[0].id);
23 // Make sure the follow response went through
24 expect(follow.community.local).toBe(false);
25 expect(follow.community.name).toBe('main');
27 // Check it from local
28 let followCheck = await checkFollowedCommunities(alpha);
29 let remoteCommunityId = followCheck.communities.filter(
30 c => c.community_local == false
32 expect(remoteCommunityId).toBeDefined();
35 let unfollow = await followCommunity(alpha, false, remoteCommunityId);
36 expect(unfollow.community.local).toBe(false);
38 // Make sure you are unsubbed locally
39 let unfollowCheck = await checkFollowedCommunities(alpha);
40 expect(unfollowCheck.communities.length).toBeGreaterThanOrEqual(1);