| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/gavin/workspace/happymandarin/node_modules/gulp-protractor/example_2/ |
Upload File : |
'use strict';
var gulp = require('gulp');
require('gulp-help')(gulp);
var gp = require('gulp-protractor');
var args = require('yargs').argv;
var express = require('express');
var http = require('http');
var server = http.createServer(express().use(express.static(__dirname + '/build/')));
var isCI = args.type === 'ci';
// Download and update the selenium driver
gulp.task('e2etests:webdriver_manager_update', 'updates the selenium server standalone jar file ', gp.webdriver_update);
gulp.task('e2etests:run', 'runs e2etests using protractor.conf', ['e2etests:server'], function(cb) {
gulp.src(['tests/e2e/**/*.js'], { read:false })
.pipe(gp.protractor({
configFile: './protractor.conf.js',
args: ['--baseUrl', 'http://' + server.address().address + ':' + server.address().port]
})).on('error', function(e) {
server.close();
if(isCI) {
throw e;
} else {
console.log(e);
}
cb();
}).on('end', function() {
server.close();
cb();
});
});
gulp.task('e2etests:server', 'starts a development webserver', function(cb) {
server.listen(9001, cb);
});