This commit is contained in:
Diego Mello 2023-02-17 09:32:06 -03:00
parent b4b9192ba0
commit 7c70821706
1 changed files with 4 additions and 9 deletions

View File

@ -10,7 +10,8 @@ import {
searchRoom, searchRoom,
platformTypes, platformTypes,
dismissReviewNag, dismissReviewNag,
TTextMatcher TTextMatcher,
tapAndWaitFor
} from '../../helpers/app'; } from '../../helpers/app';
async function navigateToRoom(roomName: string) { async function navigateToRoom(roomName: string) {
@ -221,18 +222,12 @@ describe('Threads', () => {
await element(by.id('messagebox-input-thread')).replaceText(`${thread}draft`); await element(by.id('messagebox-input-thread')).replaceText(`${thread}draft`);
await tapBack(); await tapBack();
await element(by.id(`message-thread-button-${thread}`)).tap(); await tapAndWaitFor(element(by.id(`message-thread-button-${thread}`)), element(by.id(`room-view-title-${thread}`)), 2000);
await waitFor(element(by.id(`room-view-title-${thread}`)))
.toExist()
.withTimeout(5000);
await expect(element(by.id('messagebox-input-thread'))).toHaveText(`${thread}draft`); await expect(element(by.id('messagebox-input-thread'))).toHaveText(`${thread}draft`);
await element(by.id('messagebox-input-thread')).clearText(); await element(by.id('messagebox-input-thread')).clearText();
await tapBack(); await tapBack();
await element(by.id(`message-thread-button-${thread}`)).tap(); await tapAndWaitFor(element(by.id(`message-thread-button-${thread}`)), element(by.id(`room-view-title-${thread}`)), 2000);
await waitFor(element(by.id(`room-view-title-${thread}`)))
.toExist()
.withTimeout(5000);
await expect(element(by.id('messagebox-input-thread'))).toHaveText(''); await expect(element(by.id('messagebox-input-thread'))).toHaveText('');
}); });
}); });