mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 10:23:27 +00:00
- 27 Playwright E2E tests covering login (3 roles), CC Agent pages (call desk, call history, patients, appointments, my performance, sidebar, sign-out), and Supervisor pages (all 11 pages + sidebar) - Tests run against live EC2 at ramaiah.engage.healix360.net - Last test completes sign-out to release agent session for next run - Architecture doc with updated Mermaid diagram including telephony dispatcher, service discovery, and multi-tenant topology - Operations runbook with SSH access (VPS + EC2), accounts, container reference, deploy steps, Redis ops, and troubleshooting guide Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
16 lines
693 B
TypeScript
16 lines
693 B
TypeScript
import { Page, expect } from '@playwright/test';
|
|
|
|
export async function waitForApp(page: Page) {
|
|
await page.waitForLoadState('networkidle', { timeout: 15_000 }).catch(() => {});
|
|
await page.waitForTimeout(300);
|
|
}
|
|
|
|
export async function loginAs(page: Page, email: string, password: string) {
|
|
await page.goto('/login');
|
|
await page.locator('input[type="email"], input[name="email"], input[placeholder*="@"]').first().fill(email);
|
|
await page.locator('input[type="password"]').first().fill(password);
|
|
await page.getByRole('button', { name: 'Sign in', exact: true }).click();
|
|
await expect(page).not.toHaveURL(/\/login/, { timeout: 20_000 });
|
|
await waitForApp(page);
|
|
}
|