From e59bc01e17155c59ddcd9d6f42694bed7b04f38f Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Thu, 29 Oct 2026 01:13:24 +0800 Subject: [PATCH] test(settings): Wait for the Download JDK version list before checking the preselected version --- src/features/settings/__tests__/downloadJdk.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/settings/__tests__/downloadJdk.test.tsx b/src/features/settings/__tests__/downloadJdk.test.tsx index f6e650d03..21a242ae6 100644 --- a/src/features/settings/__tests__/downloadJdk.test.tsx +++ b/src/features/settings/__tests__/downloadJdk.test.tsx @@ -66,6 +66,7 @@ describe("Download JDK dialog", () => { it("preselects the version a fix asks for", async () => { render( {}} onDownloaded={() => {}} />); await waitFor(() => expect(screen.getByRole("button", { name: "Download" })).toBeEnabled()); - expect(screen.getByRole("button", { name: "Version" })).toHaveTextContent("21"); + // The version list loads after the Download button enables on a busy runner. + await waitFor(() => expect(screen.getByRole("button", { name: "Version" })).toHaveTextContent("21")); }); });