Browse Source

record screenshots for e2e test failures

Evan You 9 years ago
parent
commit
9d57879de1
2 changed files with 8 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 7 1
      build/nightwatch.config.js

+ 1 - 0
.gitignore

@@ -8,4 +8,5 @@ dist/*.map
 dist/vue.common.min.js
 selenium-debug.log
 test/e2e/reports
+test/e2e/screenshots
 coverage

+ 7 - 1
build/nightwatch.config.js

@@ -19,7 +19,13 @@ module.exports = {
     'default': {
       'selenium_port': 4444,
       'selenium_host': 'localhost',
-      'silent': true
+      'silent': true,
+      'screenshots': {
+        'enabled': true,
+        'on_failure': true,
+        'on_error': false,
+        'path': 'test/e2e/screenshots'
+      }
     },
 
     'chrome': {