From db5716b77628f07450be069ed5eae017f49c28cc Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Fri, 16 Sep 2022 14:00:01 +0200 Subject: [PATCH] Fix SessionManagerTab-test (#9291) --- .../views/settings/tabs/user/SessionManagerTab-test.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx b/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx index a281708a40..c69e71c32c 100644 --- a/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx +++ b/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx @@ -534,8 +534,11 @@ describe('', () => { ) as Element).getAttribute('aria-disabled')).toEqual("true"); await flushPromisesWithFakeTimers(); - // modal rendering has some weird sleeps - await sleep(100); + + // Modal rendering has some weird sleeps. + // Resetting ourselves twice in the main loop gives modal the chance to settle. + await sleep(0); + await sleep(0); expect(mockClient.deleteMultipleDevices).toHaveBeenCalledWith( [alicesMobileDevice.device_id], undefined,