사용자 매뉴얼·번호알기·gov-portal 대시보드와 메뉴 동선·수불 리포트를 보강한다.

- 사용자 매뉴얼: league/commonmark 기반 bag/manual(로그인 전용),
  ManualRenderer + Config\Manual manifest, 콘텐츠 8종, E2E
- 번호알기(봉투번호확인): bag/number-lookup, BagNumberLookup, E2E
- gov-portal 대시보드 시안(기본/strip)·기본코드관리 화면
- 메뉴 관리: 등록·수정 후 메뉴 화면 유지, 수정 버튼 클릭 시 상단 스크롤
- 수불/분석 리포트(LOT 수불·반품/파기·수급계획·추이) 표시 보강
- .gitignore: docs/ → /docs/ 앵커링(최상위 개발문서만 제외, app/Docs는 추적)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
taekyoungc
2026-06-08 00:46:51 +09:00
parent 0f1d414f37
commit 8763876f19
77 changed files with 6139 additions and 182 deletions

41
e2e/manual.spec.js Normal file
View File

@@ -0,0 +1,41 @@
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('미등록 slug 는 404', async ({ page }) => {
await login(page, 'user');
const res = await page.goto('/bag/manual/does-not-exist');
expect(res.status()).toBe(404);
});
});

View File

@@ -240,16 +240,27 @@ test.describe('P5-08: 반품/파기 현황', () => {
test('기간·입출고 조회 및 엑셀', async ({ page }) => {
await loginAsLocal(page);
await page.goto('/bag/reports/returns?search=1&start_date=2026-01-01&end_date=2026-12-31&io_type=out');
await page.goto('/bag/reports/returns?search=1&start_date=2026-05-01&end_date=2026-05-31&io_type=out');
await expect(page.locator('table.data-table')).toBeVisible();
await expect(page.locator('table.data-table tbody tr').first()).not.toContainText('해당 자료가 없습니다');
await expect(page.getByText('반품').first()).toBeVisible();
await expect(page.getByRole('link', { name: '엑셀저장' })).toBeVisible();
const res = await page.request.get(
'/bag/reports/returns/export?search=1&start_date=2026-01-01&end_date=2026-12-31&io_type=out'
'/bag/reports/returns/export?search=1&start_date=2026-05-01&end_date=2026-05-31&io_type=out'
);
expect(res.status()).toBe(200);
const ct = (res.headers()['content-type'] || '').toLowerCase();
expect(ct).toContain('application/vnd.ms-excel');
});
test('5월 입고(파기) 조회', async ({ page }) => {
await loginAsLocal(page);
await page.goto('/bag/reports/returns?search=1&start_date=2026-05-01&end_date=2026-05-31&io_type=in');
await expect(page.locator('table.data-table')).toBeVisible();
await expect(page.locator('table.data-table tbody tr').first()).not.toContainText('해당 자료가 없습니다');
await expect(page.getByText('물류창고')).toBeVisible();
await expect(page.getByText('파기').first()).toBeVisible();
});
});
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

37
e2e/number-lookup.spec.js Normal file
View File

@@ -0,0 +1,37 @@
// @ts-check
const { test, expect } = require('@playwright/test');
const { login } = require('./helpers/auth');
test.describe('번호알기 (봉투번호확인)', () => {
test.beforeEach(async ({ page }) => {
await login(page, 'local');
});
test('페이지 로드 및 기본 UI', async ({ page }) => {
await page.goto('/bag/number-lookup');
await expect(page).toHaveURL(/\/bag\/number-lookup/);
await expect(page.locator('#numLookupTitle')).toHaveText(/봉투번호확인/);
await expect(page.locator('#codeInput')).toBeVisible();
await expect(page.locator('#barcodeOut')).toHaveText(/- - - -/);
await expect(page.locator('#printOut')).toHaveText(/- - -/);
await expect(page.locator('#recognitionOut')).toHaveText(/- -/);
});
test('LOT-팩-낱장 코드 조회', async ({ page }) => {
await page.goto('/bag/number-lookup');
await page.fill('#codeInput', 'OQXCKH-000008-P299-S00125');
await page.click('button.num-lookup-btn-primary');
await expect(page).toHaveURL(/code=OQXCKH-000008-P299-S00125/);
await expect(page.locator('#barcodeOut')).toContainText('OQXCKH');
await expect(page.locator('#barcodeOut')).toContainText('P299');
await expect(page.locator('#printOut')).toContainText('8');
await expect(page.locator('#recognitionOut')).toContainText('P299');
});
test('도움말에서 번호알기 링크', async ({ page }) => {
await page.goto('/bag/help');
await page.click('a[href*="bag/number-lookup"]');
await expect(page).toHaveURL(/\/bag\/number-lookup/);
});
});