Commit dbafb5a8fda52cc76304b1552d989cd488334c3d
1 parent
bf49b8f9
Exists in
master
and in
8 other branches
E2E: disable animations and debug info for a better performance.
Showing
1 changed file
with
27 additions
and
3 deletions
Show diff stats
protractor.conf.js
@@ -17,9 +17,33 @@ | @@ -17,9 +17,33 @@ | ||
17 | 17 | ||
18 | chromeOnly: true, | 18 | chromeOnly: true, |
19 | 19 | ||
20 | - // onPrepare: function() { | ||
21 | - // browser.driver.manage().window().setSize(1600, 800); | ||
22 | - // }, | 20 | + onPrepare: function() { |
21 | + /* global angular: false, browser: false */ | ||
22 | + | ||
23 | + // Disable animations so e2e tests run more quickly | ||
24 | + var disableNgAnimate = function() { | ||
25 | + angular.module('disableNgAnimate', []).run(['$animate', function($animate) { | ||
26 | + $animate.enabled(false); | ||
27 | + }]); | ||
28 | + }; | ||
29 | + | ||
30 | + browser.addMockModule('disableNgAnimate', disableNgAnimate); | ||
31 | + | ||
32 | + // Disable debug info | ||
33 | + var disableDebugInfo = function() { | ||
34 | + angular.module('disableDebugInfo', []).run(['$compileProvider', function($compileProvider) { | ||
35 | + $compileProvider.debugInfoEnabled(false); | ||
36 | + }]); | ||
37 | + }; | ||
38 | + browser.addMockModule('disableDebugInfo', disableDebugInfo); | ||
39 | + | ||
40 | + // Store the name of the browser that's currently being used. | ||
41 | + browser.getCapabilities().then(function(caps) { | ||
42 | + browser.params.browser = caps.get('browserName'); | ||
43 | + }); | ||
44 | + | ||
45 | + browser.driver.manage().window().setSize(1400, 400); | ||
46 | + }, | ||
23 | 47 | ||
24 | baseUrl: 'http://0.0.0.0:3000', | 48 | baseUrl: 'http://0.0.0.0:3000', |
25 | 49 |