forked from testdino-hq/playwright-sample-tests-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
58 lines (53 loc) · 1.35 KB
/
playwright.config.js
File metadata and controls
58 lines (53 loc) · 1.35 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// @ts-check
import { defineConfig, devices } from '@playwright/test';
const isCI = !!process.env.CI;
export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: isCI,
retries: isCI ? 1 : 0,
workers: isCI ? 1 : 1,
timeout: 60 * 1000,
reporter: [
['html', {
outputFolder: 'playwright-report',
open: 'never'
}],
['blob', { outputDir: 'blob-report' }], // Blob reporter for merging
['json', { outputFile: './playwright-report/report.json' }],
],
use: {
baseURL: 'https://demo.alphabin.co/',
headless: true,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
grep: /@chromium/, // only run tests tagged @chromium
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
grep: /@firefox/, // only run tests tagged @firefox
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
grep: /@webkit/, // only run tests tagged @webkit
},
{
name: 'android',
use: { ...devices['Pixel 5'] },
grep: /@android/, // only run tests tagged @android
},
{
name: 'ios',
use: { ...devices['iPhone 12'] },
grep: /@ios/, // only run tests tagged @ios
},
],
});