nightwatch.conf.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. //
  2. // Refer to the online docs for more details:
  3. // https://nightwatchjs.org/guide/configuration/nightwatch-configuration-file.html
  4. //
  5. // _ _ _ _ _ _ _
  6. // | \ | |(_) | | | | | | | |
  7. // | \| | _ __ _ | |__ | |_ __ __ __ _ | |_ ___ | |__
  8. // | . ` || | / _` || '_ \ | __|\ \ /\ / / / _` || __| / __|| '_ \
  9. // | |\ || || (_| || | | || |_ \ V V / | (_| || |_ | (__ | | | |
  10. // \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|
  11. // __/ |
  12. // |___/
  13. //
  14. module.exports = {
  15. // An array of folders (excluding subfolders) where your tests are located;
  16. // if this is not specified, the test source must be passed as the second argument to the test runner.
  17. src_folders: [],
  18. // See https://nightwatchjs.org/guide/concepts/page-object-model.html
  19. page_objects_path: [],
  20. // See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
  21. custom_commands_path: ['nightwatch/custom-commands'],
  22. // See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
  23. custom_assertions_path: ['nightwatch/custom-assertions'],
  24. // See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.html
  25. plugins: ['@nightwatch/vue'],
  26. // See https://nightwatchjs.org/guide/concepts/test-globals.html#external-test-globals
  27. globals_path: '',
  28. vite_dev_server: {
  29. start_vite: true,
  30. port: process.env.CI ? 4173 : 5173
  31. },
  32. webdriver: {},
  33. test_workers: {
  34. enabled: true,
  35. workers: 'auto'
  36. },
  37. test_settings: {
  38. default: {
  39. disable_error_log: false,
  40. launch_url: `http://localhost:${process.env.CI ? '4173' : '5173'}`,
  41. screenshots: {
  42. enabled: false,
  43. path: 'screens',
  44. on_failure: true
  45. },
  46. desiredCapabilities: {
  47. browserName: 'firefox'
  48. },
  49. webdriver: {
  50. start_process: true,
  51. server_path: ''
  52. }
  53. },
  54. safari: {
  55. desiredCapabilities: {
  56. browserName: 'safari',
  57. alwaysMatch: {
  58. acceptInsecureCerts: false
  59. }
  60. },
  61. webdriver: {
  62. start_process: true,
  63. server_path: ''
  64. }
  65. },
  66. firefox: {
  67. desiredCapabilities: {
  68. browserName: 'firefox',
  69. alwaysMatch: {
  70. acceptInsecureCerts: true,
  71. 'moz:firefoxOptions': {
  72. args: [
  73. // '-headless',
  74. // '-verbose'
  75. ]
  76. }
  77. }
  78. },
  79. webdriver: {
  80. start_process: true,
  81. server_path: '',
  82. cli_args: [
  83. // very verbose geckodriver logs
  84. // '-vv'
  85. ]
  86. }
  87. },
  88. chrome: {
  89. desiredCapabilities: {
  90. browserName: 'chrome',
  91. 'goog:chromeOptions': {
  92. // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
  93. //
  94. // w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
  95. w3c: true,
  96. args: [
  97. //'--no-sandbox',
  98. //'--ignore-certificate-errors',
  99. //'--allow-insecure-localhost',
  100. //'--headless'
  101. ]
  102. }
  103. },
  104. webdriver: {
  105. start_process: true,
  106. server_path: '',
  107. cli_args: [
  108. // --verbose
  109. ]
  110. }
  111. },
  112. edge: {
  113. desiredCapabilities: {
  114. browserName: 'MicrosoftEdge',
  115. 'ms:edgeOptions': {
  116. w3c: true,
  117. // More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options
  118. args: [
  119. //'--headless'
  120. ]
  121. }
  122. },
  123. webdriver: {
  124. start_process: true,
  125. // Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/
  126. // and set the location below:
  127. server_path: '',
  128. cli_args: [
  129. // --verbose
  130. ]
  131. }
  132. }
  133. }
  134. }