From: Dessalines Date: Thu, 17 Dec 2020 19:59:53 +0000 (-0500) Subject: Trying again. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/hacktivis.me/static/%7Bpost.url%7D?a=commitdiff_plain;h=583808d5e7246b597ed2c088395982409f21cf29;p=lemmy.git Trying again. --- diff --git a/api_tests/src/post.spec.ts b/api_tests/src/post.spec.ts index 67fb6c3b..de554ba7 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -252,10 +252,12 @@ test('Remove a post from admin and community on different instance', async () => test('Remove a post from admin and community on same instance', async () => { await followBeta(alpha); let postRes = await createPost(alpha, betaCommunity.id); + expect(postRes.post).toBeDefined(); // Get the id for beta let searchBeta = await searchPost(beta, postRes.post); let betaPost = searchBeta.posts[0]; + expect(betaPost).toBeDefined(); // The beta admin removes it (the community lives on beta) let removePostRes = await removePost(beta, true, betaPost); @@ -278,6 +280,7 @@ test('Remove a post from admin and community on same instance', async () => { }); test('Search for a post', async () => { + await unfollowRemotes(alpha); let postRes = await createPost(alpha, betaCommunity.id); expect(postRes.post).toBeDefined(); @@ -287,10 +290,15 @@ test('Search for a post', async () => { }); test('A and G subscribe to B (center) A posts, it gets announced to G', async () => { + await followBeta(alpha); + await followBeta(gamma); let postRes = await createPost(alpha, betaCommunity.id); + expect(postRes.post).toBeDefined(); - let search2 = await searchPost(gamma, postRes.post); + let search2 = await searchPostLocal(gamma, postRes.post); expect(search2.posts[0].name).toBeDefined(); + await unfollowRemotes(alpha); + await unfollowRemotes(gamma); }); test('Enforce site ban for federated user', async () => {