Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix rte flaky test #9811

Merged
merged 2 commits into from
Dec 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand Down