wdio.local.conf.js 1.0 KB

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