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