-
Notifications
You must be signed in to change notification settings - Fork 0
/
protractor.conf.js
55 lines (48 loc) · 1.75 KB
/
protractor.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
require('ts-node/register');
const argv = require('yargs').argv;
const baseUrl = argv['base-url'] || 'http://localhost:4200/';
if(!argv.app) {
throw new Error('Missing required parameter app: (ng e2e --app=appname)');
}
exports.config = {
allScriptsTimeout: 11000,
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['--no-sandbox']
}
},
directConnect: true,
baseUrl: baseUrl,
// Specs here are the cucumber feature files
specs: ['./apps/' + argv.app + '/**/e2e/features/*.feature'],
// Use a custom framework adapter and set its relative path
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
plugins: [{
path: 'e2e/core.js'
}],
// cucumber command line options
cucumberOpts: {
// require step definition files before executing features
require: ['./apps/' + argv.app + '/**/e2e/steps/**/*.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: ['json:./e2e/output/' + argv.app + '-results.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: './tsconfig.e2e.json'
});
}
};