Skip to content

Instantly share code, notes, and snippets.

@Ni55aN
Last active May 27, 2019 17:35
Show Gist options
  • Save Ni55aN/4e20f9e9048e8d135874770ac3f3db65 to your computer and use it in GitHub Desktop.
Save Ni55aN/4e20f9e9048e8d135874770ac3f3db65 to your computer and use it in GitHub Desktop.
{
"name": "wd-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "wdio wdio.conf.js",
"test:watch": "wdio wdio.conf.js --watch"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@wdio/cli": "^5.9.3",
"@wdio/dot-reporter": "^5.9.3",
"@wdio/firefox-profile-service": "^5.7.8",
"@wdio/local-runner": "^5.9.3",
"@wdio/mocha-framework": "^5.9.3",
"@wdio/selenium-standalone-service": "^5.9.3",
"@wdio/spec-reporter": "^5.9.3",
"chai": "^4.2.0"
}
}
exports.config = {
specs: ["./test/e2e/*.spec.js"],
services: ["firefox-profile", "selenium-standalone", "chromedriver"],
capabilities: [
{
"browserName": "chrome",
"goog:chromeOptions": {
"args": ["disable-infobars"]
}
}
],
filesToWatch: [
'test/**/*.js'
],
updateJob: false,
exclude: [],
suites: {},
logLevel: "silent",
coloredLogs: true,
screenshotPath: "./error/screenshots",
waitforTimeout: 30000,
deprecationWarnings: false,
plugins: {
"wdio-screenshot": {}
},
framework: "mocha",
reporters: ["spec"],
mochaOpts: {
ui: "bdd",
// compilers: ["js:babel-register"],
timeout: 60 * 1000
},
// Gets executed before all workers get launched.
onPrepare() {},
// Gets executed before test execution begins. At this point you will have access to all global
// variables like `browser`. It is the perfect place to define custom commands.
before() {
const chai = require("chai");
global.expect = chai.expect;
},
after() {},
// Gets executed after all workers got shut down and the process is about to exit. It is not
// possible to defer the end of the process using a promise.
onComplete() {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment