-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
30 lines (28 loc) · 1.49 KB
/
playwright.config.js
File metadata and controls
30 lines (28 loc) · 1.49 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
// @ts-check
const { defineConfig, devices } = require('@playwright/test');
const path = require('path');
const htmlFile = 'file:///' + path.resolve(__dirname, 'app/src/main/assets/index.html').replace(/\\/g, '/');
/** @type {import('@playwright/test').PlaywrightTestConfig} */
module.exports = defineConfig({
testDir: './tests',
timeout: 15000,
retries: 0,
reporter: 'list',
use: {
browserName: 'chromium',
screenshot: 'only-on-failure',
htmlFile,
},
projects: [
// ---- Small phones ----
{ name: 'iPhone SE', use: { viewport: { width: 375, height: 667 }, deviceScaleFactor: 2, isMobile: true, hasTouch: true } },
// ---- Mid-size phones ----
{ name: 'Pixel 5', use: { viewport: { width: 393, height: 851 }, deviceScaleFactor: 2.75, isMobile: true, hasTouch: true } },
{ name: 'Galaxy S9+', use: { viewport: { width: 360, height: 740 }, deviceScaleFactor: 4, isMobile: true, hasTouch: true } },
// ---- Large phones ----
{ name: 'iPhone 14 Pro Max', use: { viewport: { width: 430, height: 932 }, deviceScaleFactor: 3, isMobile: true, hasTouch: true } },
{ name: 'Pixel 7', use: { viewport: { width: 412, height: 915 }, deviceScaleFactor: 2.625, isMobile: true, hasTouch: true } },
// ---- Narrow budget phone ----
{ name: 'Narrow 320px', use: { viewport: { width: 320, height: 568 }, deviceScaleFactor: 2, isMobile: true, hasTouch: true } },
],
});