import { expect, test } from "@playwright/experimental-ct-react"; import { AkP20InterimVisualFixture as VisualFixture } from "../../apps/web/app/components/screens/ak-p20-interim.visual-fixture"; // Keep this component-only import separate from test data: Playwright CT turns // imported JSX components into browser registry references during compilation. const VISUAL_SCREENS = ["subscription", "usage", "billing", "demo-data", "first-steps"] as const; test.describe("AK-P20 interim UI pixel baseline", () => { for (const screen of VISUAL_SCREENS) { test(`${screen} stays visually stable in light mode`, async ({ mount, page }) => { const component = await mount(
); await page.evaluate(async () => { await document.fonts.ready; }); await expect(component.locator("[data-ui-id$='.page']")).toHaveCount(1); await expect(component).toHaveScreenshot(`ak-p20-${screen}.png`); }); } });