MAESTRO: stabilize Playwright E2E suite

This commit is contained in:
Mariusz Banach
2026-02-18 06:58:01 +01:00
parent f296f78030
commit 41e2e3d570
67 changed files with 139 additions and 37 deletions

View File

@@ -15,7 +15,7 @@ const viewports = [
const baseScreenshotOptions = {
animations: "disabled" as const,
fullPage: true,
maxDiffPixelRatio: 0.03,
};
test.describe("visual regression snapshots", () => {
@@ -25,6 +25,10 @@ test.describe("visual regression snapshots", () => {
const analyzer = new AnalyzerPage(page);
await page.setViewportSize({ width: viewport.width, height: viewport.height });
await page.addInitScript(() => {
window.localStorage.clear();
window.sessionStorage.clear();
});
await analyzer.goto();
const headerInput = page.getByRole("textbox", { name: "Header Input" });
@@ -64,6 +68,7 @@ test.describe("visual regression snapshots", () => {
page.getByTestId("progress-remaining"),
page.getByTestId("progress-percentage"),
page.getByTestId("progress-current-test"),
page.getByRole("progressbar"),
],
});
@@ -89,6 +94,7 @@ test.describe("visual regression snapshots", () => {
await expect(hopChain).toBeVisible();
await expect(hopChain).toHaveScreenshot(`hop-chain-${viewport.label}.png`, {
animations: "disabled",
maxDiffPixelRatio: 0.03,
});
});
}