PSA/server/playwright.config.ts
Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

72 lines
2.4 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
const PORT = process.env.PORT || '3000';
const BASE_URL = process.env.BASE_URL || `http://localhost:${PORT}`;
export default defineConfig({
testDir: './src/test/e2e',
testMatch: ['**/*.playwright.test.ts'],
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
reporter: [['list'], ['html', { open: 'never' }]],
timeout: 120000,
use: {
baseURL: BASE_URL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 15000,
navigationTimeout: 30000,
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
launchOptions: {
headless: false,
},
},
},
],
webServer: process.env.CI ? undefined : {
command: 'npm run dev',
url: BASE_URL,
reuseExistingServer: process.env.PW_REUSE !== 'false',
timeout: 120000,
env: {
...process.env,
// Playwright runs need a writable tenant secret store (env provider is read-only).
// Keep app secrets in env while writing tenant secrets to an isolated filesystem directory.
SECRET_READ_CHAIN: process.env.SECRET_READ_CHAIN || 'filesystem,env',
SECRET_WRITE_PROVIDER: process.env.SECRET_WRITE_PROVIDER || 'filesystem',
SECRET_FS_BASE_PATH: process.env.SECRET_FS_BASE_PATH || 'secrets-playwright',
// Database configuration
DB_TYPE: 'postgres',
DB_HOST: process.env.DB_HOST || 'localhost',
DB_PORT: process.env.DB_PORT || '5432',
DB_NAME_SERVER: process.env.DB_NAME_SERVER || 'ticket_response_state_test',
DB_USER_SERVER: process.env.DB_USER_SERVER || 'app_user',
DB_USER_ADMIN: process.env.DB_USER_ADMIN || 'postgres',
DB_PASSWORD_SERVER: process.env.DB_PASSWORD_SERVER || 'postpass123',
DB_PASSWORD_ADMIN: process.env.DB_PASSWORD_ADMIN || 'postgres',
// Auth configuration
E2E_AUTH_BYPASS: 'true',
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET || 'test-nextauth-secret',
NEXTAUTH_URL: `http://localhost:${PORT}`,
// App configuration
APP_NAME: 'alga-psa-test',
APP_ENV: 'test',
NODE_ENV: 'development',
PORT: PORT,
// Keep Tactical RMM UI visible in Playwright runs even when PostHog is not configured.
NEXT_PUBLIC_FORCE_FEATURE_FLAGS: process.env.NEXT_PUBLIC_FORCE_FEATURE_FLAGS || 'tactical-rmm-integration:true',
},
},
});