The local-mode LoginForm had drifted to using styled <div> elements as labels. That's an a11y regression — screen readers can't associate the label text with the input, and it broke every e2e sign-in helper because playwright's getByLabel needs a real <label htmlFor="…"> (or aria-label) association. Restore proper <label htmlFor="email"|"password"> with matching id="…" on the inputs; keeps the current design comp untouched. The tests were also written for an OLDER two-step flow — enter email → click "Continue with work email" → enter password → click "Sign in". The current form is single-step (both fields, one Sign in click). Update the shared signIn helper in every spec (p0-p8 + visual) to match, and switch the label selector to "Email address" so it matches the newly restored <label> text. Drop the stale a11y assertion in p6 that expected the two-step button. Also refresh the marketing landing check in p0-shell.spec.ts:20-22 — "agentic systems" was in the H1 in an older copy pass; today's H1 is "Deploy agents at any scale." Update the selector. Together this unblocks ~30 of the 32 e2e failures; the remaining handful are downstream product/test drift that will need per-test attention.
45 lines
1.9 KiB
TypeScript
45 lines
1.9 KiB
TypeScript
import { expect, test, type Page } from "@playwright/test";
|
|
|
|
// The Topologies page: browse the catalog and build a topology graph against
|
|
// the real /api/topologies endpoints (frontend → proxy → backend).
|
|
|
|
const OWNER_EMAIL = "[email protected]";
|
|
const OWNER_PASSWORD = "e2e-password";
|
|
|
|
async function signIn(page: Page) {
|
|
await page.goto("/login");
|
|
await page.getByLabel("Email address").fill(OWNER_EMAIL);
|
|
await page.getByLabel("Password").fill(OWNER_PASSWORD);
|
|
await page.getByRole("button", { name: "Sign in" }).click();
|
|
await expect(page.getByRole("heading", { name: "Clawmates" })).toBeVisible();
|
|
}
|
|
|
|
test("browse the topology catalog and build a graph", async ({ page }) => {
|
|
await signIn(page);
|
|
|
|
await page.getByRole("link", { name: "Topologies" }).click();
|
|
await expect(page).toHaveURL(/\/topologies$/);
|
|
await expect(page.getByRole("heading", { name: "Topologies" })).toBeVisible();
|
|
|
|
// The catalog lists the kinds.
|
|
await expect(page.getByRole("button", { name: /hierarchical/i })).toBeVisible();
|
|
|
|
// Build a pipeline topology and confirm the graph renders.
|
|
await page.getByRole("button", { name: /^pipeline$/i }).click();
|
|
await page.getByLabel(/Roles/).fill("alpha, beta, gamma");
|
|
await page.getByRole("button", { name: "Build" }).click();
|
|
await expect(page.locator("svg[aria-label*='topology']")).toBeVisible();
|
|
});
|
|
|
|
test("compare topologies shows a leaderboard and Pareto chart", async ({ page }) => {
|
|
await signIn(page);
|
|
await page.getByRole("link", { name: "Topologies" }).click();
|
|
await page.getByRole("tab", { name: /compare/i }).click();
|
|
|
|
await page.getByRole("button", { name: "Run comparison" }).click();
|
|
|
|
// Leaderboard table + Pareto chart render from the comparison result.
|
|
await expect(page.getByRole("cell", { name: /pipeline/i })).toBeVisible();
|
|
await expect(page.locator("svg[aria-label*='pareto']")).toBeVisible();
|
|
});
|