We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
downloadKeysForUsers
1 parent 6a50c5c commit 2c28180Copy full SHA for 2c28180
playwright/e2e/crypto/crypto.spec.ts
@@ -118,10 +118,12 @@ test.describe("Cryptography", function () {
118
// Fetch the current cross-signing keys
119
async function fetchMasterKey() {
120
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
- );
+ const k = await app.client.evaluate(async (cli) => {
+ const userId = cli.getUserId();
+ const keys = await cli.downloadKeysForUsers([userId]);
+ return Object.values(keys.master_keys[userId].keys)[0];
125
+ });
126
+ console.log(`fetchMasterKey: ${k}`);
127
return k;
128
});
129
}
0 commit comments