Skip to content

Commit 2c28180

Browse files
committed
test(e2e crypto): keep downloadKeysForUsers
1 parent 6a50c5c commit 2c28180

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

playwright/e2e/crypto/crypto.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ test.describe("Cryptography", function () {
118118
// Fetch the current cross-signing keys
119119
async function fetchMasterKey() {
120120
return await test.step("Fetch master key from server", async () => {
121-
const k = await app.client.evaluate(
122-
// @ts-ignore we can't use the CrossSigning enum here
123-
async (cli) => await cli.getCrypto().getCrossSigningKeyId("master"),
124-
);
121+
const k = await app.client.evaluate(async (cli) => {
122+
const userId = cli.getUserId();
123+
const keys = await cli.downloadKeysForUsers([userId]);
124+
return Object.values(keys.master_keys[userId].keys)[0];
125+
});
126+
console.log(`fetchMasterKey: ${k}`);
125127
return k;
126128
});
127129
}

0 commit comments

Comments
 (0)