generated from serenity-js/serenity-js-jasmine-protractor-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
protractor.conf.js
87 lines (71 loc) · 2.82 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
75
76
77
78
79
80
81
82
83
84
85
86
87
const { computeExecutablePath } = require('@puppeteer/browsers')
const { resolve } = require('path')
// Chrome 129 is the last version that correctly supports Selenium 3
// Chrome 130 and later require Selenium 4 for browser.executeScript to correctly resolve WebElement arguments
const chromeVersion = '129';
const binaries = {
chromedriver: computeExecutablePath({ browser: 'chromedriver', buildId: chromeVersion, cacheDir: '.' }),
chrome: computeExecutablePath({ browser: 'chrome', buildId: chromeVersion, cacheDir: '.' }),
}
exports.config = {
baseUrl: 'http://localhost:3000',
SELENIUM_PROMISE_MANAGER: false,
directConnect: true,
chromeDriver: binaries.chromedriver,
// 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: {
// Use Jasmine test runner adapter
// see: https://serenity-js.org/api/mocha/
runner: 'mocha',
// Configure reporting services
// see: https://serenity-js.org/handbook/reporting/
crew: [
'@serenity-js/console-reporter',
'@serenity-js/serenity-bdd',
[ '@serenity-js/web:Photographer', { strategy: 'TakePhotosOfInteractions' } ],
// [ '@serenity-js/web:Photographer', { strategy: 'TakePhotosOfFailures' } ],
[ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
]
},
/**
* 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: {
w3c: false,
binary: binaries.chrome,
excludeSwitches: [ 'enable-automation' ],
args: [
'--disable-web-security',
'--allow-file-access-from-files',
'--allow-file-access',
'--disable-infobars',
'--ignore-certificate-errors',
'--headless',
'--disable-gpu',
'--window-size=1024x768',
]
}
}
};