From: Dessalines <tyhou13@gmx.com> Date: Sat, 12 Dec 2020 00:59:45 +0000 (-0500) Subject: Trying to fix post test again. X-Git-Url: http://these/git/%7BtotpUrl%7D?a=commitdiff_plain;h=4410d2e44d6f334ee693bc83eb6cf122938a50bc;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 e45e290c..5845d7f8 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -104,7 +104,7 @@ test('Unlike a post', async () => { await delay(); let unlike = await likePost(alpha, 0, postRes.post); expect(unlike.post.score).toBe(0); - await delay(); + await longDelay(); // Try to unlike it again, make sure it stays at 0 let unlike2 = await likePost(alpha, 0, postRes.post); @@ -163,6 +163,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); @@ -175,6 +176,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); @@ -203,7 +205,7 @@ test('Lock a post', async () => { let searchBeta = await searchPostLocal(beta, postRes.post); let betaPost1 = searchBeta.posts[0]; expect(betaPost1.locked).toBe(true); - await delay(); + await longDelay(); // Try to make a new comment there, on alpha let comment = await createComment(alpha, postRes.post.id);