From afde8e757681d37309795bf4cccdc9500a40ffc9 Mon Sep 17 00:00:00 2001 From: phiresky Date: Mon, 18 Sep 2023 20:31:12 +0000 Subject: [PATCH] tweak more tests --- api_tests/src/comment.spec.ts | 5 ++++- api_tests/src/post.spec.ts | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api_tests/src/comment.spec.ts b/api_tests/src/comment.spec.ts index 3c8578d80..24822d1d1 100644 --- a/api_tests/src/comment.spec.ts +++ b/api_tests/src/comment.spec.ts @@ -468,7 +468,10 @@ test("Mention beta from alpha", async () => { expect(betaRootComment.counts.score).toBe(1); assertCommentFederation(betaRootComment, commentRes.comment_view); - let mentionsRes = await getMentions(beta); + let mentionsRes = await waitUntil( + () => getMentions(beta), + m => !!m.mentions[0], + ); expect(mentionsRes.mentions[0].comment.content).toBeDefined(); expect(mentionsRes.mentions[0].community.local).toBe(true); expect(mentionsRes.mentions[0].creator.local).toBe(false); diff --git a/api_tests/src/post.spec.ts b/api_tests/src/post.spec.ts index 1edabdcc8..228925d06 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -287,7 +287,6 @@ test("Delete a post", async () => { // Undelete let undeletedPost = await deletePost(alpha, false, postRes.post_view.post); - expect(undeletedPost.post_view.post.deleted).toBe(false); // Make sure lemmy beta sees post is undeleted let betaPost2 = (