운영 안정화와 화면 회귀 검증을 반영
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

@ -82,7 +82,7 @@ async function expectVisibleResumeLoadedSignal(page: import("@playwright/test").
async function expectReachableLearnerHomeLayout(page: import("@playwright/test").Page) {
await expect(page.locator(".lh-preview__main")).toBeVisible();
await expect(page.locator(".lh-activity")).toBeVisible();
await expect(page.getByRole("button", { name: "새 회기 시작" })).toBeInViewport();
await expect(page.getByRole("button", { name: "완전히 새로 시작", exact: true })).toBeInViewport();
const rootOverflow = await page.locator(".lh-root").evaluate((root) => {
const style = window.getComputedStyle(root);
@ -215,7 +215,7 @@ test.describe("learner app shell and session launcher", () => {
await expect(page.getByText("음성")).toBeVisible();
await page.getByText("음성").scrollIntoViewIfNeeded();
await expect(page.getByText("음성")).toBeInViewport();
await page.getByRole("button", { name: "새 회기 시작" }).scrollIntoViewIfNeeded();
await page.getByRole("button", { name: "완전히 새로 시작", exact: true }).scrollIntoViewIfNeeded();
await expectReachableLearnerHomeLayout(page);
const activityHeading = learnerActivityHeading(page);
await activityHeading.scrollIntoViewIfNeeded();
@ -232,9 +232,20 @@ test.describe("learner app shell and session launcher", () => {
await option.click();
await expect(option).toHaveAttribute("aria-selected", "true");
await page.getByRole("button", { name: "새 회기 시작" }).click();
await page.getByRole("button", { name: "완전히 새로 시작", exact: true }).click();
await expect(page).toHaveURL(new RegExp(`/learn/session/${persona.code}$`));
await expect
.poll(() => {
const url = new URL(page.url());
return {
pathname: url.pathname,
continuity: url.searchParams.get("continuity"),
};
})
.toEqual({
pathname: `/learn/session/${persona.code}`,
continuity: "fresh",
});
await expect(page.getByRole("button", { name: "회기 시작" })).toBeVisible();
// 프리플라이트(목표 선택 포함)는 좁은 뷰포트에서 세로 스크롤을 허용한다 — 데스크톱만 무스크롤 계약.
if ((page.viewportSize()?.width ?? 0) > 1180) {
@ -257,19 +268,26 @@ test.describe("learner app shell and session launcher", () => {
await signInAsLearnerEmail(page, `history.${suffix}@hs.ac.kr`);
const persona = await fetchAvailablePersona(page);
const active = await createPracticeSession(page, persona.code);
const ended = await createPracticeSession(page, persona.code);
const endResponse = await page.request.post(`/api/sessions/${ended.session_id}/end`);
expect(endResponse.ok(), await endResponse.text()).toBeTruthy();
const active = await createPracticeSession(page, persona.code);
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.getByRole("heading", { name: "오늘의 상담 연습", exact: true, level: 1 }),
).toBeVisible();
await expect(page.getByLabel("최근 피드백")).toContainText("평가 피드백은 회기 종료 후 표시됩니다.");
await page.getByRole("tab", { name: "성장 지표", exact: true }).click();
const learningStatus = page.getByLabel("학습 현황");
await expect(learningStatus).toBeVisible();
await expect(learningStatus).toContainText("전체 회기");
await expect(learningStatus).toContainText("2회");
await expect(learningStatus).toContainText("진행 중");
await expect(learningStatus).toContainText("1회");
await expect(learningStatus).toContainText("리뷰 대기");
await expect(learningStatus).toContainText("최근 평가");
await page.goto("/learn/history");
await expect(
@ -280,15 +298,17 @@ test.describe("learner app shell and session launcher", () => {
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: "이어하기", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "기록", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "다시 연습" })).toHaveCount(2);
await expect(page.getByRole("button", { name: "다음 회기 이어가기", exact: true })).toHaveCount(1);
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: "이어하기", exact: true })).toBeInViewport();
await expect(page.getByRole("button", { name: "기록", exact: true })).toBeInViewport();
await expect(page.getByRole("button", { name: "다시 연습" }).first()).toBeInViewport();
await expect(
page.getByRole("button", { name: "다음 회기 이어가기", exact: true }),
).toBeInViewport();
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회");
@ -304,7 +324,7 @@ test.describe("learner app shell and session launcher", () => {
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();
await page.getByRole("button", { name: "이어하기", exact: true }).click();
await expect(page).toHaveURL(new RegExp(`/learn/session/${active.session_id}$`));
await expect(page.locator(".sx-page.sx-page--active")).toBeVisible();