Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(e2e): use .first() on Close button to avoid strict-mode violation (2 elements)

diegosouzapwed3c18888137
diff --git a/tests/e2e/providers-management.spec.ts b/tests/e2e/providers-management.spec.ts
index dd39c1cceb..3f43e0f67d 100644
--- a/tests/e2e/providers-management.spec.ts
+++ b/tests/e2e/providers-management.spec.ts
@@ -271,8 +271,9 @@ test.describe("Providers management", () => {
// endpoint is mocked to return instantly (0 models), so the modal reaches "done" phase
// and shows a Close button. Dismiss it before interacting with the connection list.
const importDialog = page.getByRole("dialog");
- await expect(importDialog.getByRole("button", { name: "Close" })).toBeVisible({ timeout: 15_000 });
- await importDialog.getByRole("button", { name: "Close" }).click();
+ // The Modal renders two "Close" elements (header X + footer button) — use .first()
+ await expect(importDialog.getByRole("button", { name: "Close" }).first()).toBeVisible({ timeout: 15_000 });
+ await importDialog.getByRole("button", { name: "Close" }).first().click();
await expect(importDialog).not.toBeVisible();
await page.getByTitle(/^edit$/i).click();