feat: 운영 안정성과 세션 음성 경험 개선

This commit is contained in:
Yun Chan 2026-07-31 00:13:08 +09:00
parent facc4ad2d9
commit c788343467
95 changed files with 8431 additions and 1785 deletions

View file

@ -90,6 +90,16 @@ async function routeMvpApi(page: Page, options: RouteMvpOptions = {}) {
});
});
// 텍스트 턴 TTS는 이 fixture의 검증 대상이 아니다. 실제 8000 포트로 새지 않게
// 명시적으로 실패시키고, 음성 실패가 작성 중인 초안을 지우지 않는지만 본다.
await page.route("**/api/voice/speech", async (route) => {
await route.fulfill({
status: 503,
contentType: "application/json",
body: JSON.stringify({ detail: "voice synthesis disabled in fixture" }),
});
});
await page.route("**/api/personas", async (route) => {
await route.fulfill({
status: 200,
@ -659,11 +669,15 @@ test.describe("P1 MVP core loop", () => {
await api.streamSeen.promise;
await expect(page.locator(".sx-utt").filter({ hasText: learnerText })).toBeVisible();
await expect(page.locator(".sx-utt.is-thinking").filter({ hasText: "답변을 준비 중입니다." })).toBeVisible();
await expect(page.getByLabel("학습자 발화 입력")).toBeDisabled();
const composer = page.getByLabel("학습자 발화 입력");
await expect(composer).toBeEnabled();
await expect(page.getByRole("button", { name: "보내기" })).toBeDisabled();
await composer.fill("다음 질문을 미리 작성합니다.");
api.streamGate.resolve();
await expect(page.locator(".sx-utt").filter({ hasText: clientReply })).toBeVisible();
await expect(page.getByLabel("학습자 발화 입력")).toBeEnabled();
await expect(composer).toHaveValue("다음 질문을 미리 작성합니다.");
await expect(page.getByRole("button", { name: "보내기" })).toBeEnabled();
await page.getByRole("button", { name: "회기 종료" }).click();
await page.getByRole("button", { name: "종료하고 리뷰 보기" }).click();