fix: complete TechLog migration evidence

This commit is contained in:
DongHyeonka
2026-08-16 04:55:52 +09:00
parent 6c2780b7a7
commit 3a7c5deca0
81 changed files with 1492 additions and 345 deletions
+12 -1
View File
@@ -6,7 +6,9 @@ import {
TECH_LOG_CANONICAL_ROUTES,
} from "../support/browser/tech-log-fixtures.ts";
for (const route of TECH_LOG_CANONICAL_ROUTES) {
for (const route of TECH_LOG_CANONICAL_ROUTES.filter(
({ routeId }) => routeId !== "NOT_FOUND",
)) {
test(`@a11y ${route.routeId} has no critical or serious Axe violations`, async ({
page,
}) => {
@@ -22,6 +24,15 @@ for (const route of TECH_LOG_CANONICAL_ROUTES) {
});
}
test("@a11y NOT_FOUND preserves the source raw non-HTML response", async ({
request,
}) => {
const response = await request.get("/definitely-not-a-product-route");
expect(response.status()).toBe(404);
expect(response.headers()["content-type"]).toBe("text/plain;charset=UTF-8");
expect(await response.text()).toBe("Not Found");
});
test("@a11y keyboard reaches a visible Public navigation focus indicator", async ({
page,
}) => {
+68
View File
@@ -0,0 +1,68 @@
import { expect, test } from "../support/browser/strict-browser-test.ts";
import {
TECH_LOG_CANONICAL_ROUTES,
TECH_LOG_PUBLIC_FIXTURE_PATHS,
} from "../support/browser/tech-log-fixtures.ts";
const knownSpaPaths = [
...new Set([
...TECH_LOG_CANONICAL_ROUTES
.filter(({ routeId }) => !["NOT_FOUND", "TECH_LOG_STUDIO_NOT_FOUND"].includes(routeId))
.map(({ path }) => path),
...TECH_LOG_PUBLIC_FIXTURE_PATHS,
]),
];
test("production HTTP preserves the source in-shell Studio 404", async ({
request,
}) => {
const response = await request.get("/studio/unknown-screen");
expect(response.status()).toBe(404);
expect(response.headers()["content-type"]).toBe("text/html;charset=UTF-8");
expect((await response.text()).startsWith("<!doctype html>")).toBe(true);
});
for (const path of knownSpaPaths) {
test(`production HTTP serves the SPA for ${path}`, async ({ request }) => {
const response = await request.get(path);
expect(response.status()).toBe(200);
expect(response.headers()["content-type"]).toBe("text/html;charset=UTF-8");
expect((await response.text()).startsWith("<!doctype html>")).toBe(true);
});
}
for (const path of [
"/projects/missing-project",
"/definitely-not-a-product-route",
]) {
test(`production HTTP returns the source-exact raw 404 for ${path}`, async ({
request,
}) => {
const response = await request.get(path);
expect(response.status()).toBe(404);
expect(response.headers()["content-type"]).toBe(
"text/plain;charset=UTF-8",
);
expect(await response.body()).toEqual(Buffer.from("Not Found", "utf8"));
});
}
for (const path of ["/config.json", "/release-manifest.json"]) {
test(`production HTTP frames boot document ${path} like the reviewed preview`, async ({
request,
}) => {
const response = await request.get(path);
expect(response.status()).toBe(200);
expect(response.headers()["content-type"]).toBe("application/json");
expect(response.headers()["cache-control"]).toBe("no-cache");
expect(response.headers().vary).toBe("Origin");
expect(Number(response.headers()["content-length"])).toBe(
(await response.body()).byteLength,
);
});
}