generated from serenity-js/serenity-js-jasmine-protractor-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
protractor.conf.js
74 lines (60 loc) · 2.29 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const
{ ArtifactArchiver } = require('@serenity-js/core'),
{ ConsoleReporter } = require('@serenity-js/console-reporter'),
{ SerenityBDDReporter } = require('@serenity-js/serenity-bdd'),
{ Photographer, TakePhotosOfInteractions } = require('@serenity-js/web');
exports.config = {
baseUrl: 'http://localhost:3000',
chromeDriver: require(`chromedriver/lib/chromedriver`).path,
SELENIUM_PROMISE_MANAGER: false,
directConnect: true,
// https://github.com/angular/protractor/blob/master/docs/timeouts.md
allScriptsTimeout: 110000,
framework: 'custom',
frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
specs: [ './spec/*.spec.ts', ],
serenity: {
runner: 'mocha',
crew: [
ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
ConsoleReporter.forDarkTerminals(),
Photographer.whoWill(TakePhotosOfInteractions), // slower execution, more comprehensive reports
// Photographer.whoWill(TakePhotosOfFailures), // fast execution, screenshots only when tests fail
new SerenityBDDReporter(),
]
},
/**
* If you're interacting with a non-Angular application,
* uncomment the below onPrepare section,
* which disables Angular-specific test synchronisation.
*/
// onPrepare: function() {
// browser.waitForAngularEnabled(false);
// },
mochaOpts: {
require: [
'ts-node/register',
],
timeout: 10000,
// retries: 2 // auto-retry failed tests up to n times
},
capabilities: {
browserName: 'chrome',
// see https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#loggingpreferences-json-object
loggingPrefs: {
browser: 'SEVERE' // "OFF", "SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "FINER", "FINEST", "ALL".
},
chromeOptions: {
args: [
'--disable-web-security',
'--allow-file-access-from-files',
'--allow-file-access',
'--disable-infobars',
'--ignore-certificate-errors',
'--headless',
'--disable-gpu',
'--window-size=1024x768',
],
}
}
};