Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions appium/tests/screenobjects/inbox.screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,28 @@ class InboxScreen extends BaseScreen {
}

clickOnEmailBySubject = async (subject: string) => {
const selector = `~${subject}`;
const selector = `~${subject}`;
if (await (await $(selector)).isDisplayed() !== true) {
await TouchHelper.scrollDown();
}
await ElementHelper.waitAndClick(await $(selector), 500);
}

clickCreateEmail = async () => {
if (await (await this.createEmailButton).isDisplayed() !== true ) {
await browser.pause(2000); // todo: loading inbox. Fix this: wait until loader gone
if (await (await this.createEmailButton).isDisplayed() !== true) {
await TouchHelper.scrollDown();
await (await this.createEmailButton).waitForDisplayed();
}
Comment on lines 39 to 44
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a more proper fix - in inbox we should wait until loader is gone before interacting with/looking for the elements.

await ElementHelper.waitAndClick(await this.createEmailButton);
await ElementHelper.waitAndClick(await this.createEmailButton, 1000); // delay needed on M1
}

checkInboxScreen = async () => {
await (await this.inboxHeader).waitForDisplayed();
if (await (await this.createEmailButton).isDisplayed() !== true) {
await TouchHelper.scrollDown();
await (await this.createEmailButton).waitForDisplayed();
}
if (await (await this.createEmailButton).isDisplayed() !== true) {
await TouchHelper.scrollDown();
await (await this.createEmailButton).waitForDisplayed();
}
}
}

Expand Down