Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 8, 2025

Conversation

florianduros
Copy link
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 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
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
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
Member Author

Choose a reason for hiding this comment

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

Copy link
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
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

// 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
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
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