From: Dessalines Date: Sat, 12 Dec 2020 15:45:14 +0000 (-0500) Subject: Trying to fix post test again. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/hacktivis.me/readmes/%7BimageSrc%7D?a=commitdiff_plain;h=ccd26bfcd767a0999ca48809c7f4ef051b1a8807;p=lemmy.git Trying to fix post test again. --- diff --git a/api_tests/src/post.spec.ts b/api_tests/src/post.spec.ts index f876fa7a..c68fe2d2 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -148,9 +148,11 @@ test('Update a post', async () => { test('Sticky a post', async () => { let search = await searchForBetaCommunity(alpha); let postRes = await createPost(alpha, search.communities[0].id); + await delay(); let stickiedPostRes = await stickyPost(alpha, true, postRes.post); expect(stickiedPostRes.post.stickied).toBe(true); + await delay(); // Make sure that post is stickied on beta let searchBeta = await searchPost(beta, postRes.post); @@ -158,6 +160,7 @@ test('Sticky a post', async () => { expect(betaPost.community_local).toBe(true); expect(betaPost.creator_local).toBe(false); expect(betaPost.stickied).toBe(true); + await delay(); // Unsticky a post let unstickiedPost = await stickyPost(alpha, false, postRes.post); @@ -170,6 +173,7 @@ test('Sticky a post', async () => { expect(betaPost2.community_local).toBe(true); expect(betaPost2.creator_local).toBe(false); expect(betaPost2.stickied).toBe(false); + await delay(); // Make sure that gamma cannot sticky the post on beta let searchGamma = await searchPost(gamma, postRes.post); @@ -185,6 +189,7 @@ test('Sticky a post', async () => { test('Lock a post', async () => { let search = await searchForBetaCommunity(alpha); + await delay(); let postRes = await createPost(alpha, search.communities[0].id); await delay(); @@ -281,6 +286,7 @@ test('Remove a post from admin and community on different instance', async () => test('Remove a post from admin and community on same instance', async () => { let search = await searchForBetaCommunity(alpha); + await delay(); let postRes = await createPost(alpha, search.communities[0].id); await delay();