700cdaed4f
TaxBaik CI/CD / build-and-deploy (push) Successful in 47s
Green-Blue 배포에서 E2E 테스트가 항상 새 버전을 테스트하도록 개선: Changes: - E2E_BASE_URL default: http://localhost/taxbaik (Nginx 라우팅 → active 포트) - 이전: http://localhost:5001/taxbaik (하드코드, 구 버전 테스트 위험) - CI/E2E 워크플로우: test_admin 계정으로 변경 (실 admin 분리) - Playwright config 주석 명확화 (Green-Blue 배포 지원) - 로컬 테스트: Nginx 거쳐서 또는 명시적 포트 설정 Architecture: ┌─────────────────────────┐ │ E2E Test Runner │ │ (test_admin account) │ └────────────┬────────────┘ │ E2E_BASE_URL (env var) │ ┌────────┴────────┐ │ │ http://localhost/ http://localhost:5001/ taxbaik (Nginx) taxbaik (direct) │ │ ┌──▼──┐ │ │Nginx├─────────────┘ └──┬──┘ │ (active port: 5001 or 5002) │ ┌──▼──────────────┐ │Active TaxBaik │ │(5001 or 5002) │ └─────────────────┘ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
timeout: 30_000,
|
|
expect: {
|
|
timeout: 10_000
|
|
},
|
|
fullyParallel: false,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 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+'] }
|
|
}
|
|
]
|
|
});
|