mirror of https://github.com/vector-im/riot-web
Fix rte flaky test (#9811)
parent
bef8e077f6
commit
7db2ee749f
|
@ -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}>
|
||||
|
|
Loading…
Reference in New Issue