diff --git a/Gruntfile.js b/Gruntfile.js index a68cfac71d..435e72550f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -361,7 +361,7 @@ var path = require('path'), grunt.registerTask('spawn-casperjs', function () { var done = this.async(), options = ['host', 'noPort', 'port', 'email', 'password'], - args = ['test', 'admin/', '--includes=base.js', '--direct', '--log-level=debug', '--port=2369', '--fail-fast']; + args = ['test', 'admin/', '--includes=base.js', '--direct', '--log-level=debug', '--port=2369']; // Forward parameters from grunt to casperjs _.each(options, function processOption(option) { diff --git a/core/test/functional/base.js b/core/test/functional/base.js index 4b91289fac..ab3f3e2c66 100644 --- a/core/test/functional/base.js +++ b/core/test/functional/base.js @@ -51,6 +51,22 @@ casper.writeContentToCodeMirror = function (content) { return this; }; + +// ## Debugging +// output all errors to the console +casper.on('remote.message', function (msg) { + casper.echo('GOT CONSOLE LOG: ' + msg); +}); + +casper.on('error', function (msg, trace) { + casper.echo('GOT ERROR, ' + msg); +}); + +casper.on("page.error", function (msg, trace) { + this.echo("GOT PAGE ERROR: " + msg, "ERROR"); +}); + +// on failure, grab a screenshot casper.test.on("fail", function captureFailure() { var filename = casper.test.filename || "casper_test_fail.png"; casper.capture(new Date().getTime() + '_' + filename);