운영 안정화와 화면 회귀 검증을 반영
Some checks failed
API contract / OpenAPI type drift (push) Failing after 6m2s

This commit is contained in:
Yun Chan 2026-10-20 16:33:48 +09:00
parent 6e3123091a
commit aeddaa6972
69 changed files with 3178 additions and 424 deletions

View file

@ -113,6 +113,13 @@ function rawAudioFixture() {
};
}
function isMultimodalMetadataRequest(url: URL) {
return (
url.pathname === `/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance` &&
url.searchParams.get("include_derived") === "true"
);
}
function multimodalFixture(options: { consent?: "granted" | "withdrawn" | "none" } = {}) {
const consent = options.consent ?? "granted";
const timelineId = "00000000-0000-0000-0000-000000000710";
@ -349,9 +356,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
return route.fulfill({ status: 200, contentType: "audio/wav", body: silentWav() });
},
);
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, multimodalFixture()),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, multimodalFixture()),
);
await page.goto(
@ -429,9 +435,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
return route.fulfill({ status: 403, body: "forbidden" });
},
);
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, multimodalFixture()),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, multimodalFixture()),
);
await page.goto(
@ -504,9 +509,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
}, 201);
},
);
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, multimodalFixture({ consent: "none" })),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, multimodalFixture({ consent: "none" })),
);
await page.goto(
@ -553,7 +557,7 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
await expect(sourcePersona).toHaveAttribute("aria-selected", "true");
await expectNoHorizontalOverflow(page);
await page.getByRole("button", { name: "새 회기 시작" }).click();
await page.getByRole("button", { name: "완전히 새로 시작", exact: true }).click();
await expect(page.locator(".sx-page")).toHaveAttribute("data-practice-mode", "voice");
await expect(page.getByRole("heading", { name: "음성 장면 재연습" })).toBeVisible();
const launchedUrl = new URL(page.url());
@ -571,9 +575,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance/raw-audio`,
(route) => fulfillJson(route, { detail: `raw audio ${rawStatus}` }, rawStatus),
);
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, multimodalFixture()),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, multimodalFixture()),
);
await page.goto(`/learn/session/${FILLED_REVIEW_SESSION_ID}/review`);
@ -607,9 +610,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
await route.fulfill({ status: 503, contentType: "text/plain", body: "audio unavailable" });
},
);
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, multimodalFixture()),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, multimodalFixture()),
);
await page.goto(`/learn/session/${FILLED_REVIEW_SESSION_ID}/review`);
@ -650,9 +652,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
}, 201);
},
);
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, multimodalFixture({ consent: withdrawn ? "withdrawn" : "granted" })),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, multimodalFixture({ consent: withdrawn ? "withdrawn" : "granted" })),
);
await page.goto(`/learn/session/${FILLED_REVIEW_SESSION_ID}/review`);
@ -669,9 +670,8 @@ test.describe("G7 멀티모달 동맹 오디오 시계", () => {
test("원장 없음과 API degraded를 거짓 데이터 없이 구분한다", async ({ page }) => {
await routeBaseReview(page, "learner");
let fail = false;
await page.route(
`**/api/sessions/${FILLED_REVIEW_SESSION_ID}/multimodal-alliance`,
(route) => fulfillJson(route, { detail: fail ? "ledger unavailable" : "not found" }, fail ? 503 : 404),
await page.route(isMultimodalMetadataRequest, (route) =>
fulfillJson(route, { detail: fail ? "ledger unavailable" : "not found" }, fail ? 503 : 404),
);
await page.goto(
`/learn/session/${FILLED_REVIEW_SESSION_ID}/review`,