diff --git a/ui/src/components/IssueProperties.test.tsx b/ui/src/components/IssueProperties.test.tsx index 63f8d1eb..f7959784 100644 --- a/ui/src/components/IssueProperties.test.tsx +++ b/ui/src/components/IssueProperties.test.tsx @@ -1059,9 +1059,13 @@ describe("IssueProperties", () => { expect(container.textContent).toContain("Custom · gpt-5.4 · high"); expect(container.textContent).toContain("Model lane"); - const modelButton = Array.from(container.querySelectorAll("button")) - .find((button) => button.textContent?.includes("GPT-5.5")); - expect(modelButton).not.toBeUndefined(); + // Wait for the adapter-models query to resolve so the model options render. + let modelButton: HTMLButtonElement | undefined; + await waitForAssertion(() => { + modelButton = Array.from(container.querySelectorAll("button")) + .find((button) => button.textContent?.includes("GPT-5.5")); + expect(modelButton).not.toBeUndefined(); + }); await act(async () => { modelButton!.dispatchEvent(new MouseEvent("click", { bubbles: true }));