This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Force verification even for refreshed clients #44
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set a flag on login to remember that the device needs to be verified so that we don't forget if the user refreshes the page, but still allow user with an existing unverified session to stay logged in.
dbkr
changed the title
Force verification even for refreshed cients
Force verification even for refreshed clients
Sep 13, 2024
Much, much tweaking to make the matrixchat tests pass again. Should hopefully make them a bit more solid in general with judicious use of waitFor rather than flushPromises(). Also lots of fun to stop the state bleeding between tests.
to hopefully resolve infinite package sadness
Mock out the createClient method to return the same client, because we've mocked the peg to always return that client, so if we let the code make another one having still overridden the peg, everything becomes cursed. Also mock out the autodiscovery stuff rather than relying on fetch-mock.
Actually it breaks all sorts of other things too, having fixed all the MatrixChat tests (although this is useful anyway).
but move ready transition to avoid flash of main UI
richvdh
reviewed
Oct 1, 2024
florianduros
suggested changes
Oct 2, 2024
playwright/e2e/login/login.spec.ts
Outdated
Comment on lines
149
to
151
if (res.status() / 100 !== 2) { | ||
console.log(await res.json()); | ||
} |
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.
Remaining logging
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.
Actually these were intentional, but I can add a log line so it's more obvious.
or in one case just await it because the caller was async anyway
florianduros
approved these changes
Oct 2, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup on #29.
Set a flag on login to remember that the device needs to be verified so that we don't forget if the user refreshes the page, but still allow user with an existing unverified session to stay logged in.
With apologies to the reviewer, this involved changing the flow of what screens are shown when in MatrixChat, which turns out to be somewhat of a jenga tower, so most of the changes here are around getting the tests to pass again, including one to make the post-registration checkboxes not fail if they're displayed before the push rules are fetched. I can split that bit out but it's probably not worth it: the MatrixChat test fixes would be harder.
Checklist
public
/exported
symbols have accurate TSDoc documentation.