Skip to content

Commit

Permalink
Remove new sleeps and try setting window size
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelLH committed Oct 21, 2018
1 parent 5d4291d commit cdddc05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe('new App', () => {

beforeEach(() => {
page = new AppPage();
page.maximise();
});

it('should display the master password field label', () => {
Expand Down
10 changes: 3 additions & 7 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { browser, by, element } from 'protractor';

export class AppPage {
/** This worked OK locally with 0, but Travis seems to need time to catch up */
private postNavigationSleepMs = 3000;
public maximise() {
browser.driver.manage().window().setSize(900, 900);
}

public navigateToHome() {
browser.get('/');
browser.sleep(this.postNavigationSleepMs);
}

public navigateToSettings() {
browser.get('/tabs/(settings:settings)');
browser.sleep(this.postNavigationSleepMs);
}

public getParagraphText() {
Expand All @@ -22,7 +21,6 @@ export class AppPage {
const ionicInput = element(by.css(`ion-input[name="${elementName}"]`));

// Because some fields use floating input labels, we need to click & wait for a UI update before interacting.
browser.sleep(this.postNavigationSleepMs);
ionicInput.click();
browser.waitForAngular();

Expand Down Expand Up @@ -59,7 +57,6 @@ export class AppPage {
const isChecked: boolean = (currentValue === 'true');
if (isChecked !== shouldBeChecked) {
browser.waitForAngular();
browser.sleep(this.postNavigationSleepMs);
ionicInput.click();
}
});
Expand All @@ -68,7 +65,6 @@ export class AppPage {
public save() {
const ionicSaveButton = element(by.css(`ion-button[name="save"]`));
browser.waitForAngular();
browser.sleep(this.postNavigationSleepMs);
ionicSaveButton.click();
}

Expand Down

0 comments on commit cdddc05

Please sign in to comment.