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