Files
taxbaik/playwright.config.ts
T
kjh2064 0d07b2d26a fix: make API client base URL configurable for green-blue deployments
Previously, all browser clients (AdminDashboardClient, InquiryBrowserClient, etc.)
had hardcoded BaseAddress of http://localhost:5001/taxbaik/api/. This caused
issues when implementing green-blue deployments where ports alternate between
5001/5002.

Changes:
- Add ApiClient:BaseUrl configuration in appsettings.json (default: 5001)
- Update Program.cs to read configuration instead of hardcoding
- All 6 browser clients now use dynamic configuration
- Deployment script prepared for green-blue support (port can be injected via
  ApiClient__BaseUrl environment variable)

Deployment Note:
- For green-blue: Set ApiClient__BaseUrl environment variable before starting
  the service on the alternate port (5002)
- Nginx still routes /taxbaik to the active instance
- Supports zero-downtime deployments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 11:28:22 +09:00

38 lines
865 B
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: {
baseURL: process.env.E2E_BASE_URL ?? 'http://178.104.200.7/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+'] }
}
]
});