maputnik/config/wdio.conf.js

49 lines
1.2 KiB
JavaScript
Raw Normal View History

2017-04-04 16:51:30 +02:00
var webpack = require("webpack");
var WebpackDevServer = require("webpack-dev-server");
var webpackConfig = require("./webpack.production.config");
2017-04-04 17:03:02 +02:00
var testConfig = require("../test/config/specs");
var artifacts = require("../test/artifacts");
var isDocker = require("is-docker");
2017-04-04 16:51:30 +02:00
var server;
var SCREENSHOT_PATH = artifacts.pathSync("screenshots");
2017-04-04 16:51:30 +02:00
exports.config = {
2017-04-04 17:03:02 +02:00
specs: [
2018-01-10 14:19:34 +01:00
'./test/functional/index.js'
2017-04-04 17:03:02 +02:00
],
exclude: [
],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
browserName: 'chrome'
2017-04-04 17:03:02 +02:00
}],
sync: true,
logLevel: 'verbose',
2017-04-04 17:03:02 +02:00
coloredLogs: true,
bail: 0,
screenshotPath: SCREENSHOT_PATH,
host: (isDocker() ? process.env.DOCKER_HOST : "127.0.0.1"),
2017-04-04 17:03:02 +02:00
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
// Because we don't know how long the initial build will take...
timeout: 2*60*1000
},
onPrepare: function (config, capabilities) {
var compiler = webpack(webpackConfig);
server = new WebpackDevServer(compiler, {});
2017-04-04 17:03:02 +02:00
server.listen(testConfig.port);
},
onComplete: function(exitCode) {
server.close()
2017-04-04 17:03:02 +02:00
}
2017-04-04 16:51:30 +02:00
}