Skip to content

Commit

Permalink
Add a sleep to stabilise e2e's with latest Ionic
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelLH committed May 10, 2020
1 parent 5383042 commit 1ee48bc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 1ee48bc

Please sign in to comment.