From 29ed91749e6ece701229c33f1955cb6ab7d718e2 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Sun, 19 Nov 2023 21:15:23 +0000 Subject: [PATCH] EditWysiwygComposer-test: wait for the wasm to load in beforeAll (#11904) --- .../wysiwyg_composer/EditWysiwygComposer-test.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx b/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx index c3cbcd93e3..40597fade3 100644 --- a/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx +++ b/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx @@ -54,10 +54,16 @@ describe("EditWysiwygComposer", () => { ); }; - beforeAll(() => { - // Load the dynamic import - customRender(false).unmount(); - }); + beforeAll( + async () => { + // Load the dynamic import + const component = customRender(false); + await component.findByRole("textbox"); + component.unmount(); + }, + // it can take a while to load the wasm + 20000, + ); it("Should not render the component when not ready", async () => { // When