-
-
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
Add a playwright test for backup reset / deleted #28858
Conversation
A slightly tricky one to test but an important case that people can hit, and one that otherwise wouldn't get hit a lot during normal usage, so I think probably quite a useful test to have. Mostly though, I'm about to change this to a toast, so I'd like a test to assert that it still works.
// @ts-ignore - this runs in the browser scope where mxMatrixClientPeg is a thing. Here, it is not. | ||
const accessToken = await page.evaluate(() => mxMatrixClientPeg.get().getAccessToken()); | ||
|
||
const csAPI = new TestClientServerAPI(request, homeserver, accessToken); |
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.
Why not use the MatrixClient to delete or to get the current backup info ?
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.
I was attempting to make it as much like a different client deleting the backup as possible, although what it ended up as isn't really much different from using the app's own matrix client. It still felt a little bit cleaner to use the API separately rather than inject code into the app, but I can change it if that's preferred.
Co-authored-by: Florian Duros <[email protected]>
A slightly tricky one to test but an important case that people can hit, and one that otherwise wouldn't get hit a lot during normal usage, so I think probably quite a useful test to have. Mostly though, I'm about to change this to a toast, so I'd like a test to assert that it still works.
Requires matrix-org/matrix-js-sdk#4601
Checklist
public
/exported
symbols have accurate TSDoc documentation.