From 1b7ab96887d7e7ca7b2b7f217d91faa1ab9dbf95 Mon Sep 17 00:00:00 2001 From: phiresky Date: Wed, 20 Sep 2023 20:26:00 +0000 Subject: [PATCH] wait until ban post removed --- api_tests/src/post.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api_tests/src/post.spec.ts b/api_tests/src/post.spec.ts index 1530d6bb0..68ddbb730 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -419,8 +419,10 @@ test("Enforce site ban for federated user", async () => { expect(alphaUserOnBeta1.person?.person.banned).toBe(true); // existing alpha post should be removed on beta - let searchBeta2 = await getPost(beta, searchBeta1.post.id); - expect(searchBeta2.post_view.post.removed).toBe(true); + let searchBeta2 = await waitUntil( + () => getPost(beta, searchBeta1.post.id), + s => s.post_view.post.removed, + ); // Unban alpha let unBanAlpha = await banPersonFromSite(