test(e2e): add login and impersonation test coverage (GRO-77) #101

Merged
lint-roller-qa[bot] merged 4 commits from feat/e2e-login-impersonation-gro-77 into main 2026-03-22 15:43:01 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit b3514626a1 - Show all commits
+1 -1
View File
@@ -36,7 +36,7 @@ test.describe("ImpersonationBanner", () => {
test("banner displays when session is active", async ({ page }) => {
await page.goto("/?sessionId=session-1");
await expect(page.locator("[data-testid=\"impersonation-banner\"]")).toBeVisible();
await expect(page.getByText("STAFF VIEW")).toBeVisible();
await expect(page.getByTestId("impersonation-banner").getByText("STAFF VIEW")).toBeVisible();
});
test("banner shows reason when session has reason", async ({ page }) => {
+2 -2
View File
@@ -14,9 +14,9 @@ test.describe("DevLoginSelector", () => {
});
test("shows loading state while fetching users", async ({ page }) => {
await page.unroute("**/api/dev/users");
await page.route("**/api/dev/users", async (route) => {
await page.waitForResponse((res) => res.url().includes("/api/dev/users"));
await new Promise((r) => setTimeout(r, 100));
await new Promise((r) => setTimeout(r, 200));
await route.fulfill({ json: { staff: [], clients: [] } });
});
await page.goto("/login");