forked from valor-software/ngx-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protractor.cucumber.js
50 lines (39 loc) · 1.11 KB
/
protractor.cucumber.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
let envUrl = "http://ngx-bootstrap-latest.surge.sh/#/";
if (process.env.TRAVIS) {
envUrl = "http://localhost:3000/"
}
const chromeOptions = {
// need this window size due to cutting last menu point by viewport borders. will be deleted after fix
args: ['--headless', '--disable-gpu', '--window-size=800, 900']
};
if (process.env.GOOGLE_CHROME_BINARY) {
chromeOptions.binary = process.env.GOOGLE_CHROME_BINARY;
}
exports.config = {
SELENIUM_PROMISE_MANAGER: false,
baseUrl: envUrl,
capabilities: {
'browserName': 'chrome',
chromeOptions: chromeOptions
},
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: [
'./demo/e2e-bdd/features/*.feature'
],
cucumberOpts: {
require: [
'./demo/e2e-bdd/step_definitions/*.steps.ts',
'./demo/e2e-bdd/support/*.ts'
]
},
onPrepare: () => {
require('ts-node').register({
project: 'demo/e2e-bdd'
});
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
browser.driver.manage().window().maximize()
}
}