Skip to content

test e2e: use encryption tab instead of Security & Settings tab in crypto.spec.ts#29595

Merged
florianduros merged 5 commits into
developfrom
florianduros/crypto-e2e
Apr 8, 2025
Merged

test e2e: use encryption tab instead of Security & Settings tab in crypto.spec.ts#29595
florianduros merged 5 commits into
developfrom
florianduros/crypto-e2e

Conversation

@florianduros
Copy link
Copy Markdown
Member

@florianduros florianduros commented Mar 26, 2025

Task #26468

Require matrix-org/matrix-js-sdk#4772

  • In the encryption tab, we can't set up key storage and the recovery key without verifying the device.
  • The passphrase is not available in the flow of key backup setup in the encryption tab

Comment thread playwright/e2e/crypto/crypto.spec.ts Outdated
Comment on lines 121 to 127
return await test.step("Fetch master key from server", async () => {
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];
});
console.log(`fetchMasterKey: ${k}`);
const k = await app.client.evaluate(
// @ts-ignore we can't use the CrossSigning enum here
async (cli) => await cli.getCrypto().getCrossSigningKeyId("master"),
);
return k;
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer fetches the master key from the server, which (a) means the description on the test step is wrong, but more to the point, (b) rather defeats the point of the test.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I have the issue that cli.downloadKeysForUsers still returns the old master key. Cf crypto lobby discussion, I wonder what we should do here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

LGTM otherwise

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread playwright/e2e/crypto/crypto.spec.ts Outdated
// Find the "reset cross signing" button, and click it
await app.settings.openUserSettings("Security & Privacy");
await page.locator("div.mx_CrossSigningPanel_buttonRow").getByRole("button", { name: "Reset" }).click();
// Find the Reset cryptographic identity button
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Find the Reset cryptographic identity button
// Find the "Reset cryptographic identity" button

@florianduros florianduros added this pull request to the merge queue Apr 8, 2025
Merged via the queue into develop with commit e2b7852 Apr 8, 2025
32 checks passed
@florianduros florianduros deleted the florianduros/crypto-e2e branch April 8, 2025 08:15
snowping pushed a commit to Novaloop-AG/element-web that referenced this pull request Jun 22, 2025
…ypto.spec.ts (element-hq#29595)

* test(e2e crypto): use encryption tab instead of Security & Settings tab in crypto.spec.ts

* test(e2e): remove wrong comment

* test(e2e crypto): keep `downloadKeysForUsers`

* test(e2e crypto): enter only password

* test: fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants