Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #27 from tszewcow/e2e_support
Browse files Browse the repository at this point in the history
e2e support added
  • Loading branch information
tbialecki committed Oct 9, 2015
2 parents ba936f5 + 0675a7d commit 8b2858b
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/files.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
"gulp/proxy.js",
"gulp/server.js",
"gulp/unit-tests.js",
"gulp/e2e-tests.js",
"gulp/watch.js",
"gulpfile.js",
"karma.conf.js",
"protractor.conf.js",
"e2e/sample.e2e-spec.js",
"package.json"
],

Expand Down
9 changes: 9 additions & 0 deletions app/templates/e2e/sample.e2e-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*global browser*/

describe('sample e2e test suite', function () {
'use strict';

it('sample e2e spec', function () {
browser.sleep(1000);
});
});
14 changes: 14 additions & 0 deletions app/templates/gulp/e2e-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

var gulp = require('gulp');
var $ = require('gulp-load-plugins')();

gulp.task('test:e2e', function () {
return gulp.src(config.scripts.e2eSrc())
.pipe($.angularProtractor({
'configFile': 'protractor.conf.js',
'autoStartStopServer': true,
'debug': false
}))
.on('error', function(e) { throw e });
});
3 changes: 3 additions & 0 deletions app/templates/gulp/lib/config-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ var configFactory = function (externalConfig) {
pathsBuilder.buildForTopLevelModules(
'{src}/{moduleFile}', '{src}/{moduleDir}/**/*.module.js', '{src}/{moduleDir}/**/!(*spec|*mock).js')
]);
},
e2eSrc: function(){
return ['./e2e/*.e2e-spec.js'];
}
},
i18n: {
Expand Down
1 change: 1 addition & 0 deletions app/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"coveralls": "2.11.2",
"del": "1.2.0",
"gulp": "3.9.0",
"gulp-angular-protractor": "0.0.2",
"gulp-concat": "2.6.0",
"gulp-filter": "2.0.2",
"gulp-flatten": "0.1.0",
Expand Down
10 changes: 10 additions & 0 deletions app/templates/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
exports.config = {

seleniumAddress: 'http://localhost:4444/wd/hub',
baseUrl: 'http://localhost:9000/',

jasmineNodeOpts: {
showColors: true,
isVerbose: true
}
};
8 changes: 8 additions & 0 deletions test/generator-app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ describe('oasp:app', function () {
'.jshintrc'
]);
});

it('creates files associated with e2e', function () {
assert.file([
'protractor.conf.js',
'e2e/sample.e2e-spec.js',
'gulp/e2e-tests.js'
]);
});
});

describe('with simple module name', function () {
Expand Down

0 comments on commit 8b2858b

Please sign in to comment.