From 1b3ae0fcb81c031293062715a2f430e27a0f9c23 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 1 Mar 2023 14:47:49 -0300 Subject: [PATCH] Fix flaky test --- e2e/tests/room/04-discussion.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/tests/room/04-discussion.spec.ts b/e2e/tests/room/04-discussion.spec.ts index b4f056b3f..84e1afa37 100644 --- a/e2e/tests/room/04-discussion.spec.ts +++ b/e2e/tests/room/04-discussion.spec.ts @@ -7,7 +7,8 @@ import { tapBack, navigateToRoom, platformTypes, - mockRandomMessage + mockRandomMessage, + sleep } from '../../helpers/app'; import { createRandomRoom, createRandomUser, ITestUser } from '../../helpers/data_setup'; import random from '../../helpers/random'; @@ -101,6 +102,7 @@ describe('Discussion', () => { it('should create discussion', async () => { await element(by[textMatcher](discussionFromActionSheet)).atIndex(0).tap(); await element(by[textMatcher](discussionFromActionSheet)).atIndex(0).longPress(); + await sleep(300); // wait for animation await waitFor(element(by.id('action-sheet'))) .toExist() .withTimeout(2000);