Files
tech-log-frontend/tests/e2e/tech-log-studio-workflow.spec.ts
DongHyeonka db69e5203b test(e2e): Studio 작업 흐름 시험을 fixture 시계로 돌린다
tech-log-studio-workflow.spec.ts만 page.goto로 들어가 실제 시계를 쓴다.
mock 저장본의 검증 결과는 2026-08-14 09:40~10:10 KST에만 유효해서,
실제 시각에서는 「지난 결과 · 저장 후 다시 검증해야 합니다」가 나오고
「현재 저장 버전의 검증을 통과했습니다」를 찾지 못해 떨어진다. 로그인도
하지 않았다.

다른 Studio 시험처럼 gotoTechLogStudio(fixture 시계 2026-08-14T01:00Z,
reduced motion, 데모 로그인)로 들어간다.

검증: 두 시험이 chromium·firefox·webkit 모두 통과한다.
2026-11-12 15:03:16 +09:00

79 lines
2.8 KiB
TypeScript

import { FIXTURE_IDS } from "../../src/features/tech-log/adapters/mock/fixtures.ts";
import { expect, test } from "../support/browser/strict-browser-test.ts";
import { gotoTechLogStudio } from "../support/browser/tech-log-fixtures.ts";
// The mock validation of a saved version is valid for 30 minutes on
// 2026-08-14, so these run on the fixture clock (`gotoTechLogStudio`), like
// every other Studio browser test; on the real clock the result reads as stale.
test("validates, previews, publishes, and unpublishes one Studio working copy", async ({
page,
}) => {
await gotoTechLogStudio(
page,
`/studio/documents/${FIXTURE_IDS.stateNonceReference}/validation`,
);
await expect(
page.getByText("현재 저장 버전의 검증을 통과했습니다"),
).toBeVisible();
await page.getByRole("link", { name: "Public Preview 만들기" }).click();
await page
.getByRole("button", { name: "Public Preview 만들기" })
.click();
await expect(
page.getByText("현재 저장 버전의 Public Preview입니다."),
).toBeVisible();
await page.getByRole("link", { name: "게시 준비로 이동" }).click();
await page.getByRole("button", { name: "게시" }).click();
await expect(page).toHaveURL(
/\/studio\/publications\/[0-9a-f-]+\/preview$/,
);
await expect(
page.getByRole("heading", {
level: 1,
name: "Authorization Code Flow에서 state와 nonce의 경계",
}),
).toBeVisible();
await page.getByRole("link", { name: "게시 기록으로 돌아가기" }).click();
await page
.getByRole("button", {
name: /Authorization Code Flow에서 state와 nonce의 경계 게시 취소/,
})
.click();
await expect(
page.getByRole("dialog", { name: "게시를 취소할까요?" }),
).toContainText("작업본과 이전 Snapshot은 보존됩니다.");
await page.getByRole("button", { name: "게시 취소 확인" }).click();
await expect(page.getByRole("status")).toContainText(
"게시를 취소했습니다.",
);
});
test("renders an immutable historical snapshot and Studio-local missing event", async ({
page,
}) => {
await gotoTechLogStudio(
page,
`/studio/publications/${FIXTURE_IDS.fetchPublishedEvent}/preview`,
);
await expect(
page.getByText(/반환된 20건 뒤에서 전체 컬렉션이 로드되는 과정/),
).toBeVisible();
await expect(
page.getByText("게시 후 본문 측정값을 보완한 저장본입니다."),
).toHaveCount(0);
await gotoTechLogStudio(
page,
"/studio/publications/99999999-9999-4999-8999-999999999999/preview",
);
await expect(
page.getByRole("heading", { name: "게시 기록을 찾을 수 없습니다" }),
).toBeVisible();
await expect(
page.getByRole("navigation", { name: "Studio 주 탐색" }),
).toBeVisible();
});