This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
forked from strimbles/VoteWise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotractor.conf.js
58 lines (55 loc) · 2.28 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
'use strict';
var constants = require('./gulp_tasks/common/constants')();
exports.config = {
//seleniumAddress: 'http://localhost:4444/wd/hub',
//seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.43.1.jar',
//specs: ['test/e2e/**/*.js'],
framework: 'jasmine2',
capabilities: {
browserName: 'chrome',
chromeOption: {
args: ['--disable - extensions ']
},
version: '',
platform: 'ANY',
'phantomjs.binary.path': require('phantomjs').path,
'phantomjs.ghostdriver.cli.args': ['--loglevel=VERBOSE']
},
baseUrl: 'http://localhost:' + constants.e2e.port,
jasmineNodeOpts: {
showColors: true,
silent: true,
includeStackTrace: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare: function() {
browser.manage().timeouts().setScriptTimeout(30000);
browser.driver.manage().window().setSize(1600, 800);
var disableNgAnimate = function() {
window.angular.module('disableNgAnimate', []).run(['$animate', function($animate) {
$animate.enabled(false);
}]);
};
browser.addMockModule('disableNgAnimate', disableNgAnimate);
//browser.executeScript('window.name = "NG_ENABLE_DEBUG_INFO"'); // see https://github.com/angular/protractor/issues/2116
require('jasmine-reporters');
var SpecReporter = require('jasmine-spec-reporter');
var HtmlReporter = require('protractor-html-screenshot-reporter');
var path = require('path');
jasmine.getEnv().addReporter(new SpecReporter({
displaySpecDuration: true,
displayStacktrace: true
}));
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: './reports/screenshots',
takeScreenShotsOnlyForFailedSpecs: false,
docName: 'index.html',
pathBuilder: function(spec, descriptions, results, capabilities) {
// Return '<browser>/<specname>' as path for screenshots:
// Example: 'firefox/list-should work'.
return path.join(capabilities.caps_.browserName, descriptions.join('-'));
}
}));
}
};