Workaround for Android tapBack

This commit is contained in:
Diego Mello 2023-02-23 17:36:50 -03:00
parent 1e850b2840
commit 7e56950437
2 changed files with 2 additions and 3 deletions

View File

@ -137,9 +137,9 @@ async function dismissReviewNag() {
} }
async function tapBack() { async function tapBack() {
if (device.getPlatform() === 'ios') { try {
await element(by.id('header-back')).atIndex(0).tap(); await element(by.id('header-back')).atIndex(0).tap();
} else { } catch (error) {
await device.pressBack(); await device.pressBack();
} }
await sleep(300); // Wait for animation to finish await sleep(300); // Wait for animation to finish

View File

@ -286,7 +286,6 @@ describe('Room screen', () => {
it('should draft message', async () => { it('should draft message', async () => {
const draftMessage = 'draft'; const draftMessage = 'draft';
await element(by.id('messagebox-input')).replaceText(draftMessage); await element(by.id('messagebox-input')).replaceText(draftMessage);
await device.pressBack(); // close keyboard
await tapBack(); await tapBack();
await navigateToRoom(room); await navigateToRoom(room);