fix(e2e): dismiss pre-existing modal overlay in providers E2E test
The Bailian Coding Plan provider page may render a dialog on load that blocks pointer events on the Add API Key button. Add pre-dialog dismissal (Escape key) before attempting to click. Also triages #485 (Claude Code tool calls — needs-info).
This commit is contained in:
@@ -63,6 +63,13 @@ test.describe("Bailian Coding Plan Provider", () => {
|
||||
const redirectedToLogin = page.url().includes("/login");
|
||||
test.skip(redirectedToLogin, "Authentication enabled without a login fixture.");
|
||||
|
||||
// Dismiss any pre-existing dialog/overlay that may appear on page load
|
||||
const preExistingDialog = page.getByRole("dialog").first();
|
||||
if (await preExistingDialog.isVisible({ timeout: 2000 }).catch(() => false)) {
|
||||
await page.keyboard.press("Escape");
|
||||
await preExistingDialog.waitFor({ state: "hidden", timeout: 3000 }).catch(() => {});
|
||||
}
|
||||
|
||||
const addKeyButton = page.getByRole("button", {
|
||||
name: /add.*api.*key|add.*key|add.*connection|connect/i,
|
||||
});
|
||||
@@ -175,6 +182,13 @@ test.describe("Bailian Coding Plan Provider", () => {
|
||||
const redirectedToLogin = page.url().includes("/login");
|
||||
test.skip(redirectedToLogin, "Authentication enabled without a login fixture.");
|
||||
|
||||
// Dismiss any pre-existing dialog/overlay that may appear on page load
|
||||
const preExistingDialog = page.getByRole("dialog").first();
|
||||
if (await preExistingDialog.isVisible({ timeout: 2000 }).catch(() => false)) {
|
||||
await page.keyboard.press("Escape");
|
||||
await preExistingDialog.waitFor({ state: "hidden", timeout: 3000 }).catch(() => {});
|
||||
}
|
||||
|
||||
const addKeyButton = page.getByRole("button", {
|
||||
name: /add.*api.*key|add.*key|add.*connection|connect/i,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user