1 jest.setTimeout(120000);
5 searchForBetaCommunity,
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(
24 search.communities[0].community.id
27 // Make sure the follow response went through
28 expect(follow.community_view.community.local).toBe(false);
29 expect(follow.community_view.community.name).toBe('main');
31 // Check it from local
32 let site = await getSite(alpha);
33 let remoteCommunityId = site.my_user.follows.find(
34 c => c.community.local == false
36 expect(remoteCommunityId).toBeDefined();
39 let unfollow = await followCommunity(alpha, false, remoteCommunityId);
40 expect(unfollow.community_view.community.local).toBe(false);
42 // Make sure you are unsubbed locally
43 let siteUnfollowCheck = await getSite(alpha);
44 expect(siteUnfollowCheck.my_user.follows.length).toBeGreaterThanOrEqual(1);