wdio.local-test.conf.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { afterLocalSuite, beforeLocalSuite, beforeLocalSession } from './src/utils'
  2. import { config as mainConfig } from './wdio.main.conf'
  3. const prefs = {
  4. 'intl.accept_languages': 'en'
  5. }
  6. // Chrome headless does not support prefs
  7. process.env.LANG = 'en'
  8. // https://github.com/mozilla/geckodriver/issues/1354#issuecomment-479456411
  9. process.env.MOZ_HEADLESS_WIDTH = '1280'
  10. process.env.MOZ_HEADLESS_HEIGHT = '1024'
  11. const windowSizeArg = `--window-size=${process.env.MOZ_HEADLESS_WIDTH},${process.env.MOZ_HEADLESS_HEIGHT}`
  12. module.exports = {
  13. config: {
  14. ...mainConfig,
  15. runner: 'local',
  16. maxInstances: 1,
  17. specFileRetries: 0,
  18. capabilities: [
  19. {
  20. 'browserName': 'chrome',
  21. 'acceptInsecureCerts': true,
  22. 'goog:chromeOptions': {
  23. args: [ '--headless', '--disable-gpu', windowSizeArg ],
  24. prefs
  25. }
  26. },
  27. {
  28. 'browserName': 'firefox',
  29. 'moz:firefoxOptions': {
  30. binary: '/usr/bin/firefox-developer-edition',
  31. args: [ '--headless', windowSizeArg ],
  32. prefs
  33. }
  34. }
  35. ],
  36. services: [ 'shared-store' ],
  37. beforeSession: beforeLocalSession,
  38. beforeSuite: beforeLocalSuite,
  39. afterSuite: afterLocalSuite
  40. } as WebdriverIO.Config
  41. }