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 <noreply@paperclip.ing>
This commit is contained in:
Flea Flicker
2026-03-27 12:16:00 +00:00
parent d2591e47cd
commit 5388b03f2d
+1 -1
View File
@@ -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 }) => {