fix: complete TechLog migration evidence
This commit is contained in:
@@ -3,10 +3,15 @@ import {
|
||||
gotoTechLog,
|
||||
TECH_LOG_BREAKPOINT_WIDTHS,
|
||||
TECH_LOG_CANONICAL_ROUTES,
|
||||
TECH_LOG_PUBLIC_FIXTURE_PATHS,
|
||||
TECH_LOG_STUDIO_STATE_PATHS,
|
||||
TECH_LOG_UNKNOWN_PUBLIC_PATHS,
|
||||
} from "../support/browser/tech-log-fixtures.ts";
|
||||
|
||||
function fixtureSnapshotName(path: string) {
|
||||
return `tech-log-public-fixture-${path.slice(1).replaceAll("/", "-")}-1440.png`;
|
||||
}
|
||||
|
||||
for (const route of TECH_LOG_CANONICAL_ROUTES) {
|
||||
for (const width of [360, 1440] as const) {
|
||||
test(`${route.routeId} matches the reviewed ${width}px visual`, async ({ page }) => {
|
||||
@@ -19,6 +24,18 @@ for (const route of TECH_LOG_CANONICAL_ROUTES) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const path of TECH_LOG_PUBLIC_FIXTURE_PATHS) {
|
||||
test(`known Public fixture ${path} matches its reviewed wide visual`, async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.setViewportSize({ width: 1440, height: 1000 });
|
||||
await gotoTechLog(page, path);
|
||||
await expect(page).toHaveScreenshot(fixtureSnapshotName(path), {
|
||||
fullPage: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
for (const width of TECH_LOG_BREAKPOINT_WIDTHS) {
|
||||
test(`Public home matches the reviewed ${width}px breakpoint visual`, async ({ page }) => {
|
||||
await page.setViewportSize({ width, height: 1000 });
|
||||
|
||||
Reference in New Issue
Block a user