mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 10:23:27 +00:00
- 13 Global Hospital smoke tests (CC Agent + Supervisor) - Auto-unlock agent session in test setup via maint API - agent-status-toggle sends agentId from localStorage (was missing) - maint-otp-modal injects agentId from localStorage into all calls - SIP manager logs agent identity on connect/disconnect/state changes - seed-data.ts: added CC agent + marketing users, idempotent member creation, cleanup phase before seeding - .gitignore: exclude test-results/ and playwright-report/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
66 lines
2.0 KiB
TypeScript
66 lines
2.0 KiB
TypeScript
import { defineConfig } from '@playwright/test';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
retries: 1,
|
|
workers: 1,
|
|
reporter: [['html', { open: 'never' }], ['list']],
|
|
use: {
|
|
baseURL: process.env.E2E_BASE_URL ?? 'https://ramaiah.engage.healix360.net',
|
|
headless: true,
|
|
screenshot: 'on',
|
|
trace: 'on-first-retry',
|
|
actionTimeout: 8_000,
|
|
navigationTimeout: 15_000,
|
|
},
|
|
projects: [
|
|
// Login tests run first — fresh browser, no saved auth
|
|
{
|
|
name: 'login',
|
|
testMatch: /agent-login\.spec\.ts/,
|
|
use: { browserName: 'chromium' },
|
|
},
|
|
// Auth setup — saves CC agent session for reuse
|
|
{
|
|
name: 'agent-setup',
|
|
testMatch: /auth\.setup\.ts/,
|
|
},
|
|
// CC Agent feature tests — reuse saved auth
|
|
{
|
|
name: 'cc-agent',
|
|
dependencies: ['agent-setup'],
|
|
use: {
|
|
storageState: path.join(__dirname, 'e2e/.auth/agent.json'),
|
|
browserName: 'chromium',
|
|
},
|
|
testMatch: /agent-smoke\.spec\.ts/,
|
|
},
|
|
// Supervisor tests — logs in fresh each run
|
|
{
|
|
name: 'supervisor',
|
|
testMatch: /supervisor-smoke\.spec\.ts/,
|
|
use: { browserName: 'chromium' },
|
|
},
|
|
// Global Hospital — auth setup + smoke tests
|
|
{
|
|
name: 'global-setup',
|
|
testMatch: /global-setup\.ts/,
|
|
},
|
|
{
|
|
name: 'global',
|
|
dependencies: ['global-setup'],
|
|
testMatch: /global-smoke\.spec\.ts/,
|
|
use: {
|
|
storageState: path.join(__dirname, 'e2e/.auth/global-agent.json'),
|
|
browserName: 'chromium',
|
|
},
|
|
},
|
|
],
|
|
});
|