Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit db5716b

Browse files
authored
Fix SessionManagerTab-test (#9291)
1 parent 9d83fba commit db5716b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/components/views/settings/tabs/user/SessionManagerTab-test.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,11 @@ describe('<SessionManagerTab />', () => {
534534
) as Element).getAttribute('aria-disabled')).toEqual("true");
535535

536536
await flushPromisesWithFakeTimers();
537-
// modal rendering has some weird sleeps
538-
await sleep(100);
537+
538+
// Modal rendering has some weird sleeps.
539+
// Resetting ourselves twice in the main loop gives modal the chance to settle.
540+
await sleep(0);
541+
await sleep(0);
539542

540543
expect(mockClient.deleteMultipleDevices).toHaveBeenCalledWith(
541544
[alicesMobileDevice.device_id], undefined,

0 commit comments

Comments
 (0)