diff --git a/src/features/color-preview/gutter.test.ts b/src/features/color-preview/gutter.test.ts index b0f9e3cbb4..d4d93afdf1 100644 --- a/src/features/color-preview/gutter.test.ts +++ b/src/features/color-preview/gutter.test.ts @@ -173,8 +173,10 @@ it("shows a markup file's style colors once a parse that outlasted opening the e }); view.scrollDOM.style.height = "100px"; view.dispatch({ effects: EditorView.scrollIntoView(view.state.doc.length) }); - await vi.waitFor(() => - expect(view!.dom.querySelector('.cm-openidea-gutter-colors span[title="#ff0080"]')).not.toBeNull(), + // The parse runs in idle time, which a busy machine gives out slowly. + await vi.waitFor( + () => expect(view!.dom.querySelector('.cm-openidea-gutter-colors span[title="#ff0080"]')).not.toBeNull(), + { timeout: 10_000 }, ); }); diff --git a/src/features/vcs/__tests__/svnToolWindowParity.test.tsx b/src/features/vcs/__tests__/svnToolWindowParity.test.tsx index 78044e6ee5..671e9381f8 100644 --- a/src/features/vcs/__tests__/svnToolWindowParity.test.tsx +++ b/src/features/vcs/__tests__/svnToolWindowParity.test.tsx @@ -855,6 +855,8 @@ describe("Incoming", () => { expect(mocks.svnIncomingRevisions).toHaveBeenLastCalledWith(7300, true); fireEvent.click(screen.getByRole("button", { name: "Refresh" })); await waitFor(() => expect(mocks.svnIncomingRevisions).toHaveBeenLastCalledWith(7300, false)); + // Refresh is disabled until that read has been shown. + await waitFor(() => expect(screen.getByRole("button", { name: "Refresh" })).toBeEnabled()); mocks.requestId = 7400; mocks.svnIncomingRevisions.mockReturnValue(new Promise(() => {}));