-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathprotractor.conf.js
More file actions
53 lines (31 loc) · 1.21 KB
/
protractor.conf.js
File metadata and controls
53 lines (31 loc) · 1.21 KB
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
/**
* Created by Dmitry.Mogilko on 12/8/2014.
*/
var path = require('path');
var appConfig = require(path.resolve(__dirname, 'configuration/appConfig.js'));
var Logger = require('./lib/logger');
/*
Load protractor config from the application configuration
*/
var protractorConfig = appConfig.get('protractrorConfig');
/*
Configure the reports from configuration
*/
protractorConfig.onPrepare = function () {
var allReportsConfig = appConfig.get('reports');
if (allReportsConfig) {
var jasmineReporters = require('jasmine-reporters');
var reportsConfig = allReportsConfig.jasmineReporters;
Logger.info("jasmineReporters configuration is :", reportsConfig);
if (reportsConfig) {
for (var reporterKey in reportsConfig) {
if (reportsConfig[reporterKey].isEnabled) {
Logger.info("Enabling the reporter :%s . Configuration : %j ", reporterKey, reportsConfig[reporterKey]);
var reporterInstance = eval("new " + reporterKey + "(reportsConfig[reporterKey])");
jasmine.getEnv().addReporter(reporterInstance);
}
}
}
}
}
exports.config = protractorConfig;