fix(e2e): broaden Copy Key button regex to match both modal versions
Some checks failed
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled

On case-sensitive Linux CI, the old regenerate_key_modal.tsx from main
can coexist with the new RegenerateKeyModal.tsx after merge. The old
modal renders "Copy Virtual Key" while the new one renders "Copy Key".
Use /Copy.*Key/ to match both.
This commit is contained in:
Yuneng Jiang 2026-04-09 23:36:35 -07:00
parent 89320a955c
commit 2e0af3795a
No known key found for this signature in database

View file

@ -68,8 +68,8 @@ test.describe("Proxy Admin - Keys", () => {
const modal = page.locator(".ant-modal:visible");
await modal.getByRole("button", { name: /Regenerate/ }).click();
// Success view shows a Copy Key button in the footer
await expect(modal.getByRole("button", { name: /Copy Key/ })).toBeVisible({ timeout: 20_000 });
// Success view shows a Copy button in the footer (text varies between modal versions)
await expect(modal.getByRole("button", { name: /Copy.*Key/ })).toBeVisible({ timeout: 20_000 });
});
test("Update key TPM and RPM limits", async ({ page }) => {