forked from cerner/terra-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wdio.conf.js
61 lines (53 loc) · 1.72 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
50
51
52
53
54
55
56
57
58
59
60
61
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() && fs.readdirSync(site).length > 0;
const webpackConfig = process.env.TT_TEST_WDIO_FUNCTION ? webpackConfigFunction : webpackConfigObject;
const config = {
...wdioConf.config,
terra: {
selector: '[data-terra-toolkit-content]',
},
serveStatic: {
index: 'compare.html',
},
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',
'tests/wdio/validateElement-spec.js',
'tests/wdio/describeViewports-spec.js',
'tests/wdio/timeout-spec.js',
],
unopinionated: [
'tests/wdio/i18n-spec.js',
'tests/wdio/validateElement-spec.js',
'tests/wdio/hideInputCaret-spec.js',
],
static: [
'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',
'tests/wdio/validateElement-spec.js',
'tests/wdio/serveStatic-spec.js',
'tests/wdio/describeViewports-spec.js',
],
noFormFactor: [
'tests/wdio/validateElement-spec.js',
'tests/wdio/defaultViewports-spec.js',
],
},
// Static site for ServeStaticService
...siteExists && { site },
// Configuration for ServeStaticService
webpackConfig,
};
exports.config = config;