From d594005d494553525518008e3809c3449ed4c220 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 11 Dec 2020 20:20:14 -0500 Subject: [PATCH] Trying to fix post test again. --- api_tests/src/post.spec.ts | 3 ++- api_tests/src/shared.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api_tests/src/post.spec.ts b/api_tests/src/post.spec.ts index 5845d7f8..d771205b 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -101,7 +101,7 @@ test('Create a post in a non-existent community', async () => { test('Unlike a post', async () => { let search = await searchForBetaCommunity(alpha); let postRes = await createPost(alpha, search.communities[0].id); - await delay(); + await longDelay(); let unlike = await likePost(alpha, 0, postRes.post); expect(unlike.post.score).toBe(0); await longDelay(); @@ -113,6 +113,7 @@ test('Unlike a post', async () => { // Make sure that post is unliked on beta let searchBeta = await searchPost(beta, postRes.post); + await delay(); let betaPost = searchBeta.posts[0]; expect(betaPost).toBeDefined(); diff --git a/api_tests/src/shared.ts b/api_tests/src/shared.ts index ed4899f8..1e3c130a 100644 --- a/api_tests/src/shared.ts +++ b/api_tests/src/shared.ts @@ -613,7 +613,7 @@ export async function followBeta(api: API): Promise { } } -export function delay(millis: number = 500) { +export function delay(millis: number = 2000) { return new Promise((resolve, _reject) => { setTimeout(_ => resolve(), millis); }); -- 2.44.1