Skip to content

Commit

Permalink
missing protractor.config
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrowhurstram committed Sep 18, 2016
1 parent 03d302a commit a176cbf
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ src/**/*.d.ts
e2e/**/*.js
e2e/**/*.js.map
e2e/**/*.d.ts
!e2e/protractor.config.js
test/**/*.d.ts
demo-apps/ts-webpack/src/**/*.js
demo-apps/ts-webpack/src/**/*.js.map
Expand Down
68 changes: 68 additions & 0 deletions e2e/protractor.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');

var reporter = new HtmlScreenshotReporter({
cleanDestination: true,
dest: './out/test/end2end/reports',
filename: 'e2e.html',
ignoreSkippedSpecs: true,
showSummary: true,

// reportOnlyFailedSpecs: true,
// captureOnlyFailedSpecs: true
});

const config = {

allScriptsTimeout: 11000,

specs: [
'*.spec.ts'
],

capabilities: {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:8080/',

framework: 'jasmine',

jasmineNodeOpts: {
defaultTimeoutInterval: 30000,
showColors: true,
includeStackTrace: true
},

beforeLaunch: function () {
require('ts-node').register({
project: 'e2e'
});
// Setup the report before any tests start
return new Promise(function (resolve) {
reporter.beforeLaunch(resolve);
});
},

onPrepare: function () {
jasmine.getEnv().addReporter(reporter);
},

afterLaunch: function (exitCode) {
// Close the report after all tests finish
return new Promise(function (resolve) {
reporter.afterLaunch(resolve.bind(this, exitCode));
});
}
};

if (process.env.TRAVIS) {
config.sauceUser = process.env.SAUCE_USERNAME;
config.sauceKey = process.env.SAUCE_ACCESS_KEY;
config.capabilities = {
'browserName': 'chrome',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_BUILD_NUMBER
};
}

exports.config = config

0 comments on commit a176cbf

Please sign in to comment.