element-web/playwright/e2e
David Baker 67cb8b7590
Force verification even for refreshed clients (#44)
* Force verification even for refreshed cients

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.

* Hopefully make matrixchat tests pass?

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.

* Manual yarn.lock manipulation

to hopefully resolve infinite package sadness

* Make final test pass(?)

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.

* another waitFor

* death to flushPromises

* Put the logged in dispatch back

Actually it breaks all sorts of other things too, having fixed all the
MatrixChat tests (although this is useful anyway).

* Try displaying the screen in onClientStarted instead

* Put post login screen back in logged in

but move ready transition to avoid flash of main UI

* Rejig more in the hope it does the right thing

* Make hook work before push rules are fetched

* Add test for unskippable verification

* Add test for use case selection

* Fix test

* Add playwright test for unskippable verification

* Remove console log

* Add log message to log line

* Add tsdoc

* Use useTypedEventEmitter

* Remove commented code

* Use catch instead of empty then on unawaited promises

or in one case just await it because the caller was async anyway

* Add new mock
2024-10-03 08:55:06 +00:00
..
accessibility Change license (#13) 2024-09-09 13:57:16 +00:00
app-loading Change license (#13) 2024-09-09 13:57:16 +00:00
audio-player Change license (#13) 2024-09-09 13:57:16 +00:00
chat-export Change license (#13) 2024-09-09 13:57:16 +00:00
composer Change license (#13) 2024-09-09 13:57:16 +00:00
create-room Change license (#13) 2024-09-09 13:57:16 +00:00
crypto Improve error display for messages sent from insecure devices (#93) 2024-09-30 12:39:25 +00:00
editing Change license (#13) 2024-09-09 13:57:16 +00:00
file-upload Change license (#13) 2024-09-09 13:57:16 +00:00
forgot-password Change license (#13) 2024-09-09 13:57:16 +00:00
integration-manager Change license (#13) 2024-09-09 13:57:16 +00:00
invite Change license (#13) 2024-09-09 13:57:16 +00:00
knock Change license (#13) 2024-09-09 13:57:16 +00:00
lazy-loading Change license (#13) 2024-09-09 13:57:16 +00:00
left-panel Change license (#13) 2024-09-09 13:57:16 +00:00
location Change license (#13) 2024-09-09 13:57:16 +00:00
login Force verification even for refreshed clients (#44) 2024-10-03 08:55:06 +00:00
messages Change license (#13) 2024-09-09 13:57:16 +00:00
oidc Ensure no race condition between page load and waitForRequest set up (#109) 2024-10-02 10:21:44 +00:00
one-to-one-chat Change license (#13) 2024-09-09 13:57:16 +00:00
permalinks Change license (#13) 2024-09-09 13:57:16 +00:00
pinned-messages Change settings to true by default (#25) 2024-09-11 11:16:52 +00:00
polls Change license (#13) 2024-09-09 13:57:16 +00:00
presence Change license (#13) 2024-09-09 13:57:16 +00:00
read-receipts Remove right panel toggling behaviour on room header buttons (#100) 2024-09-30 16:36:24 +00:00
register Change license (#13) 2024-09-09 13:57:16 +00:00
regression-tests Change license (#13) 2024-09-09 13:57:16 +00:00
release-announcement Change license (#13) 2024-09-09 13:57:16 +00:00
right-panel Change license (#13) 2024-09-09 13:57:16 +00:00
room Open room settings on room header avatar click (#88) 2024-09-26 10:14:53 +00:00
room-directory Change license (#13) 2024-09-09 13:57:16 +00:00
room_options Change license (#13) 2024-09-09 13:57:16 +00:00
settings Change license (#13) 2024-09-09 13:57:16 +00:00
sliding-sync Change license (#13) 2024-09-09 13:57:16 +00:00
spaces Change license (#13) 2024-09-09 13:57:16 +00:00
spotlight Change license (#13) 2024-09-09 13:57:16 +00:00
threads Change license (#13) 2024-09-09 13:57:16 +00:00
timeline Change license (#13) 2024-09-09 13:57:16 +00:00
toasts Change license (#13) 2024-09-09 13:57:16 +00:00
update Change license (#13) 2024-09-09 13:57:16 +00:00
user-menu Change license (#13) 2024-09-09 13:57:16 +00:00
user-onboarding Change license (#13) 2024-09-09 13:57:16 +00:00
user-view Change license (#13) 2024-09-09 13:57:16 +00:00
widgets Change license (#13) 2024-09-09 13:57:16 +00:00
utils.ts Change license (#13) 2024-09-09 13:57:16 +00:00