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();
// 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();
}
}
-export function delay(millis: number = 500) {
+export function delay(millis: number = 2000) {
return new Promise((resolve, _reject) => {
setTimeout(_ => resolve(), millis);
});