fix(e2e): assert the users table's own empty-state copy

UsersTable overrides DataTable's default noDataMessage with its own
EmptyState, so the row reads "No users found" rather than "No results".
Assert that, and pair it with the seeded user being absent so the check
cannot pass while the filter silently does nothing.
This commit is contained in:
Yuneng Jiang 2026-08-31 15:57:49 -07:00
parent c8b82aa0b6
commit 859bd01dda
No known key found for this signature in database

View file

@ -46,6 +46,7 @@ test.describe("Internal Users Search", () => {
await page.getByTestId("users-filter-sso-id").fill("e2e-sso-id-that-matches-nobody");
await page.getByTestId("filter-drawer-apply").click();
await expect(page.getByRole("row").filter({ hasText: "No results" })).toBeVisible({ timeout: 30_000 });
await expect(page.getByText("No users found")).toBeVisible({ timeout: 30_000 });
await expect(userRows(page).filter({ hasText: "noteam@test.local" })).toHaveCount(0);
});
});