mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-30 00:01:25 +00:00
Trying to fix post test again.
This commit is contained in:
parent
4410d2e44d
commit
d594005d49
2 changed files with 3 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -613,7 +613,7 @@ export async function followBeta(api: API): Promise<CommunityResponse> {
|
|||
}
|
||||
}
|
||||
|
||||
export function delay(millis: number = 500) {
|
||||
export function delay(millis: number = 2000) {
|
||||
return new Promise((resolve, _reject) => {
|
||||
setTimeout(_ => resolve(), millis);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue