import AxeBuilder from "@axe-core/playwright"; import { expect, test } from "@playwright/test"; // R5: the public marketing landing serves at "/" for logged-out visitors // (middleware rewrite → /marketing), with our brand and honest claims. test("the marketing landing renders for logged-out visitors @marketing", async ({ page, context, }) => { await context.clearCookies(); await page.goto("/"); // Hero + nav + our wordmark. await expect( page.getByRole("heading", { name: /agentic systems/i }), ).toBeVisible(); await expect( page.getByRole("link", { name: "Book a demo" }).first(), ).toBeVisible(); // FAQ accordion: the first item is open by default; expand another. await expect(page.getByText(/A claw is an AI coworker/)).toBeVisible(); await page.getByRole("button", { name: /run it on my own/i }).click(); await expect(page.getByText(/air-gapped/i).first()).toBeVisible(); // No SOC 2 / compliance claims (we don't make them). await expect(page.getByText(/SOC 2/i)).toHaveCount(0); }); test("the marketing landing is accessible @marketing", async ({ page, context, }) => { await context.clearCookies(); await page.goto("/"); await page.evaluate(() => Promise.allSettled(document.getAnimations().map((a) => a.finished)), ); const results = await new AxeBuilder({ page }).analyze(); const blocking = results.violations.filter( (v) => v.impact === "serious" || v.impact === "critical", ); expect(blocking.map((v) => v.id)).toEqual([]); });