fix(e2e): broaden Copy Key button regex to match both modal versions

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 }) => {