Skip to content

Commit 59148b3

Browse files
authored
issue #1070 stabilize inbox screen (#1075)
1 parent 51f5cf5 commit 59148b3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

appium/tests/screenobjects/inbox.screen.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,28 @@ class InboxScreen extends BaseScreen {
2929
}
3030

3131
clickOnEmailBySubject = async (subject: string) => {
32-
const selector = `~${subject}`;
32+
const selector = `~${subject}`;
3333
if (await (await $(selector)).isDisplayed() !== true) {
3434
await TouchHelper.scrollDown();
3535
}
3636
await ElementHelper.waitAndClick(await $(selector), 500);
3737
}
3838

3939
clickCreateEmail = async () => {
40-
if (await (await this.createEmailButton).isDisplayed() !== true ) {
40+
await browser.pause(2000); // todo: loading inbox. Fix this: wait until loader gone
41+
if (await (await this.createEmailButton).isDisplayed() !== true) {
4142
await TouchHelper.scrollDown();
4243
await (await this.createEmailButton).waitForDisplayed();
4344
}
44-
await ElementHelper.waitAndClick(await this.createEmailButton);
45+
await ElementHelper.waitAndClick(await this.createEmailButton, 1000); // delay needed on M1
4546
}
4647

4748
checkInboxScreen = async () => {
4849
await (await this.inboxHeader).waitForDisplayed();
49-
if (await (await this.createEmailButton).isDisplayed() !== true) {
50-
await TouchHelper.scrollDown();
51-
await (await this.createEmailButton).waitForDisplayed();
52-
}
50+
if (await (await this.createEmailButton).isDisplayed() !== true) {
51+
await TouchHelper.scrollDown();
52+
await (await this.createEmailButton).waitForDisplayed();
53+
}
5354
}
5455
}
5556

0 commit comments

Comments
 (0)