From 7c70821706b98647ae250385174d9148693212f1 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 17 Feb 2023 09:32:06 -0300 Subject: [PATCH] Threads --- e2e/tests/room/05-threads.spec.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/e2e/tests/room/05-threads.spec.ts b/e2e/tests/room/05-threads.spec.ts index 61c35229c..cdf56b14f 100644 --- a/e2e/tests/room/05-threads.spec.ts +++ b/e2e/tests/room/05-threads.spec.ts @@ -10,7 +10,8 @@ import { searchRoom, platformTypes, dismissReviewNag, - TTextMatcher + TTextMatcher, + tapAndWaitFor } from '../../helpers/app'; async function navigateToRoom(roomName: string) { @@ -221,18 +222,12 @@ describe('Threads', () => { await element(by.id('messagebox-input-thread')).replaceText(`${thread}draft`); await tapBack(); - await element(by.id(`message-thread-button-${thread}`)).tap(); - await waitFor(element(by.id(`room-view-title-${thread}`))) - .toExist() - .withTimeout(5000); + await tapAndWaitFor(element(by.id(`message-thread-button-${thread}`)), element(by.id(`room-view-title-${thread}`)), 2000); await expect(element(by.id('messagebox-input-thread'))).toHaveText(`${thread}draft`); await element(by.id('messagebox-input-thread')).clearText(); await tapBack(); - await element(by.id(`message-thread-button-${thread}`)).tap(); - await waitFor(element(by.id(`room-view-title-${thread}`))) - .toExist() - .withTimeout(5000); + await tapAndWaitFor(element(by.id(`message-thread-button-${thread}`)), element(by.id(`room-view-title-${thread}`)), 2000); await expect(element(by.id('messagebox-input-thread'))).toHaveText(''); }); });