element-web-Github/test/components/structures
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
..
__snapshots__ Force verification even for refreshed clients (#44) 2024-10-03 08:55:06 +00:00
auth Mobile registration optimizations and tests (#62) 2024-09-20 11:24:39 +00:00
AutocompleteInput-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
ContextMenu-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
FilePanel-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
LargeLoader-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
LeftPanel-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
LegacyCallEventGrouper-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
LoggedInView-test.tsx Add timezone to user profile (#20) 2024-09-12 13:18:25 +00:00
MainSplit-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
MatrixChat-test.tsx Force verification even for refreshed clients (#44) 2024-10-03 08:55:06 +00:00
MatrixClientContextProvider-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
MessagePanel-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
PictureInPictureDragger-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
PipContainer-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
ReleaseAnnouncement-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
RightPanel-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
RoomSearchView-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
RoomStatusBar-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
RoomStatusBarUnsentMessages-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
RoomView-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
SpaceHierarchy-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
TabbedView-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
ThreadPanel-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
ThreadView-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
TimelinePanel-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
UploadBar-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
UserMenu-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
ViewSource-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00