375bcfb0fa
Copies Playwright e2e tests (58 specs, 300+ tests) designed for cross-app testing. Adapts API mocks to match real Aeroflot dictionary format (title objects with multilingual keys), adds board/schedule/days endpoint mocks, and provides Angular-specific Playwright config on port 4203.
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
/**
|
|
* Playwright config for running e2e tests against the Angular app only.
|
|
* Angular runs on port 4203 with NODE_OPTIONS=--openssl-legacy-provider.
|
|
*/
|
|
export default defineConfig({
|
|
testDir: './tests/e2e-angular',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: [['html', { outputFolder: 'playwright-report-angular' }]],
|
|
outputDir: 'test-results-angular',
|
|
timeout: 45_000,
|
|
use: {
|
|
trace: 'on-first-retry',
|
|
navigationTimeout: 15_000,
|
|
},
|
|
expect: {
|
|
timeout: 15_000,
|
|
toHaveScreenshot: {
|
|
maxDiffPixelRatio: 0.05,
|
|
},
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'angular-ru-ru',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
baseURL: 'http://localhost:4203',
|
|
locale: 'ru-ru',
|
|
},
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'cd ClientApp && NODE_OPTIONS=--openssl-legacy-provider npx ng serve --port 4203',
|
|
url: 'http://localhost:4203',
|
|
reuseExistingServer: true,
|
|
timeout: 120_000,
|
|
},
|
|
});
|