-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
44 lines (41 loc) · 1.18 KB
/
playwright.config.ts
File metadata and controls
44 lines (41 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* eslint-env node */
import { defineConfig, devices } from '@playwright/test';
import * as dotenv from 'dotenv';
dotenv.config();
export default defineConfig({
testDir: './tests',
timeout: 180000,
expect: { timeout: 10000 },
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI
? [
['html', { outputFolder: 'playwright-report', open: 'never' }],
['allure-playwright', { outputFolder: 'allure-results' }],
]
: [
['html'],
['allure-playwright', { outputFolder: 'allure-results' }],
],
use: {
baseURL: process.env.BASE_URL || 'https://www.21vek.by',
actionTimeout: 15000,
navigationTimeout: 45000,
screenshot: { mode: 'only-on-failure', fullPage: true },
video: { mode: 'retain-on-failure', size: { width: 1366, height: 768 } },
trace: 'on-first-retry',
viewport: { width: 1366, height: 768 },
ignoreHTTPSErrors: true,
bypassCSP: true,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
outputDir: 'test-results',
testMatch: /.*\.spec\.ts/,
preserveOutput: 'failures-only',
});