Files
EventLens-Public/frontend/e2e/accessibility.spec.ts
T
Public Source Publisher 4e282639a4 EventLens: publish v1.1.0 application and standalone Compose
Includes campaign summaries, expanded Windows event correlation, worker-based redaction, updated demo assets and a local-only Compose example.

Publish curated EventLens source from 6a2ca12f81a2dcf816c61a86bd8811fcc95e8d8d
2026-11-20 13:15:35 +01:00

40 lines
2.2 KiB
TypeScript

import { expect, test } from "@playwright/test";
test("workspace navigation and primary controls expose accessible state", async ({ page }) => {
await page.goto("/#analysis");
for (const workspace of ["Analysis", "Timeline", "Hunting", "Reports", "Settings"]) {
await expect(page.getByRole("button", { name: workspace, exact: false }).first()).toBeEnabled();
}
await page.getByRole("button", { name: "Load demo", exact: true }).first().click();
await page.getByRole("button", { name: "Timeline", exact: false }).click();
await expect(page.getByRole("button", { name: "Timeline", exact: false }).first()).toHaveAttribute(
"aria-current",
"page",
);
await expect(page.getByRole("textbox", { name: "Search normalized evidence" })).toBeVisible();
await expect(page.getByLabel("Filter by category")).toBeVisible();
await expect(page.getByLabel("Filter by level")).toBeVisible();
await expect(page.getByLabel("Filter by provider")).toBeVisible();
await expect(page.getByRole("button", { name: "Previous evidence" })).toHaveAttribute(
"aria-label",
"Previous evidence",
);
await expect(page.getByRole("listitem").first()).toHaveAttribute("aria-setsize", /[0-9]+/);
await page.getByRole("textbox", { name: "Search normalized evidence" }).focus();
await page.keyboard.press("Tab");
await expect(page.locator(":focus")).toBeVisible();
await page.getByRole("button", { name: "Hunting", exact: false }).click();
await expect(page.getByRole("textbox", { name: "Search hunting evidence" })).toBeVisible();
await page.getByRole("button", { name: "Reports", exact: false }).click();
await expect(page.getByRole("button", { name: "Export JSON", exact: true })).toBeVisible();
await page.getByRole("button", { name: "Settings", exact: false }).click();
await expect(page.getByRole("group", { name: "Timestamp display" })).toBeVisible();
await page.setViewportSize({ width: 700, height: 900 });
await page.getByRole("button", { name: "Timeline", exact: false }).click();
await expect(page.getByLabel("Evidence time window")).toBeVisible();
await expect(page.getByLabel("Hide informational noise")).toBeVisible();
await expect(page.getByLabel("Focus incident")).toBeVisible();
});