Skip to content

Instantly share code, notes, and snippets.

@dherges
Created August 4, 2017 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dherges/2c81bee554abd20169c014e1d5e60f71 to your computer and use it in GitHub Desktop.
Save dherges/2c81bee554abd20169c014e1d5e60f71 to your computer and use it in GitHub Desktop.
Angular, Protractor, Cucumber
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
exports.config = {
allScriptsTimeout: 11000,
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
// Specs here are the cucumber feature files
specs: [
'./e2e/features/*.feature'
],
// Use a custom framework adapter and set its relative path
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
// cucumber command line options
cucumberOpts: {
// require step definition files before executing features
require: ['./e2e/steps/**/*.ts'],
// <string[]> (expression) only execute the features or scenarios with tags matching the expression
tags: [],
// <boolean> fail if there are any undefined or pending steps
strict: true,
// <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
format: [
'pretty',
'pretty:reports/summary.txt',
'json:reports/summary.json'
],
// <boolean> invoke formatters without executing steps
dryRun: false,
// <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
compiler: []
},
// Enable TypeScript for the tests
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment