diff --git a/e2e/helpers/app.ts b/e2e/helpers/app.ts index 43a02d692..0ab67d036 100644 --- a/e2e/helpers/app.ts +++ b/e2e/helpers/app.ts @@ -137,9 +137,9 @@ async function dismissReviewNag() { } async function tapBack() { - if (device.getPlatform() === 'ios') { + try { await element(by.id('header-back')).atIndex(0).tap(); - } else { + } catch (error) { await device.pressBack(); } await sleep(300); // Wait for animation to finish diff --git a/e2e/tests/room/02-room.spec.ts b/e2e/tests/room/02-room.spec.ts index 8fad77186..1bee2eb8d 100644 --- a/e2e/tests/room/02-room.spec.ts +++ b/e2e/tests/room/02-room.spec.ts @@ -286,7 +286,6 @@ describe('Room screen', () => { it('should draft message', async () => { const draftMessage = 'draft'; await element(by.id('messagebox-input')).replaceText(draftMessage); - await device.pressBack(); // close keyboard await tapBack(); await navigateToRoom(room);