forked from bitpay/wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protractor.conf.js
125 lines (124 loc) · 2.9 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
const flags = [
'--headless',
// Sandbox causes Chrome to crash on Travis
// https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-359018652
'--no-sandbox',
'--disable-gpu'
];
exports.config = {
allScriptsTimeout: 11000,
jasmineNodeOpts: { defaultTimeoutInterval: 1000 * 60 * 10 },
maxSessions: 4,
specs: ['test/e2e/**/*.e2e-spec.ts'],
// Available deviceNames for mobileEmulation: https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json
multiCapabilities: [
{
name: '1024x720',
browserName: 'chrome',
chromeOptions: {
args: [
'--high-dpi-support=1',
'--force-device-scale-factor=2',
'--window-size=1024,720',
...flags
]
}
},
{
name: '1920x1080',
browserName: 'chrome',
chromeOptions: {
args: [
'--high-dpi-support=1',
'--force-device-scale-factor=2',
'--window-size=1920,1080',
...flags
]
}
},
{
name: 'iPhoneX',
browserName: 'chrome',
chromeOptions: {
mobileEmulation: {
deviceName: 'iPhone X'
},
args: [...flags]
}
},
{
name: 'iPhone8',
browserName: 'chrome',
chromeOptions: {
mobileEmulation: {
deviceName: 'iPhone 8'
},
args: [...flags]
}
},
{
name: 'iPad',
browserName: 'chrome',
chromeOptions: {
mobileEmulation: {
deviceName: 'iPad'
},
args: [...flags]
}
},
{
name: 'iPadPro',
browserName: 'chrome',
chromeOptions: {
mobileEmulation: {
deviceName: 'iPad Pro'
},
args: [...flags]
}
},
{
name: 'Nexus5X',
browserName: 'chrome',
chromeOptions: {
mobileEmulation: {
deviceName: 'Nexus 5X'
},
args: [...flags]
}
}
],
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
useAllAngular2AppRoots: true,
beforeLaunch: function() {
require('connect')()
.use(require('serve-static')('www'))
.listen(4200);
},
onPrepare() {
require('ts-node').register({
project: 'test/e2e/tsconfig.e2e.json'
});
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmineReporters.TerminalReporter({
verbosity: 3,
color: true,
showStack: true
})
);
jasmine.getEnv().addReporter(
new jasmineReporters.JUnitXmlReporter({
savePath: process.env.JUNIT_REPORT_PATH || './test/',
outputFile: process.env.JUNIT_REPORT_NAME || 'junitresults.xml',
consolidateAll: true
})
);
}
};