mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Added gulp protractor task.
This commit is contained in:
parent
2ca3619057
commit
a9e2268b18
5 changed files with 34 additions and 16 deletions
18
gulpfile.js
18
gulpfile.js
|
@ -8,6 +8,8 @@ var webpackConfig = require('./webpack.config.js')
|
|||
var gettext = require('gulp-angular-gettext')
|
||||
var jade = require('gulp-jade')
|
||||
var clean = require('gulp-clean')
|
||||
var protractor = require("gulp-protractor")
|
||||
|
||||
|
||||
gulp.task('jshint', function () {
|
||||
return gulp.src([
|
||||
|
@ -34,9 +36,23 @@ gulp.task('jsonlint', function () {
|
|||
})
|
||||
|
||||
gulp.task('lint', ['jshint', 'jsonlint'])
|
||||
gulp.task('test', ['lint'])
|
||||
gulp.task('test', ['lint', 'protractor'])
|
||||
gulp.task('build', ['translate', 'webpack:build'])
|
||||
|
||||
gulp.task('webdriver_update', protractor.webdriver_update)
|
||||
gulp.task('webdriver_standalone', protractor.webdriver_standalone)
|
||||
|
||||
gulp.task('protractor', ['webdriver_update'], function (callback) {
|
||||
gulp.src(["./res/test/**/*.js"])
|
||||
.pipe(protractor.protractor({
|
||||
configFile: './res/test/protractor.conf.js'
|
||||
}))
|
||||
.on('error', function (e) {
|
||||
console.log(e)
|
||||
}).on('end', callback)
|
||||
})
|
||||
|
||||
|
||||
// For production
|
||||
gulp.task("webpack:build", function (callback) {
|
||||
var myConfig = Object.create(webpackConfig)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
// Reference: https://github.com/angular/protractor/blob/master/referenceConf.js
|
||||
|
||||
exports.config = {
|
||||
specs: ['res/test/e2e/*spec.js']
|
||||
}
|
|
@ -6,7 +6,6 @@ html
|
|||
meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui')
|
||||
include partials/styles
|
||||
body(ng-cloak).forofour.bg-danger
|
||||
script(src='/static/bower_components/stf-analytics/analytics.js')
|
||||
div(ng-view)
|
||||
.forofour-container
|
||||
h1
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
link(href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700', media='all', rel='stylesheet', type='text/css')
|
||||
link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/bootstrap.min.css')
|
||||
link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/se7en-font.css')
|
||||
link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/style.css')
|
||||
|
|
9
res/test/protractor.conf.js
Normal file
9
res/test/protractor.conf.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Reference: https://github.com/angular/protractor/blob/master/referenceConf.js
|
||||
|
||||
exports.config = {
|
||||
specs: ['res/test/e2e/*spec.js'],
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue