Name exactly one gate on every declaration, and own a shift by identity id
This commit is contained in:
@@ -194,11 +194,13 @@ test.describe.serial("authenticated admin journey", () => {
|
||||
await expect(page.locator("h1")).toHaveText("Shifts");
|
||||
await expect(page.locator("table")).toContainText("Morning — Front desk"); // seeded by the mock upstream
|
||||
|
||||
// The session-gated page asks the upstream for this visitor's rows: the one seeded against the
|
||||
// signed-in admin is there, and another person's shift is not.
|
||||
// The session-gated page scopes the upstream read by the visitor's identity id. The demo
|
||||
// upstream's rows belong to three made-up people, so the admin's own page is empty — which is
|
||||
// the assertion that matters: nobody else's shifts come back. (A matching row rendering is
|
||||
// covered where it is exact, in the plugin's own unit test.)
|
||||
await page.goto("/scheduling/mine");
|
||||
await expect(page.locator("h1")).toHaveText("My shifts");
|
||||
await expect(page.locator("table")).toContainText("Night — Escalations");
|
||||
await expect(page.getByText("No shifts are assigned to admin@plainpages.local")).toBeVisible();
|
||||
await expect(page.locator("table")).not.toContainText("Morning — Front desk");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user