Deflake verification playwright tests (#12669)

Turns out the sleep that got removed in
https://github.com/matrix-org/matrix-react-sdk/pull/12667 was useful.
This commit is contained in:
Richard van der Hoff 2024-06-21 17:58:38 +01:00 committed by GitHub
parent 5eb5ea81d5
commit 736b083a79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 4 deletions

View file

@ -50,11 +50,17 @@ test.describe("Device verification", () => {
bootstrapSecretStorage: true,
});
aliceBotClient.setCredentials(credentials);
const mxClientHandle = await aliceBotClient.prepareClient();
expectedBackupVersion = await mxClientHandle.evaluate(async (mxClient) => {
return await mxClient.getCrypto()!.getActiveSessionBackupVersion();
});
// Backup is prepared in the background. Poll until it is ready.
const botClientHandle = await aliceBotClient.prepareClient();
await expect
.poll(async () => {
expectedBackupVersion = await botClientHandle.evaluate((cli) =>
cli.getCrypto()!.getActiveSessionBackupVersion(),
);
return expectedBackupVersion;
})
.not.toBe(null);
});
// Click the "Verify with another device" button, and have the bot client auto-accept it.