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(
26 search.communities[0].community.id
29 // Make sure the follow response went through
30 expect(follow.community_view.community.local).toBe(false);
31 expect(follow.community_view.community.name).toBe('main');
34 // Check it from local
35 let followCheck = await checkFollowedCommunities(alpha);
37 let remoteCommunityId = followCheck.communities.find(
38 c => c.community.local == false
40 expect(remoteCommunityId).toBeDefined();
43 let unfollow = await followCommunity(alpha, false, remoteCommunityId);
44 expect(unfollow.community_view.community.local).toBe(false);
47 // Make sure you are unsubbed locally
48 let unfollowCheck = await checkFollowedCommunities(alpha);
49 expect(unfollowCheck.communities.length).toBeGreaterThanOrEqual(1);