Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7a6c4ae5 | ||
|
|
8ea825a8a1 |
@@ -6,6 +6,7 @@ import process from "node:process";
|
|||||||
import { chromium } from "@playwright/test";
|
import { chromium } from "@playwright/test";
|
||||||
|
|
||||||
import { evaluateLabBudget } from "../src/application/policies/performance-budgets.js";
|
import { evaluateLabBudget } from "../src/application/policies/performance-budgets.js";
|
||||||
|
import { ROUTE_REGISTRY } from "../src/contracts/routes.js";
|
||||||
|
|
||||||
const server = spawn(
|
const server = spawn(
|
||||||
"corepack",
|
"corepack",
|
||||||
@@ -66,8 +67,13 @@ try {
|
|||||||
}).observe({ type: "layout-shift", buffered: true });
|
}).observe({ type: "layout-shift", buffered: true });
|
||||||
});
|
});
|
||||||
await page.goto(baseUrl, { waitUntil: "networkidle" });
|
await page.goto(baseUrl, { waitUntil: "networkidle" });
|
||||||
|
const targetLabel =
|
||||||
|
ROUTE_REGISTRY.SAMPLE_RESOURCE_LIST.navigationLabel;
|
||||||
|
if (!targetLabel) {
|
||||||
|
throw new Error("Performance route must be present in navigation.");
|
||||||
|
}
|
||||||
const interactionStarted = performance.now();
|
const interactionStarted = performance.now();
|
||||||
await page.getByRole("link", { name: "샘플 리소스" }).click();
|
await page.getByRole("link", { name: targetLabel }).click();
|
||||||
await page.getByRole("heading", { name: "세션이 필요합니다." }).waitFor();
|
await page.getByRole("heading", { name: "세션이 필요합니다." }).waitFor();
|
||||||
const namedInteractionMs = performance.now() - interactionStarted;
|
const namedInteractionMs = performance.now() - interactionStarted;
|
||||||
const paint = await page.evaluate(
|
const paint = await page.evaluate(
|
||||||
|
|||||||
Reference in New Issue
Block a user