forked from cerner/terra-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wdio.conf.js
49 lines (41 loc) · 1.19 KB
/
wdio.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
const path = require('path');
const fs = require('fs');
const wdioConf = require('./config/wdio/wdio.conf');
const webpackConfigObject = require('./tests/test.config.js');
const webpackConfigFunction = require('./tests/test.config.func.js');
const site = path.join('./build');
const siteExists = fs.existsSync(site) && fs.lstatSync(site).isDirectory();
const webpackConfig = process.env.TT_TEST_WDIO_FUNCTION ? webpackConfigFunction : webpackConfigObject;
const config = {
...wdioConf.config,
terra: {
selector: '[data-terra-toolkit-content]',
},
axe: {
inject: true,
options: {
rules: [
{ id: 'landmark-one-main', enabled: false },
{ id: 'region', enabled: false },
],
},
},
suites: {
opinionated: [
'tests/wdio/axe-spec.js',
'tests/wdio/beAccessible-spec.js',
'tests/wdio/compare-spec.js',
'tests/wdio/matchScreenshot-spec.js',
'tests/wdio/resize-spec.js',
],
unopinionated: [
'tests/wdio/i18n-spec.js',
'tests/wdio/theme-spec.js',
],
},
// Static site for ServeStaticService
...siteExists && { site },
// Configuration for ServeStaticService
webpackConfig,
};
exports.config = config;