-
Notifications
You must be signed in to change notification settings - Fork 47
/
wdio.visual.conf.js
112 lines (111 loc) · 3.04 KB
/
wdio.visual.conf.js
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
const visualOptions = {
apiKey: process.env.SCREENER_API_KEY,
projectName: 'comprehensive-testing',
failOnNewStates: false
};
const sauceOptions = {
// user,key have to be here for visual
username: process.env.SAUCE_USERNAME,
accesskey: process.env.SAUCE_ACCESS_KEY,
extendedDebugging: true,
capturePerformance: true,
};
exports.config = {
region: process.env.REGION || 'us',
runner: 'local',
services: [
['sauce', {
sauceConnect: true,
sauceConnectOpts: {
noSslBumpDomains: 'all',
region: process.env.REGION || 'us-west'
},
}]
],
specs: [
'./test/specs/**/visual*.js'
],
// Patterns to exclude.
exclude: [
// 'path/to/excluded/files'
],
//
// ============
// Capabilities
// ============
maxInstances: 100,
//Screener config
hostname: 'hub.screener.io',
port: 443,
protocol: 'https',
path: '/wd/hub',
capabilities: [
//Desktop A 28%: https://www.w3schools.com/browsers/browsers_display.asp
{
browserName: 'chrome',
platformName: 'windows 10',
browserVersion: 'latest',
'sauce:options': {
...sauceOptions,
},
'sauce:visual': {
...visualOptions,
viewportSize: '1366x768'
}
},
// {
// browserName: 'safari',
// platformName: 'macOS 10.15',
// browserVersion: 'latest',
// 'sauce:options': {
// ...sauceOptions,
// },
// 'sauce:visual': {
// ...visualOptions,
// viewportSize: '1366x768'
// }
// },
// // https://yesviz.com/iphones.php
// // iphone12
// {
// browserName: 'safari',
// platformName: 'macOS 10.15',
// browserVersion: 'latest',
// 'sauce:options': {
// ...sauceOptions,
// },
// 'sauce:visual': {
// ...visualOptions,
// viewportSize: '390x844'
// }
// },
// //12 pro max
// {
// browserName: 'safari',
// platformName: 'macOS 10.15',
// browserVersion: 'latest',
// 'sauce:options': {
// ...sauceOptions,
// },
// 'sauce:visual': {
// ...visualOptions,
// viewportSize: '428x926'
// }
// }
],
// Level of logging verbosity: trace | debug | info | warn | error | silent
logLevel: 'error',
bail: 0,
baseUrl: 'http://localhost:3000',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
//set at least this timeout since visual snapshots can take up to 45 sec
//https://docs.saucelabs.com/visual/e2e-testing/setup/#useful-settings
timeout: 180000,
},
}