mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[functional testing] Add dev mode
This commit is contained in:
parent
c064533ee8
commit
49c856712c
3 changed files with 15 additions and 2 deletions
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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}"`);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue