Fix admin routing and Playwright smoke checks
TaxBaik CI/CD / build-and-deploy (push) Successful in 5m22s

This commit is contained in:
2026-07-04 23:07:16 +09:00
parent fd5178b118
commit 7002d50a4e
30 changed files with 95 additions and 59 deletions
+2 -8
View File
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test';
import { loginThroughAdminUi } from './helpers/admin-auth';
const username = process.env.E2E_ADMIN_USERNAME ?? 'admin';
const password = process.env.E2E_ADMIN_PASSWORD;
@@ -8,17 +9,10 @@ test.describe('blog CRUD operations', () => {
test('complete blog creation, read, update, delete flow', async ({ page }) => {
test.skip(!password, 'E2E_ADMIN_PASSWORD is required.');
// localStorage 초기화 (이전 테스트의 상태 제거)
await page.goto(`${baseUrl}/admin/login`);
await page.evaluate(() => localStorage.clear());
// 1. 로그인
await page.locator('input[name="username"]').fill(username);
await page.locator('input[name="password"]').fill(password);
await page.getByRole('button', { name: '로그인' }).click();
// 대시보드로 리다이렉트 대기 (더 긴 타임아웃)
await page.waitForURL('**/admin/dashboard', { timeout: 30_000 });
await loginThroughAdminUi(page, baseUrl, username, password);
console.log('✓ Logged in and redirected to dashboard');
// 2. 블로그 페이지로 이동