This repository has been archived by the owner on Nov 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
protractor-conf.js
63 lines (61 loc) · 2.33 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
// noinspection JSUnusedGlobalSymbols
import { SpecReporter } from "jasmine-spec-reporter";
export const config = {
framework: "jasmine2",
specs: ["spec/**/*.spec.js"],
directConnect: true,
chromeDriver: "node_modules/.bin/chromedriver",
jasmineNodeOpts: {
// remove ugly protractor dot reporter
print: () => { },
},
onPrepare: () => {
/**
* If you are testing against a non-angular site - set ignoreSynchronization setting to true
*
* If true, Protractor will not attempt to synchronize with the page before
* performing actions. This can be harmful because Protractor will not wait
* until $timeouts and $http calls have been processed, which can cause
* tests to become flaky. This should be used only when necessary, such as
* when a page continuously polls an API using $timeout.
*
* @type {boolean}
*/
browser.ignoreSynchronization = true;
jasmine.getEnv().addReporter(
new SpecReporter({
// Defaults: https://github.com/bcaudan/jasmine-spec-reporter#default-options
// Configuration: https://github.com/bcaudan/jasmine-spec-reporter/blob/master/src/configuration.ts
suite: {
displayNumber: true, // display each suite number (hierarchical)
},
spec: {
displaySuccessful: true,
displayPending: true, // display each pending spec
displayDuration: true, // display each spec duration
},
summary: {
displaySuccessful: false, // display summary of all successes after execution
displayFailed: true, // display summary of all failures after execution
displayPending: false, // display summary of all pending specs after execution
displayDuration: true,
},
}),
);
},
// Spec patterns are relative to the location of the spec file. They may
// include glob patterns.
suites: {
creatix: 'spec/creatix/*.spec.js',
homepage: 'spec/**/Homepage.spec.js',
},
capabilities: {
browserName: "chrome",
chromeOptions: {
// http://peter.sh/experiments/chromium-command-line-switches/#test-type
args: ["--test-type"],
// https://github.com/angular/protractor/blob/master/docs/browser-setup.md#using-headless-chrome
// args: ["--headless", "--disable-gpu", "--window-size=800x600"],
},
},
};