From 5388b03f2d819ed8b4b6eb17c681476572eb33a5 Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Fri, 27 Mar 2026 12:16:00 +0000 Subject: [PATCH] fix(gro66): use specific selector for banner visibility assertion Replace ambiguous `getByText("STAFF VIEW")` that matched both the ImpersonationBanner and the CustomerPortal watermark with a precise `getByTestId("impersonation-banner")` selector to eliminate strict mode violations. Co-Authored-By: Paperclip --- apps/e2e/tests/impersonation.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/e2e/tests/impersonation.spec.ts b/apps/e2e/tests/impersonation.spec.ts index ac246d8..3588412 100644 --- a/apps/e2e/tests/impersonation.spec.ts +++ b/apps/e2e/tests/impersonation.spec.ts @@ -62,7 +62,7 @@ test.describe("ImpersonationBanner", () => { test("clicking End Session calls API and redirects", async ({ page }) => { await page.goto("/?sessionId=session-1"); await page.getByRole("button", { name: /End Session/ }).click(); - await expect(page.getByText("STAFF VIEW")).not.toBeVisible(); + await expect(page.getByTestId("impersonation-banner")).not.toBeVisible(); }); test("Extend button appears when time is low and not extended", async ({ page }) => {