mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 08:52:12 +00:00
test(settings): Wait for the Download JDK version list before checking the preselected version
This commit is contained in:
1 parent
1e9bba97e3
commit
e59bc01e17
1 file changed
+2
-1
@@ -66,6 +66,7 @@ describe("Download JDK dialog", () => {
|
||||
it("preselects the version a fix asks for", async () => {
|
||||
render(<DownloadJdkDialog initialVersion={21} onClose={() => {}} 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"));
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user