Skip to content

Commit

Permalink
test(e2e): Fix e2e flakes by setting default window size (#3234)
Browse files Browse the repository at this point in the history
* .

* Try to make screenshot image size same as before

* change back to 1024 x 768
  • Loading branch information
tinayuangao authored and mmalerba committed Feb 22, 2017
1 parent 5492225 commit 194714a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import * as path from 'path';
import {browser} from 'protractor';

const OUTPUT_DIR = './screenshots/';
const HEIGHT = 768;
const WIDTH = 1024;

let currentJasmineSpecName = '';

/** Adds a custom jasmine reporter that simply keeps track of the current test name. */
function initializeEnvironment(jasmine: any) {
browser.manage().window().setSize(WIDTH, HEIGHT);
let reporter = new jasmine.JsApiReporter({});
reporter.specStarted = function(result: any) {
currentJasmineSpecName = result.fullName;
Expand Down

0 comments on commit 194714a

Please sign in to comment.