fix(e2e): fix test failures after CTO review

- Scope STAFF VIEW locator to impersonation-banner testid
- Fix loading state test: unroute before setting delayed handler

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Lint Roller
2026-03-22 11:42:32 +00:00
parent 355f11fdaa
commit b3514626a1
2 changed files with 3 additions and 3 deletions
+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");