nightwatch.config.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // http://nightwatchjs.org/guide#settings-file
  2. module.exports = {
  3. 'src_folders': ['test/e2e/specs'],
  4. 'output_folder': 'test/e2e/reports',
  5. 'custom_commands_path': ['node_modules/nightwatch-helpers/commands'],
  6. 'custom_assertions_path': ['node_modules/nightwatch-helpers/assertions'],
  7. 'selenium': {
  8. 'start_process': true,
  9. 'server_path': require('selenium-server').path,
  10. 'host': '127.0.0.1',
  11. 'port': 4444,
  12. 'cli_args': {
  13. 'webdriver.chrome.driver': require('chromedriver').path
  14. // , 'webdriver.gecko.driver': require('geckodriver').path
  15. }
  16. },
  17. 'test_settings': {
  18. 'default': {
  19. 'selenium_port': 4444,
  20. 'selenium_host': 'localhost',
  21. 'silent': true,
  22. 'screenshots': {
  23. 'enabled': true,
  24. 'on_failure': true,
  25. 'on_error': false,
  26. 'path': 'test/e2e/screenshots'
  27. }
  28. },
  29. 'chrome': {
  30. 'desiredCapabilities': {
  31. 'browserName': 'chrome',
  32. 'javascriptEnabled': true,
  33. 'acceptSslCerts': true
  34. }
  35. },
  36. 'firefox': {
  37. 'desiredCapabilities': {
  38. 'browserName': 'firefox',
  39. 'javascriptEnabled': true,
  40. 'acceptSslCerts': true,
  41. 'marionette': true
  42. }
  43. },
  44. 'phantomjs': {
  45. 'desiredCapabilities': {
  46. 'browserName': 'phantomjs',
  47. 'javascriptEnabled': true,
  48. 'acceptSslCerts': true,
  49. 'phantomjs.binary.path': require('phantomjs-prebuilt').path
  50. }
  51. }
  52. }
  53. }