1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

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

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 () => {
// When
const { rerender } = customRender(false);
await waitFor(() => expect(screen.getByRole("textbox")).toHaveAttribute("contentEditable", "true"), {
timeout: 2000,
});
await waitFor(() => expect(screen.getByRole("textbox")).toHaveAttribute("contentEditable", "true"));
rerender(
<MatrixClientContext.Provider value={mockClient}>