Fix SessionManagerTab-test (#9291)

This commit is contained in:
Michael Weimann 2022-09-16 14:00:01 +02:00 committed by GitHub
parent 9d83fba5ca
commit db5716b776
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -534,8 +534,11 @@ describe('<SessionManagerTab />', () => {
) 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,