음성 재생과 운영 배포 정리

This commit is contained in:
Yun Chan 2026-06-28 12:18:20 +09:00
parent 8ed185ce6c
commit ac7db95542
1020 changed files with 46863 additions and 2175 deletions

View file

@ -4,6 +4,7 @@ import {
expectNoHorizontalOverflow,
fetchAvailablePersona,
fetchAvailablePersonas,
completeOnboarding,
signInAsLearner,
useRealApi,
} from "./support";
@ -21,10 +22,14 @@ async function signInAsLearnerEmail(
},
});
expect(res.ok(), await res.text()).toBeTruthy();
const consent = await page.request.post("/api/auth/consent", {
data: { accepted: true },
await completeOnboarding(page, {
legal_name: displayName,
affiliation: "한신대학교",
department: "상담심리학과",
grade_level: "3학년",
phone: "010-2222-2222",
contact_address: "경기도 오산시 한신대학교",
});
expect(consent.ok(), await consent.text()).toBeTruthy();
}
async function createPracticeSession(page: import("@playwright/test").Page, personaCode?: string) {
@ -98,7 +103,7 @@ test.describe("learner app shell and session launcher", () => {
});
test("redirects an unauthenticated learner route to login", async ({ page }) => {
await page.goto("/learn");
await page.goto("/learn/practice");
await expect(page).toHaveURL(/\/login$/);
await expect(page.getByRole("button", { name: /학교 Google 계정으로 계속/ })).toBeVisible();
@ -107,7 +112,7 @@ test.describe("learner app shell and session launcher", () => {
test("renders API personas without legacy session rows", async ({ page }) => {
await signInAsLearnerEmail(page, `learner.catalog.${Date.now()}@hs.ac.kr`, "Catalog Learner");
await page.goto("/learn");
await page.goto("/learn/practice");
const personas = await fetchAvailablePersonas(page);
await expect(page.locator(".lh-root")).toBeVisible({ timeout: 15_000 });
@ -121,8 +126,8 @@ test.describe("learner app shell and session launcher", () => {
await expect(page.getByText(/12회/)).toHaveCount(0);
await expect(page.getByText(/최근 연습/)).toHaveCount(0);
await expect(page.locator(".vg-nav")).toHaveCount(0);
await expect(page.locator(".vg-main")).toHaveClass(/(^|\s)vg-main--bleed(\s|$)/);
await expect(page.locator(".vg-nav")).toBeVisible();
await expect(page.locator(".vg-main")).not.toHaveClass(/(^|\s)vg-main--bleed(\s|$)/);
await expect(page.getByText("음성")).toBeVisible();
await page.getByText("음성").scrollIntoViewIfNeeded();
await expect(page.getByText("음성")).toBeInViewport();
@ -136,7 +141,7 @@ test.describe("learner app shell and session launcher", () => {
test("routes the launcher CTA to the selected database persona", async ({ page }) => {
await signInAsLearner(page);
await page.goto("/learn");
await page.goto("/learn/practice");
const persona = await fetchAvailablePersona(page, 1);
const option = page.getByRole("option", { name: new RegExp(persona.code) });
@ -171,18 +176,45 @@ test.describe("learner app shell and session launcher", () => {
await page.goto("/learn");
await expect(page.locator(".lh-root")).toBeVisible({ timeout: 15_000 });
await expect(page.getByRole("heading", { name: "오늘 이어갈 회기를 먼저 봅니다." })).toBeVisible();
await expect(page.getByLabel("학습 현황")).toContainText("진행 회기");
await expect(page.getByLabel("학습 현황")).toContainText("2회");
await expect(page.getByLabel("학습 현황")).toContainText("리뷰 대기");
await expect(page.getByLabel("학습 현황")).toContainText("최근 평가");
await expect(page.getByLabel("최근 피드백")).toContainText("평가 피드백은 회기 종료 후 표시됩니다.");
await expect(learnerActivityHeading(page)).toBeVisible({ timeout: 15_000 });
await page.goto("/learn/history");
await expect(
page.getByRole("heading", { name: "회기 기록을 찾고 정리합니다." }),
).toBeVisible({ timeout: 15_000 });
await expect(page.locator(".lh-history-main")).toBeVisible();
await expect(page.getByLabel("기록 검색")).toBeVisible();
await expect(page.locator(".lh-history-overview")).toContainText("전체");
await expect(page.locator(".lh-history-overview")).toContainText("진행 중");
await expect(page.locator(".lh-history-overview")).toContainText("보관됨");
await expect(page.getByRole("button", { name: "이어하기" })).toBeVisible();
await expect(page.getByRole("button", { name: "기록" })).toBeVisible();
await expect(page.getByRole("button", { name: "기록", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "다시 연습" })).toHaveCount(2);
await expectReachableLearnerHomeLayout(page);
await page.locator(".lh-activity").scrollIntoViewIfNeeded();
await expect(page.locator(".lh-archive-note")).toContainText("읽기 전용");
await expectNoHorizontalOverflow(page);
await page.locator(".lh-history-main").scrollIntoViewIfNeeded();
await expect(page.getByRole("button", { name: "이어하기" })).toBeInViewport();
await expect(page.getByRole("button", { name: "기록" })).toBeInViewport();
await expect(page.getByRole("button", { name: "기록", exact: true })).toBeInViewport();
await expect(page.getByRole("button", { name: "다시 연습" }).first()).toBeInViewport();
await expect(page.locator(".lh-activity__stats")).toContainText("누적 회기");
await expect(page.locator(".lh-activity__stats")).toContainText("2");
await expect(page.locator(".lh-history-main")).toContainText("2개");
await expect(page.locator(".lh-persona-progress")).toContainText(persona.code);
await expect(page.locator(".lh-persona-progress")).toContainText("2회");
await page.getByRole("button", { name: "보관", exact: true }).click();
await expect(page.getByText("회기를 보관했습니다.")).toBeVisible();
await page.locator(".lh-history-filter").getByRole("button", { name: "보관됨" }).click();
await expect(page.locator(".lh-history-main")).toContainText("1개");
await expect(page.getByRole("button", { name: "복원" })).toBeVisible();
await page.getByRole("button", { name: "복원" }).click();
await expect(page.getByText("보관을 해제했습니다.")).toBeVisible();
await expect(page.locator(".lh-history-main")).toContainText("0개");
await page.locator(".lh-history-filter").getByRole("button", { name: "전체" }).click();
await expect(page.locator(".lh-history-main")).toContainText("2개");
await page.getByRole("button", { name: "이어하기" }).click();