vignette/apps/web/e2e
Yun Chan 4511383cd9 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영
- 전수 순회: IA 전 라우트 412개 기능 인벤토리를 체크리스트 백로그로 관리
  (docs/ops/e2e-full-sweep-2026-07-27.md), 신규 full-sweep 스펙 10파일 추가.
  RED→GREEN으로 결함 12건 수정: 관리자 무한 렌더 프리즈(TanStack autoReset
  루프), 복수 코호트 저장 유실, 페르소나 보관 503(SQL 컬럼 모호성), PII 과잉
  마스킹, /admin/ai watchdog 오탐 오버레이, 모바일 겹침 2건, 설정 스크롤
  스파이, 온보딩 전화번호 무검증, 리뷰 조사·난도 라벨, pending 피드백 등.
- 소유자 결정 구현: 설정 아바타 변경, 동의 철회·재동의 전체 흐름, 신규
  학습자 기초 우선 추천, 학생 분석 테이블 가상화(@tanstack/react-virtual),
  저작 모드 죽은 레일 정리, 감정 밸런스 타임라인 차트(deep turn_valence +
  결정론 파생 폴백).
- 디자인 감사(142차): 라이트 팔레트 AA 대비, 다크 토큰 별칭 통일, 미정의
  CSS 변수 정리, 한글 keep-all 전역화, 탭 타깃 24px, LCP preconnect.
- 검증: npm run e2e 병렬 432 수집 GREEN + 직렬 49/49 exit 0, 백엔드 pytest
  421, gateway 29, typecheck/build/design-ssot/dead-code/중복 게이트 통과,
  layout-visual-gate 15/15, session-layout 8/8. 상세는 SSOT 대시보드
  142~144차 노트.
2026-07-27 14:25:24 +09:00
..
admin.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
auth-visual.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
auth.spec.ts 음성 재생과 운영 배포 정리 2026-06-28 12:18:20 +09:00
avatar-expression-lab.spec.ts 음성 재생과 운영 배포 정리 2026-06-28 12:18:20 +09:00
avatar-expression.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
db-persistence.spec.ts Stabilize runtime auth and E2E coverage 2026-06-26 14:47:00 +09:00
dev-dashboard.spec.ts 세션 평가와 교수자 분석 보강 2026-07-01 12:10:52 +09:00
full-sweep-admin-ai.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-admin.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-auth.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-learner-home.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-persona-studio.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-professor.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-session-review.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-session.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-settings.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
full-sweep-shell.spec.ts 전수 E2E 순회·소유자 결정 6건 구현·디자인 감사 반영 2026-07-27 14:25:24 +09:00
kb-source-packs.spec.ts 세션 평가·라이브코치·교수자 분석 라운드 마감 + 문서 정리 + 코드품질 리팩터 2026-07-02 02:50:36 +09:00
layout-visual-gate.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
learner.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
live2d-assets.spec.ts 대시보드 폴드아웃/드릴다운 정리 + 페르소나 역린·misconduct 반응 + 게이트웨이 격리·RAG 비차단 수정 2026-06-27 02:30:46 +09:00
public-admin-visual.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
public-auth-turn.spec.ts Stabilize runtime auth and E2E coverage 2026-06-26 14:47:00 +09:00
readiness.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
README.md 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
session-layout.spec.ts 음성 재생과 운영 배포 정리 2026-06-28 12:18:20 +09:00
session-mvp.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
session-persistence.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
session-review-fixture.ts 운영 화면과 회기 리뷰 UI 갱신 2026-06-28 20:13:21 +09:00
session-review.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
settings.spec.ts 운영 화면과 회기 리뷰 UI 갱신 2026-06-28 20:13:21 +09:00
support.ts 한신대 피드백 개선팩 반영 2026-07-03 19:53:14 +09:00
teacher.spec.ts 전 저장소 리팩터링과 SSOT 정비 2026-07-15 21:31:30 +09:00
voice-success.spec.ts 텍스트 응답 음성 재생 연결 2026-07-13 16:09:34 +09:00
voice.spec.ts 세션 평가·라이브코치·교수자 분석 라운드 마감 + 문서 정리 + 코드품질 리팩터 2026-07-02 02:50:36 +09:00

Playwright E2E

This directory contains both full-stack E2E tests that exercise the app through the Vite /api proxy and a running local FastAPI server, and focused UI regression tests that pin states with Playwright route fixtures. Treat a test as DB-backed/real-API evidence only when the spec does not fulfill the endpoint being verified and asserts the actual API response or persisted read model.

Required local services:

# apps/api
python -m uvicorn app.main:app --host 127.0.0.1 --port 8000

# apps/web, started automatically by Playwright unless already running
npm run dev -- --host 127.0.0.1 --port 5173

Useful overrides:

PLAYWRIGHT_PORT=5174 npm run e2e
PLAYWRIGHT_BASE_URL=http://localhost:5173 npm run e2e
VITE_API_BASE=http://127.0.0.1:8000 npm run e2e

Feature evidence map:

  • session-persistence.spec.ts is the primary DB-backed evidence for session runtime flows. It covers browser openSessionStream() persistence, Korean PII masking through the browser stream into DB-backed detail/review payloads, crisis learner-only safety persistence without a client AI reply, AI tutor live coach history, source-pack metadata round-trip, voice metadata persistence, learner worksheet/review persistence, session-end evaluation storage, explicit teacher session/turn reevaluation, and manual teacher UI evaluation retry from a real failed row into durable DB state. The AI tutor history test must see status=ready and latency_ms>0; degraded fallback must not pass as normal engine-backed coaching.
  • kb-source-packs.spec.ts is DB-backed source-pack sync evidence. It checks admin-only sync and source-scoped evaluator RAG lookup for the licensed source packs; evaluator retrieval 503 is a failure, not a skipped proof.
  • session-review.spec.ts is route-fixture UI regression evidence for review states, including delayed 평가 대기 to 평가 완료 polling, 평가 실패, AI 평가 재시도, and pre/post input validation states. It does not prove that the evaluator wrote a DB row unless paired with session-persistence.spec.ts.
  • teacher.spec.ts mixes DB-backed teacher console paths with route-fixture queue/readability checks. Use the individual test body before citing it as persisted evidence.
  • session-mvp.spec.ts is mostly route-fixture UI regression evidence. The AI tutor tests mock normal coaching, stale quota refresh, quota exhaustion over an old card, degraded fallback, history load failure, and runtime persistence source to prove the UI does not show replacement coaching, missing history, stale credits, or temporary storage as a silent success; the voice tests mock the browser microphone/WebSocket to prove both a final transcript followed by turn_persistence_unavailable and a voice conversation_stopped crisis reply remain visible as failure/safety states instead of successful client turns. These are not DB-backed engine success evidence.

Public Google OAuth /turn smoke:

# 1) Verify the public API is not accidentally serving the dev runtime.
$env:E2E_PUBLIC_AUTH="1"
npx playwright test e2e/public-auth-turn.spec.ts --project=chromium-public-auth --grep "production-safe"

# 2) Open a browser, sign in with an allowed Google account, then close codegen.
npx playwright codegen https://vignette.chanpaca.net/login --save-storage=./node_modules/.tmp/public-auth.json

# 3) Reuse that authenticated storage state for the public API turn smoke.
$env:E2E_PUBLIC_AUTH="1"
$env:E2E_PUBLIC_STORAGE_STATE="./node_modules/.tmp/public-auth.json"
npx playwright test e2e/public-auth-turn.spec.ts --project=chromium-public-auth

Public admin visual smoke:

# Capture storage state after signing in with an admin-entitled Google account.
npx playwright codegen https://vignette.chanpaca.net/login --save-storage=./node_modules/.tmp/public-admin-auth.json

# Verify that https://vignette.chanpaca.net/admin visibly renders the admin console.
$env:E2E_PUBLIC_AUTH="1"
$env:E2E_PUBLIC_STORAGE_STATE="./node_modules/.tmp/public-admin-auth.json"
npx playwright test e2e/public-admin-visual.spec.ts --project=chromium-public-auth

Notes:

  • E2E_PUBLIC_AUTH=1 targets the public site and does not start the local Vite web server.
  • public-auth.json contains the HttpOnly API session cookie exported by Playwright. Treat it as sensitive and keep it under node_modules/.tmp.
  • The API session TTL is currently 8 hours, so recapture storage state when the smoke begins returning 401.

Install browser binaries once with:

npx playwright install chromium