From ccd26bfcd767a0999ca48809c7f4ef051b1a8807 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Sat, 12 Dec 2020 10:45:14 -0500
Subject: [PATCH] Trying to fix post test again.

---
 api_tests/src/post.spec.ts | 6 ++++++
 1 file changed, 6 insertions(+)

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();
 
-- 
2.44.1