-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
61 lines (58 loc) · 1.74 KB
/
playwright.config.js
File metadata and controls
61 lines (58 loc) · 1.74 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
59
60
61
// @ts-check
const { defineConfig, devices } = require('@playwright/test');
const path = require('path');
module.exports = defineConfig({
testDir: './tests',
timeout: 30_000,
retries: 0,
reporter: [['list'], ['html', { open: 'never' }]],
use: {
/* Serve index.html directly via file:// so no server is needed */
baseURL: 'file://' + path.resolve(__dirname, 'index.html'),
headless: true,
screenshot: 'only-on-failure',
video: 'off',
},
projects: [
/* Desktop sizes */
{
name: 'desktop-1920x1080',
use: { ...devices['Desktop Chrome'], viewport: { width: 1920, height: 1080 } },
},
{
name: 'desktop-1440x900',
use: { ...devices['Desktop Chrome'], viewport: { width: 1440, height: 900 } },
},
{
name: 'desktop-1280x800',
use: { ...devices['Desktop Chrome'], viewport: { width: 1280, height: 800 } },
},
/* Tablet sizes */
{
name: 'tablet-1024x768',
use: { ...devices['Desktop Chrome'], viewport: { width: 1024, height: 768 } },
},
{
name: 'tablet-portrait-768x1024',
use: { ...devices['Desktop Chrome'], viewport: { width: 768, height: 1024 } },
},
/* Mobile sizes */
{
name: 'mobile-portrait-390x844',
use: { ...devices['Desktop Chrome'], viewport: { width: 390, height: 844 } },
},
{
name: 'mobile-landscape-844x390',
use: { ...devices['Desktop Chrome'], viewport: { width: 844, height: 390 } },
},
{
name: 'mobile-small-360x640',
use: { ...devices['Desktop Chrome'], viewport: { width: 360, height: 640 } },
},
/* Ultrawide */
{
name: 'ultrawide-2560x1080',
use: { ...devices['Desktop Chrome'], viewport: { width: 2560, height: 1080 } },
},
],
});