test: 문의 등록 e2e 검증 분리
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m19s
TaxBaik Browser E2E / browser-e2e (push) Failing after 3m32s

This commit is contained in:
2026-06-27 21:18:29 +09:00
parent e0067c6f55
commit 38e81a7514
+19 -4
View File
@@ -6,7 +6,26 @@ const password = process.env.E2E_ADMIN_PASSWORD;
const baseUrl = (process.env.E2E_BASE_URL ?? 'http://178.104.200.7/taxbaik').replace(/\/$/, '');
test.describe('contact submit', () => {
test('creates an inquiry through the public API', async ({ request }) => {
const stamp = Date.now();
const createResponse = await request.post(`${baseUrl}/api/inquiry`, {
data: {
name: `Public-${stamp}`,
phone: '010-1234-5678',
email: `public-${stamp}@example.com`,
serviceType: '기타',
message: 'Playwright로 전송한 공개 문의 테스트입니다.',
},
});
expect(createResponse.ok()).toBeTruthy();
const createBody = await createResponse.json();
expect(createBody.message).toContain('상담 신청이 접수되었습니다');
});
test('creates an inquiry and shows it in admin list', async ({ page, request }) => {
test.skip(!password, 'E2E_ADMIN_PASSWORD is required to verify the admin list.');
const stamp = Date.now();
const name = `E2E-${stamp}`;
const phone = '010-1234-5678';
@@ -23,10 +42,6 @@ test.describe('contact submit', () => {
},
});
expect(createResponse.ok()).toBeTruthy();
const createBody = await createResponse.json();
expect(createBody.message).toContain('상담 신청이 접수되었습니다');
test.skip(!password, 'E2E_ADMIN_PASSWORD is required to verify the admin list.');
const token = await getAdminToken(request, baseUrl, username, password);
await installAdminToken(page, token);