Files
jongryangje/e2e/manual.spec.js
taekyoungc 4d9343e980 feat: GBLS 리브랜딩 + 매뉴얼 보강 + 워크스페이스/코드관리 UX 개선
리브랜딩
- 서비스명 "종량제 시스템" → "GBLS", 헤더 로고에 풀네임(Garbage Bag Logistics System) 병기
  (gov-portal·공통 브랜드·로그인/welcome 셸·타이틀·푸터 전반)

매뉴얼
- 신규 페이지 [로그인·회원가입·계정](01_account.md): 가입 항목·관리자 승인·2차 인증 흐름
- [화면 구성·워크스페이스·단축키]에 계정 전환 시 탭 초기화 안내 추가

워크스페이스(탭)
- 탭 전환 시 좌측 사이드바 강조 동기화(메뉴 없는 화면은 강조 해제, 경로 폴백 매칭)
- 소메뉴 좌측 아이콘(▸/·) 전부 제거 — 활성 메뉴는 배경 강조로만 구분
- 탭을 사용자(mb_idx)별로 격리: 다른 아이디 로그인 시 이전 탭 복원 안 함
- 사이드바 FAQ 링크 제거(자주 묻는 질문은 매뉴얼에 통합)

기본 코드관리 화면
- 업무현황 카드 스타일로 재디자인(가벼운 표·상태/범위 pill·단일 구분선)
- render()에 $bare 옵션 추가 → 이미 카드형인 화면은 바깥 래퍼 생략

기타
- .claude/settings.local.json(개인 권한 설정) .gitignore 추가
- e2e: 워크스페이스(동기화·계정격리) + 매뉴얼(계정·단축키·검색) 케이스 보강

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 14:43:24 +09:00

71 lines
3.0 KiB
JavaScript

const { test, expect } = require('@playwright/test');
const { login } = require('./helpers/auth');
/**
* 사용자 매뉴얼(bag/manual) E2E
* - 비로그인 차단(loginAuth)
* - 로그인 후 목차/본문 렌더
* - 목차 이동(표 렌더)
* - 미등록 slug 404
*/
test.describe('사용자 매뉴얼', () => {
test('비로그인 시 로그인으로 이동', async ({ page }) => {
await page.goto('/bag/manual');
await expect(page).toHaveURL(/\/login/);
});
test('로그인 후 매뉴얼 첫 페이지(개요) 렌더 + 목차 노출', async ({ page }) => {
await login(page, 'user');
await page.goto('/bag/manual');
// manual 첫 slug(overview)로 이동
await expect(page).toHaveURL(/\/bag\/manual\/overview/);
// 좌측 목차
await expect(page.locator('.manual-toc')).toBeVisible();
await expect(page.locator('.manual-toc a', { hasText: '핵심 업무 흐름' })).toBeVisible();
// 본문
await expect(page.locator('.manual-prose h1')).toContainText('시스템 개요');
});
test('목차에서 코드체계 페이지로 이동 → 표 렌더', async ({ page }) => {
await login(page, 'user');
await page.goto('/bag/manual/codes');
await expect(page.locator('.manual-prose table').first()).toBeVisible();
await expect(page.locator('.manual-prose')).toContainText('바코드');
});
test('로그인·회원가입 페이지 렌더 + 승인/2차인증 안내', async ({ page }) => {
await login(page, 'user');
await page.goto('/bag/manual/account');
await expect(page.locator('.manual-prose h1')).toContainText('회원가입');
await expect(page.locator('.manual-prose')).toContainText('승인');
await expect(page.locator('.manual-prose')).toContainText('2차 인증');
await expect(page.locator('.manual-toc a', { hasText: '로그인·회원가입' })).toBeVisible();
});
test('워크스페이스·단축키 페이지 렌더 + 단축키 표 노출', async ({ page }) => {
await login(page, 'user');
await page.goto('/bag/manual/workspace');
await expect(page.locator('.manual-prose h1')).toContainText('워크스페이스');
// 단축키 표 내용 확인
await expect(page.locator('.manual-prose')).toContainText('Alt + W');
await expect(page.locator('.manual-prose')).toContainText('다음 탭');
// 목차에도 새 항목 노출
await expect(page.locator('.manual-toc a', { hasText: '워크스페이스' })).toBeVisible();
});
test('매뉴얼 검색이 단축키 내용을 찾음', async ({ page }) => {
await login(page, 'user');
await page.goto('/bag/manual/overview');
await page.locator('#manualSearchInput').fill('단축키');
await page.waitForTimeout(700);
await expect(page.locator('#manualSearchResults')).toBeVisible();
await expect(page.locator('#manualSearchResults')).toContainText('워크스페이스');
});
test('미등록 slug 는 404', async ({ page }) => {
await login(page, 'user');
const res = await page.goto('/bag/manual/does-not-exist');
expect(res.status()).toBe(404);
});
});