wdio.local.conf.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. const base = require('./wdio.base.conf')
  2. const args = require('minimist')(process.argv.slice(2))
  3. // Use "npm run test:endtoend:local -- -b chrome" to test in chrome
  4. // "npm run test:endtoend:local -- -b firefox -b chrome" to test in FF and chrome
  5. const capabilities = []
  6. if (args.b) {
  7. if (!Array.isArray(args.b)) args.b = [args.b]
  8. args.b.forEach((browserName) => {
  9. capabilities.push({ browserName })
  10. })
  11. }
  12. // default to testing in firefox
  13. if (capabilities.length === 0) {
  14. capabilities.push({ browserName: 'firefox' })
  15. }
  16. const testingInternetExplorer = capabilities.find((capability) => capability.browserName === 'internet explorer') !== null
  17. exports.config = {
  18. ...base.config,
  19. capabilities,
  20. // If you only want to run your tests until a specific amount of tests have failed use
  21. // bail (default is 0 - don't bail, run all tests).
  22. bail: 0,
  23. // For internet explorer, the IEDriverServer only supports 1 instance at a time.
  24. maxInstances: testingInternetExplorer ? 1 : 5,
  25. // Set a base URL in order to shorten url command calls. If your url parameter starts
  26. // with "/", then the base url gets prepended.
  27. baseUrl: 'http://localhost',
  28. // Options to be passed to Mocha.
  29. // See the full list at http://mochajs.org/
  30. mochaOpts: {
  31. ui: 'bdd',
  32. reporter: 'dot',
  33. timeout: 120000
  34. }
  35. }