From 7e56950437032a70870ab2daa5a77d586f5c9589 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 23 Feb 2023 17:36:50 -0300 Subject: [PATCH] Workaround for Android tapBack --- e2e/helpers/app.ts | 4 ++-- e2e/tests/room/02-room.spec.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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);