-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
e2e test: Check key backup with js-sdk api instead of relying of Security & Privacy
tab
#29066
Conversation
…up with the matrix client and the crypto api instead of relying of the `Security & Privacy` tab.
cb0d855
to
44c6d1d
Compare
@@ -68,8 +68,8 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => { | |||
|
|||
// Check that the current device is connected to key backup | |||
// For now we don't check that the backup key is in cache because it's a bit flaky, | |||
// as we need to wait for the secret gossiping to happen and the settings dialog doesn't refresh automatically. | |||
await checkDeviceIsConnectedKeyBackup(page, expectedBackupVersion, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still not working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just this test isn't working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The others are working if we check that the key backup is in cache but this one is failing (so I kept the false
attribute)
playwright/e2e/crypto/utils.ts
Outdated
@@ -139,12 +139,12 @@ export async function checkDeviceIsCrossSigned(app: ElementAppPage): Promise<voi | |||
* Check that the current device is connected to the expected key backup. | |||
* Also checks that the decryption key is known and cached locally. | |||
* | |||
* @param page - the page to check | |||
* @param app - app page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that means that the check on the page is not up-to-date, but the check using the API is ok?
Doesn't that mean that there is a refresh bug on the UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This UI section will be removed in #26468. The e2e tests were using this section to check if the key storage was in the expected state.
- It was not a good practice, we should not look at the ui for this kind of verification (we are not testing this part of the ui)
- The UI will be removed so we need to find another way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm in principle. A few cleanups
944f661
to
6487612
Compare
Checklist
public
/exported
symbols have accurate TSDoc documentation.In #26468, the key backup section of the
Security & Privacy
tab will be removed.To check if the key backup is in the expected state, we can directly use the matrix client and the crypto api.