wdio.common.conf.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. const path = require('path');
  2. const fs = require('fs');
  3. const rimraf = require('rimraf');
  4. const dir = path.join(__dirname, 'integration', 'downloads');
  5. fs.mkdirSync(dir, {
  6. recursive: true
  7. });
  8. rimraf.sync(`${dir}${path.sep}*`);
  9. exports.config = {
  10. specs: [path.join(__dirname, './integration/**/*-tests.js')],
  11. exclude: [],
  12. maxInstances: 10,
  13. capabilities: [
  14. {
  15. browserName: 'firefox',
  16. 'moz:firefoxOptions': {
  17. log: { level: 'trace' },
  18. prefs: {
  19. 'browser.download.panel.shown': false,
  20. 'browser.helperApps.neverAsk.openFile': 'text/plain',
  21. 'browser.helperApps.neverAsk.saveToDisk': 'text/plain',
  22. 'browser.download.folderList': 2,
  23. 'browser.download.dir': dir
  24. }
  25. }
  26. }
  27. ],
  28. pageLoadStrategy: 'normal',
  29. watch: false,
  30. async: true,
  31. logLevel: 'error',
  32. coloredLogs: true,
  33. deprecationWarnings: true,
  34. bail: 0,
  35. screenshotOnReject: false,
  36. baseUrl: 'http://localhost:8000',
  37. waitforTimeout: 20000,
  38. connectionRetryTimeout: 90000,
  39. connectionRetryCount: 3,
  40. services: ['firefox-profile'],
  41. framework: 'mocha',
  42. reporters: ['dot', 'spec'],
  43. mochaOpts: {
  44. ui: 'bdd',
  45. timeout: 30000,
  46. retries: 1
  47. }
  48. };