-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulpfile.js
40 lines (33 loc) · 959 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"use strict";
var gulp = require('gulp');
var protractor = require("gulp-protractor").protractor;
var exec = require('child_process').exec;
gulp.task('endtoend', ()=>
{
return gulp.src([
])
.pipe(protractor({
configFile: './demo/protractor.config.js'
}))
.on('end', function(e)
{
console.log("Cucumber end to end is completed.");
})
.on('error', function (e) {
console.error("Cucumber Task Error:", e);
});
});
gulp.task('webdriver', runCommand('webdriver-manager start'));
gulp.task('demo', runCommand('node server-demo'));
gulp.task('report', runCommand('node server-report'));
function runCommand(command) {
return function (cb) {
exec(command, function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
}
}
// git-r-done
gulp.task('default', ['endtoend']);