From 574d2beb3bc42e8758039d76396c32b2a27a1b3f Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 31 Mar 2023 15:08:07 -0300 Subject: [PATCH] Fix some e2e flaky tests --- e2e/tests/room/03-roomactions.spec.ts | 1 + e2e/tests/room/09-jumptomessage.spec.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/tests/room/03-roomactions.spec.ts b/e2e/tests/room/03-roomactions.spec.ts index 8c76ace0e..1f19fc158 100644 --- a/e2e/tests/room/03-roomactions.spec.ts +++ b/e2e/tests/room/03-roomactions.spec.ts @@ -345,6 +345,7 @@ describe('Room actions screen', () => { await waitFor(element(by.id('room-actions-members'))) .toExist() .withTimeout(2000); + await sleep(300); // wait for animation await tapAndWaitFor(element(by.id('room-actions-members')), element(by.id('room-members-view')), 2000); }); diff --git a/e2e/tests/room/09-jumptomessage.spec.ts b/e2e/tests/room/09-jumptomessage.spec.ts index 84736464f..cb648f98b 100644 --- a/e2e/tests/room/09-jumptomessage.spec.ts +++ b/e2e/tests/room/09-jumptomessage.spec.ts @@ -15,11 +15,13 @@ async function clearCache() { .toBeVisible() .withTimeout(10000); await element(by.id('rooms-list-view-sidebar')).tap(); - await waitFor(element(by.id('sidebar-view'))) + await sleep(300); // wait animation + await waitFor(element(by.id('sidebar-settings'))) .toBeVisible() .withTimeout(2000); await element(by.id('sidebar-settings')).tap(); - await waitFor(element(by.id('settings-view'))) + await sleep(300); // wait animation + await waitFor(element(by.id('settings-view-clear-cache'))) .toBeVisible() .withTimeout(2000); await element(by.id('settings-view-clear-cache')).tap();