Fix rte flaky test (#9811)

t3chguy/dedup-icons-17oct
Florian Duros 2022-12-21 12:22:17 +01:00 committed by GitHub
parent bef8e077f6
commit 7db2ee749f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -64,12 +64,15 @@ describe("EditWysiwygComposer", () => {
); );
}; };
beforeAll(() => {
// Load the dynamic import
customRender(false).unmount();
});
it("Should not render the component when not ready", async () => { it("Should not render the component when not ready", async () => {
// When // When
const { rerender } = customRender(false); const { rerender } = customRender(false);
await waitFor(() => expect(screen.getByRole("textbox")).toHaveAttribute("contentEditable", "true"), { await waitFor(() => expect(screen.getByRole("textbox")).toHaveAttribute("contentEditable", "true"));
timeout: 2000,
});
rerender( rerender(
<MatrixClientContext.Provider value={mockClient}> <MatrixClientContext.Provider value={mockClient}>