-
Notifications
You must be signed in to change notification settings - Fork 155
/
wct.conf.js
96 lines (85 loc) · 2.84 KB
/
wct.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
const suites = require('./test/test-suites');
var envIndex = process.argv.indexOf('--env') + 1;
var env = envIndex ? process.argv[envIndex] : undefined;
var suitesIndex = process.argv.indexOf('--suites') + 1;
var suitesParam = suitesIndex ? process.argv[suitesIndex] : undefined;
module.exports = {
testTimeout: 360 * 1000,
verbose: true,
plugins: {
local: {
browserOptions: {
chrome: [
'headless',
'disable-gpu',
'no-sandbox'
]
}
}
},
registerHooks: function(context) {
if (suitesParam) {
context.options.suites = suites[suitesParam] || [];
} else {
context.options.suites = suites.all;
}
const saucelabsPlatformsMobile = [
'iOS Simulator/[email protected]',
'iOS Simulator/[email protected]'
];
const saucelabsPlatformsDesktop = [
'macOS 10.13/safari@latest',
'Windows 10/microsoftedge@18',
'Windows 10/internet explorer@11'
];
const cronPlatforms = [
'iOS Simulator/[email protected]',
'iOS Simulator/[email protected]',
'Windows 10/chrome@latest',
'Windows 10/firefox@latest'
];
if (env === 'saucelabs:mobile') {
context.options.plugins.sauce.browsers = saucelabsPlatformsMobile;
} else if (env === 'saucelabs:desktop') {
context.options.plugins.sauce.browsers = saucelabsPlatformsDesktop;
} else if (env === 'saucelabs') {
context.options.plugins.sauce.browsers = [
...saucelabsPlatformsMobile,
...saucelabsPlatformsDesktop
];
} else if (env === 'saucelabs-cron') {
context.options.plugins.sauce.browsers = cronPlatforms;
// Add coverage for local tests only
} else {
/* context.options.plugins.istanbul = {
'dir': './coverage',
'reporters': ['text-summary', 'lcov'],
'include': [
'/vaadin-grid-active-item-mixin.html',
'/vaadin-grid-array-data-provider-mixin.html',
'/vaadin-grid-cell-click-mixin.html',
'/vaadin-grid-column-group.html',
'/vaadin-grid-column-reordering-mixin.html',
'/vaadin-grid-column-resizing-mixin.html',
'/vaadin-grid-column.html',
'/vaadin-grid-data-provider-mixin.html',
'/vaadin-grid-dynamic-columns-mixin.html',
'/vaadin-grid-filter-mixin.html',
'/vaadin-grid-filter.html',
'/vaadin-grid-keyboard-navigation-mixin.html',
'/vaadin-grid-row-details-mixin.html',
'/vaadin-grid-scroll-mixin.html',
'/vaadin-grid-scroller.html',
'/vaadin-grid-selection-column.html',
'/vaadin-grid-selection-mixin.html',
'/vaadin-grid-sort-mixin.html',
'/vaadin-grid-sorter.html',
'/vaadin-grid-styles.html',
'/vaadin-grid-templatizer.html',
'/vaadin-grid.html'
],
'exclude': []
};*/
}
}
};