From b77e24d56b92d6d80c256df8d9bae74951ad0559 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 21 Dec 2023 10:02:34 +0000 Subject: [PATCH] Workaround Rust Crypto key upload race condition for Playwright tests (#12076) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/pages/bot.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playwright/pages/bot.ts b/playwright/pages/bot.ts index 1bac352692b..69833bffa4e 100644 --- a/playwright/pages/bot.ts +++ b/playwright/pages/bot.ts @@ -193,6 +193,10 @@ export class Bot extends Client { await cli.startClient(); if (opts.bootstrapCrossSigning) { + // XXX: workaround https://github.com/element-hq/element-web/issues/26755 + // wait for out device list to be available, as a proxy for the device keys having been uploaded. + await cli.getCrypto()!.getUserDeviceInfo([credentials.userId]); + await cli.getCrypto()!.bootstrapCrossSigning({ authUploadDeviceSigningKeys: async (func) => { await func({