Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(e2e): Fix e2e flakes by setting default window size #3234

Merged
merged 3 commits into from
Feb 22, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 788;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some significance to these numbers? isn't the standard screen size usually 1024x768

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be 1024 x 768. But the test image size is different from what we currently have so I'm trying to find the current size.

We can set it to 1024 x 768 and update the golds.

const WIDTH = 1034;

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