[functional testing] Add dev mode

This commit is contained in:
Jonathan Budzenski 2015-09-11 14:08:35 -05:00
parent c064533ee8
commit 49c856712c
3 changed files with 15 additions and 2 deletions

View file

@ -38,6 +38,8 @@
"test:quick": "grunt test:quick",
"test:browser": "grunt test:browser",
"test:ui": "grunt test:ui",
"test:ui:server": "grunt test:ui:server",
"test:ui:runner": "grunt test:ui:runner",
"test:server": "grunt test:server",
"test:coverage": "grunt test:coverage",
"build": "grunt build",

View file

@ -7,7 +7,7 @@ var crypto = require('crypto');
var {spawn} = require('child_process');
module.exports = function (grunt) {
grunt.registerTask('startSelenium', 'Start an instance of selenium standalone', function () {
grunt.registerTask('startSelenium', 'Start an instance of selenium standalone', function (keepalive) {
const done = this.async();
const config = _.defaults(this.options(), {
seleniumStandalone: {
@ -26,7 +26,7 @@ module.exports = function (grunt) {
seleniumProcess.stderr.on('data', function (log) {
if (~log.toString('utf8').indexOf('Selenium Server is up and running')) {
grunt.log.writeln('Selenium standalone started on port 4444');
done();
if (keepalive !== 'keepalive') done();
}
});

View file

@ -23,6 +23,17 @@ module.exports = function (grunt) {
'intern:dev'
]);
grunt.registerTask('test:ui:server', [
'esvm:ui',
'loadFixtures',
'run:testUIServer',
'startSelenium:keepalive'
]);
grunt.registerTask('test:ui:runner', [
'intern:dev'
]);
grunt.registerTask('test', function (subTask) {
if (subTask) grunt.fail.fatal(`invalid task "test:${subTask}"`);