From 1ee48bcc8b7e9715f481ec8c30499653dc2db0bf Mon Sep 17 00:00:00 2001 From: Noel Light-Hilary Date: Sun, 10 May 2020 11:14:26 +0100 Subject: [PATCH] Add a sleep to stabilise e2e's with latest Ionic --- e2e/src/app.po.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e/src/app.po.ts b/e2e/src/app.po.ts index 7992254..77a60c6 100644 --- a/e2e/src/app.po.ts +++ b/e2e/src/app.po.ts @@ -32,6 +32,7 @@ export class AppPage { public populateIonicInput(elementName: string, value: (string|number)) { browser.waitForAngular(); const ionicInput = element(by.css(`input[name="${elementName}"]`)); + browser.sleep(400); // Wait for elements to be available and visible ionicInput.click(); // `clear()` wasn't allowed on `ion-input` or the native field, so backspace x20 to remove existing value. @@ -110,10 +111,11 @@ export class AppPage { } public getOutputPassword() { - // With the Ionic + Angular + Chromedriver updates August 2019, browser.waitForAngular() alone - // seemed to stop working for ensuring that div.output_password is available, so had to add an - // explicit pause here too. + // With the Ionic + Angular + Chromedriver updates August 2019, browser.waitForAngular() alone + // seemed to stop working for ensuring that div.output_password is available, so had to add an + // explicit pause here too. browser.sleep(1000); + return element(by.css('div.output_password')).getText(); }