P2-07~14 판매대행소/담당자/업체/무료대상자 CRUD 일괄 구현

- 4개 테이블 생성 (sales_agency, manager, company, free_recipient)
- 4개 Model + 4개 Controller + 12개 View
- 담당자: 소속(S)/직위(T) 코드 연동
- 업체: 협회/제작업체/회수업체 유형 분류
- 무료대상자: 무상지급구분(H)/동코드(D) 연동
- 모두 지자체별 멀티테넌시 적용
- 24개 라우트 추가
- E2E 테스트 9개 전체 통과

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
javamon1174
2026-03-25 17:41:15 +09:00
parent b453b970d4
commit da132f0e51
26 changed files with 1400 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
// @ts-check
const { test, expect } = require('@playwright/test');
const { login } = require('./helpers/auth');
async function loginAsAdmin(page) {
await login(page, 'admin');
await page.locator('input[name="lg_idx"]').first().check();
await page.click('button[type="submit"]');
await page.waitForURL(url => !url.pathname.includes('select-local-government'), { timeout: 15000 });
}
async function loginAsLocal(page) {
await login(page, 'local');
}
test.describe('P2-07/08: 판매 대행소 관리', () => {
test('목록 접근 (Super Admin)', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/sales-agencies');
await expect(page).toHaveURL(/\/admin\/sales-agencies/);
});
test('등록 폼 표시', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/sales-agencies/create');
await expect(page.locator('input[name="sa_name"]')).toBeVisible();
});
test('지자체관리자 접근', async ({ page }) => {
await loginAsLocal(page);
await page.goto('/admin/sales-agencies');
await expect(page).toHaveURL(/\/admin\/sales-agencies/);
});
});
test.describe('P2-09/10: 담당자 관리', () => {
test('목록 접근', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/managers');
await expect(page).toHaveURL(/\/admin\/managers/);
});
test('등록 폼 표시', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/managers/create');
await expect(page.locator('input[name="mg_name"]')).toBeVisible();
});
});
test.describe('P2-11/12: 업체 관리', () => {
test('목록 접근', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/companies');
await expect(page).toHaveURL(/\/admin\/companies/);
});
test('등록 폼 표시', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/companies/create');
await expect(page.locator('select[name="cp_type"]')).toBeVisible();
await expect(page.locator('input[name="cp_name"]')).toBeVisible();
});
});
test.describe('P2-13/14: 무료용 대상자 관리', () => {
test('목록 접근', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/free-recipients');
await expect(page).toHaveURL(/\/admin\/free-recipients/);
});
test('등록 폼 표시', async ({ page }) => {
await loginAsAdmin(page);
await page.goto('/admin/free-recipients/create');
await expect(page.locator('select[name="fr_type_code"]')).toBeVisible();
await expect(page.locator('input[name="fr_name"]')).toBeVisible();
});
});