Skip to content

Commit

Permalink
#1074 update clickCreateEmail
Browse files Browse the repository at this point in the history
  • Loading branch information
sosnovsky committed Dec 13, 2021
1 parent 61cfd04 commit 93e451e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion appium/tests/helpers/TouchHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TouchHelper {
// this wait can be later replaced by waiting for loader to go away before scrolling
await browser.pause(1000); // make sure contents are loaded first, so we don't scroll too early
for(let i = 0; i < 15; i++) {
if (await (await element).isDisplayed()) {
if (await element.isDisplayed()) {
return;
}
await driver.touchPerform([
Expand Down
7 changes: 5 additions & 2 deletions appium/tests/screenobjects/mail-folder.screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ class MailFolderScreen extends BaseScreen {

clickCreateEmail = async () => {
const elem = await this.createEmailButton;
await TouchHelper.scrollDownToElement(elem);
await elem.click();
if ((await elem.isDisplayed()) !== true) {
await TouchHelper.scrollDownToElement(elem);
await elem.waitForDisplayed();
}
await ElementHelper.waitAndClick(elem);
}

clickOnUserEmail = async (email: string) => {
Expand Down

0 comments on commit 93e451e

Please sign in to comment.