Files
taxbaik/playwright.config.ts
T
kjh2064 ad6a65324a
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m29s
fix: improve login form field selection and extend playwright timeouts
Changes:
1. admin-session.js: Use name attribute selectors instead of placeholder
   - Changed: querySelector('input[placeholder="사용자명"]')
   - To: querySelector('input[name="username"]')
   - Reason: Placeholder selectors are fragile with DOM mutations

2. playwright.config.ts: Extend test timeouts for WASM boot
   - Test timeout: 120s → 180s
   - Expect timeout: 60s → 90s
   - Reason: Blazor WASM bundle takes 60-120s to boot in local dev

3. tests/e2e/admin-login.spec.ts: Increase assertion timeouts
   - Dashboard heading visibility: 20s → 60s
   - Logout link visibility: timeout added 30s

4. tests/e2e/blog-crud.spec.ts: New comprehensive blog CRUD test
   - Tests complete login flow
   - Validates localStorage token storage
   - Checks blog list page navigation

Status: Login form submission now works with proper field selection.
Remaining: Blazor WASM boot optimization needed for production.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-03 14:40:44 +09:00

42 lines
1.1 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
timeout: 180_000, // WASM 부팅 시간 포함 (최대 ~120초)
expect: {
timeout: 90_000
},
fullyParallel: !!process.env.CI,
forbidOnly: !!process.env.CI,
retries: 0,
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list',
use: {
// Green-Blue 배포 지원:
// - 로컬 Nginx: http://localhost/taxbaik (포트 무관, active 버전 자동 라우팅)
// - 원격: http://178.104.200.7/taxbaik (또는 process.env.E2E_BASE_URL)
// - CI: 환경변수로 명시적 설정 가능
baseURL: process.env.E2E_BASE_URL ?? 'http://localhost/taxbaik',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
projects: [
{
name: 'Desktop Chrome',
use: { ...devices['Desktop Chrome'] }
},
{
name: 'iPhone 12',
use: { ...devices['iPhone 12'] }
},
{
name: 'iPad Pro',
use: { ...devices['iPad Pro'] }
},
{
name: 'Galaxy S9+',
use: { ...devices['Galaxy S9+'] }
}
]
});