forked from walkermatt/accessible-autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwdio.config.js
80 lines (78 loc) · 2.04 KB
/
wdio.config.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
require('@babel/register')({
cwd: require('path').resolve(__dirname, '../')
})
require('dotenv').config()
const puppeteer = require('puppeteer')
const webpackConfig = require('../webpack.config.babel.js')
const webpackPort = webpackConfig[0].devServer.port
const staticServerPort = process.env.PORT || 4567
const services = ['webpack-dev-server', 'static-server']
const sauceEnabled = process.env.SAUCE_ENABLED === 'true'
const sauceUser = process.env.SAUCE_USERNAME
const sauceKey = process.env.SAUCE_ACCESS_KEY
const buildNumber = process.env.TRAVIS_BUILD_NUMBER
const sauceConfig = sauceEnabled
? {
user: sauceUser,
key: sauceKey,
capabilities: [
{
browserName: 'chrome',
build: buildNumber,
platform: 'Windows 10'
},
{
browserName: 'firefox',
build: buildNumber,
platform: 'Windows 10',
version: '55.0'
},
{
browserName: 'internet explorer',
build: buildNumber,
platform: 'Windows 10',
version: '11.103'
},
{
browserName: 'internet explorer',
build: buildNumber,
platform: 'Windows 7',
version: '10'
},
{
browserName: 'internet explorer',
build: buildNumber,
platform: 'Windows 7',
version: '9'
}
],
services: services.concat(['sauce']),
sauceConnect: true
}
: {}
exports.config = Object.assign({
specs: ['./test/integration/**/*.js'],
capabilities: [
// { browserName: 'firefox' },
{
browserName: 'chrome',
chromeOptions: {
args: ['--headless'],
binary: puppeteer.executablePath()
}
}
],
baseUrl: 'http://localhost:' + staticServerPort,
screenshotPath: './screenshots/',
services: services.concat(['selenium-standalone']),
reporters: ['spec'],
framework: 'mocha',
mochaOpts: { timeout: 30 * 1000 },
webpackConfig,
webpackPort,
staticServerFolders: [
{ mount: '/', path: './examples' },
{ mount: '/dist/', path: './dist' }
],
staticServerPort
}, sauceConfig)