Fix rte flaky test (#9811)

This commit is contained in:
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

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}>