merge: worktree-a11y-fixes into main
Accessibility fixes (aria-labels, color contrast, html lang, inline link underlines), atomic dev login endpoints, and E2E test hardening.
This commit is contained in:
commit
bab53cec9e
31 changed files with 792 additions and 162 deletions
|
|
@ -14,7 +14,14 @@ test.describe("Admin members page", () => {
|
|||
await adminPage.goto("/admin/members");
|
||||
|
||||
const searchInput = adminPage.getByPlaceholder("Search members...");
|
||||
await expect(searchInput).toBeVisible();
|
||||
await expect(searchInput).toBeVisible({ timeout: 10000 });
|
||||
|
||||
// Wait for the initial member list to load before searching
|
||||
await expect(
|
||||
adminPage
|
||||
.locator("table")
|
||||
.or(adminPage.getByText("No members found matching your criteria")),
|
||||
).toBeVisible({ timeout: 15000 });
|
||||
|
||||
await searchInput.fill("nonexistent-query-xyz");
|
||||
|
||||
|
|
@ -23,7 +30,7 @@ test.describe("Admin members page", () => {
|
|||
adminPage
|
||||
.locator("table")
|
||||
.or(adminPage.getByText("No members found matching your criteria")),
|
||||
).toBeVisible();
|
||||
).toBeVisible({ timeout: 10000 });
|
||||
});
|
||||
|
||||
test("non-admin redirect", async ({ browser }) => {
|
||||
|
|
@ -43,11 +50,20 @@ test.describe("Admin members page", () => {
|
|||
await adminPage.goto("/admin/members");
|
||||
await adminPage.waitForLoadState("networkidle"); // ensure Vue hydration is complete
|
||||
|
||||
await adminPage.getByRole("button", { name: "Add Member" }).click();
|
||||
// Wait for page to fully load and hydrate
|
||||
await expect(adminPage.locator("h1")).toHaveText("Members");
|
||||
await adminPage.waitForLoadState("networkidle");
|
||||
|
||||
const addBtn = adminPage.getByRole("button", { name: "Add Member" });
|
||||
await expect(addBtn).toBeVisible({ timeout: 10000 });
|
||||
await addBtn.click();
|
||||
|
||||
// Modal should appear with the form heading and fields
|
||||
await expect(adminPage.getByText("Add New Member")).toBeVisible();
|
||||
await expect(adminPage.getByPlaceholder("Full name")).toBeVisible();
|
||||
await expect(adminPage.getByPlaceholder("email@example.com")).toBeVisible();
|
||||
await expect(adminPage.getByPlaceholder("Full name")).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
await expect(
|
||||
adminPage.getByPlaceholder("email@example.com"),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue