52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
import { getEnvironmentConfig } from './shared/config/environments';
|
|
import { CustomReporter } from './shared/utils/reporting/CustomReporter';
|
|
|
|
const config = defineConfig({
|
|
testDir: './dev-audit',
|
|
fullyParallel: false,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: 1,
|
|
timeout: 30000,
|
|
reporter: [
|
|
['html', { outputFolder: 'test-framework/reports/html', open: 'never' }],
|
|
['json', { outputFile: 'test-framework/reports/results.json' }],
|
|
['junit', { outputFile: 'test-framework/reports/results.xml' }],
|
|
['list']
|
|
],
|
|
use: {
|
|
baseURL: getEnvironmentConfig(process.env.TEST_ENV || 'development').baseURL,
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
launchOptions: {
|
|
args: ['--disable-dev-shm-usage', '--no-sandbox']
|
|
}
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
{
|
|
name: 'webkit',
|
|
use: { ...devices['Desktop Safari'] },
|
|
},
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: { ...devices['Pixel 5'] },
|
|
},
|
|
{
|
|
name: 'Mobile Safari',
|
|
use: { ...devices['iPhone 12'] },
|
|
}
|
|
]
|
|
});
|
|
|
|
export default config;
|