fix: close final portfolio quality gaps

This commit is contained in:
2026-09-02 17:38:11 +03:00
parent 0899b6b00f
commit b4728ceef0
24 changed files with 1822 additions and 889 deletions

View File

@@ -116,7 +116,9 @@ const captureWorldSequence = async (
for (let index = 0; index < frameCount; index += 1) {
frames.push(
await sampleFrame(
await world.page().screenshot({ animations: "allow", clip, scale: "css" }),
await world
.page()
.screenshot({ animations: "allow", clip, scale: "css" }),
),
);
if (index + 1 < frameCount) await world.page().waitForTimeout(intervalMs);
@@ -352,7 +354,9 @@ test.describe("production visual composition", () => {
await expect(page.locator(".journey-canvas")).toHaveCount(0);
await expect(page.locator(".journey-poster")).toHaveCount(1);
await page.keyboard.press("Escape");
await page.evaluate(() => (document.activeElement as HTMLElement | null)?.blur());
await page.evaluate(() =>
(document.activeElement as HTMLElement | null)?.blur(),
);
await page.mouse.move(1, 1);
const first = await captureViewport(page, testInfo, "visual-static-a");
@@ -378,7 +382,9 @@ test.describe("production visual composition", () => {
"reduced motion requested",
);
await page.keyboard.press("Escape");
await page.evaluate(() => (document.activeElement as HTMLElement | null)?.blur());
await page.evaluate(() =>
(document.activeElement as HTMLElement | null)?.blur(),
);
await page.mouse.move(1, 1);
await captureViewport(page, testInfo, "visual-reduced-motion");
});
@@ -482,7 +488,7 @@ test.describe("three-flash safety", () => {
page,
distUrl,
}, testInfo) => {
test.setTimeout(30_000);
test.setTimeout(60_000);
await page.setViewportSize({ width: 1440, height: 900 });
await waitForRenderedPortfolio(page, distUrl);
await page.mouse.wheel(0, 900);
@@ -513,7 +519,9 @@ test.describe("three-flash safety", () => {
"static",
);
await page.keyboard.press("Escape");
await page.evaluate(() => (document.activeElement as HTMLElement | null)?.blur());
await page.evaluate(() =>
(document.activeElement as HTMLElement | null)?.blur(),
);
await page.mouse.move(1, 1);
const staticResult = analyzeFlashSequence(
await captureWorldSequence(page.locator(".journey-world"), 8, 100),