UI Updates
Updated some pages pages to be more consistent.
This commit is contained in:
24 files changed
+901
-616
No files matched your search
@@ -55,21 +55,26 @@ test.describe.serial("owner administration journeys", () => {
|
||||
await page.goto("/owner/calendar");
|
||||
|
||||
await expect(page.getByRole("heading", { name: "Calendar" })).toBeVisible();
|
||||
await expect(page.getByRole("link", { name: "Marcus Reed", exact: true })).toBeVisible();
|
||||
await expect(page.getByRole("link", { name: "Leo Vance", exact: true })).toBeVisible();
|
||||
// The staff filter pills are avatar+name+hours cards now, so their
|
||||
// accessible name is "Marcus Reed 10:00 AM – 7:00 PM" etc — a
|
||||
// substring match (Playwright's default, no `exact`) still uniquely
|
||||
// identifies each pill's link.
|
||||
await expect(page.getByRole("link", { name: "Marcus Reed" })).toBeVisible();
|
||||
await expect(page.getByRole("link", { name: "Leo Vance" })).toBeVisible();
|
||||
|
||||
// Filtering to one staff member narrows the day view to a single column.
|
||||
await page.getByRole("link", { name: "Leo Vance", exact: true }).click();
|
||||
await page.getByRole("link", { name: "Leo Vance" }).click();
|
||||
await expect(page).toHaveURL(/staffId=/);
|
||||
// The single remaining day-view column is headed by a <p> with the staff member's exact name
|
||||
// (the filter pill link has the same text, so scope to the paragraph specifically).
|
||||
await expect(page.locator("p").getByText("Leo Vance", { exact: true })).toBeVisible();
|
||||
// — the staff filter pill above it is *also* an avatar+name+hours card with its own <p> of the
|
||||
// same text now, so scope to the grid itself (data-testid="calendar-grid") to disambiguate.
|
||||
await expect(page.getByTestId("calendar-grid").locator("p").getByText("Leo Vance", { exact: true })).toBeVisible();
|
||||
|
||||
await page.getByRole("link", { name: "Agenda", exact: true }).click();
|
||||
await expect(page).toHaveURL(/view=agenda/);
|
||||
await expect(page.getByRole("link", { name: "Day", exact: true })).toBeVisible();
|
||||
|
||||
await page.getByRole("link", { name: "All Staff", exact: true }).click();
|
||||
await page.getByRole("link", { name: "All Staff" }).click();
|
||||
await expect(page).not.toHaveURL(/staffId=/);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user