Adds GET /api/v1/demo/manifest as a single source of truth for the demo's fictional org identity (Northstar Mobility -- surfacing the project's already-locked tenant name), synthetic-data/reset state, and live scenario readiness. Rewrites the login screen in Dutch with an honest, no-password demo entry and a guided-demo entry point, replaces the loud full-width demo banner with a subtle badge + popover, and adds a compact About page explaining what's real vs. synthetic vs. not yet connected.
54 lines
2.3 KiB
TypeScript
54 lines
2.3 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
// One-off tooling to capture evidence screenshots for artifacts/evidence/final-summary.md.
|
|
// Not part of the regular test suite (prefixed with `_` and excluded from CI runs).
|
|
|
|
const OUT = "../artifacts/evidence/screenshots";
|
|
|
|
test("capture the seven main pages", async ({ page, request }) => {
|
|
await request.post("http://localhost:8128/api/v1/demo/login", {
|
|
data: { role: "operations_manager" },
|
|
});
|
|
await request.post("http://localhost:8128/api/v1/demo/reset");
|
|
|
|
await page.goto("/login");
|
|
await page.screenshot({ path: `${OUT}/1-login.png` });
|
|
|
|
await page.getByRole("button", { name: "Verken als Operations Manager" }).click();
|
|
await expect(page.getByRole("heading", { name: "Operational metrics" })).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/2-dashboard.png`, fullPage: true });
|
|
|
|
await page.goto("/vehicles");
|
|
await expect(page.locator(".data-table")).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/3-vehicles.png`, fullPage: true });
|
|
|
|
await page.goto("/bookings");
|
|
await expect(page.locator(".data-table")).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/4-bookings.png`, fullPage: true });
|
|
|
|
await page.goto("/data-quality");
|
|
await expect(page.locator(".data-table")).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/5-data-quality.png`, fullPage: true });
|
|
|
|
await page.goto("/knowledge");
|
|
await page
|
|
.getByPlaceholder(/What must I do when a vehicle returns with damage/)
|
|
.fill("What must I do when a vehicle returns with damage?");
|
|
await page.getByRole("button", { name: "Ask" }).click();
|
|
await expect(page.getByText("Grounded in cited procedures")).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/6-knowledge.png`, fullPage: true });
|
|
|
|
await page.goto("/automation");
|
|
await expect(page.locator(".data-table")).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/7-automation.png`, fullPage: true });
|
|
|
|
await page.goto("/audit");
|
|
await expect(page.locator(".data-table")).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/8-audit.png`, fullPage: true });
|
|
|
|
await page.setViewportSize({ width: 360, height: 800 });
|
|
await page.goto("/dashboard");
|
|
await expect(page.getByRole("heading", { name: "Operational metrics" })).toBeVisible();
|
|
await page.screenshot({ path: `${OUT}/9-mobile-dashboard.png` });
|
|
});
|