diff --git a/e2e/src/app.e2e-spec.ts b/e2e/src/app.e2e-spec.ts index 793c9e3..bf9afc5 100644 --- a/e2e/src/app.e2e-spec.ts +++ b/e2e/src/app.e2e-spec.ts @@ -5,6 +5,7 @@ describe('new App', () => { beforeEach(() => { page = new AppPage(); + page.maximise(); }); it('should display the master password field label', () => { diff --git a/e2e/src/app.po.ts b/e2e/src/app.po.ts index f46a6e6..902f1d8 100644 --- a/e2e/src/app.po.ts +++ b/e2e/src/app.po.ts @@ -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() { @@ -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(); @@ -59,7 +57,6 @@ export class AppPage { const isChecked: boolean = (currentValue === 'true'); if (isChecked !== shouldBeChecked) { browser.waitForAngular(); - browser.sleep(this.postNavigationSleepMs); ionicInput.click(); } }); @@ -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(); }