-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
71 lines (64 loc) · 1.61 KB
/
playwright.config.ts
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
62
63
64
65
66
67
68
69
70
71
import { tr } from '@faker-js/faker';
import { defineConfig, devices, firefox } from '@playwright/test';
import type { TestOptions } from './test-options';
require('dotenv').config();
export default defineConfig<TestOptions>({
timeout: 40000,
globalTimeout: 600000,
expect: {
timeout: 2000,
toMatchSnapshot: {maxDiffPixels: 50}
},
retries: 1,
reporter: [
['json', {outputFile: 'test-results/jsonReport.json'}],
['junit', {outputFile: 'test-results/junitReport.xml'}],
//['allure-playwright'],
['html']
],
use: {
globalsQaURL: 'https://www.globalsqa.com/demo-site/draganddrop/',
baseURL: process.env.DEV === '1' ? 'http://localhost:4201/'
: process.env.STAGING == '1' ? 'http://localhost:4202/'
: 'http://localhost:4200/',
trace: 'on-first-retry',
actionTimeout: 5000,
navigationTimeout: 5000,
video: {
mode: 'off',
size: {width: 1920, height: 1080}
}
},
projects: [
{
name: 'dev',
use: {
...devices['Desktop Chrome'],
baseURL: 'http://localhost:4200/'
}
},
{
name: 'chromium',
},
{
name: 'firefox',
use: {
browserName: 'firefox'
},
},
{
name: 'mobile',
testMatch: 'testMobile.spec.ts',
use: {
...devices['Galaxy S8']
}
}
],
// This config will make playwright automatically build/run demo application
// before running all the target tests (no need to manually build demo app)
webServer: {
timeout: 2 * 60 * 1000,
command: 'npm run start',
url: 'http://localhost:4200/'
}
});