element-web/test
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
..
@types Change license (#13) 2024-09-09 13:57:16 +00:00
__snapshots__ Allow Chrome page translator to translate messages in rooms (#11113) 2024-07-25 16:58:33 +00:00
accessibility Change license (#13) 2024-09-09 13:57:16 +00:00
actions/handlers Change license (#13) 2024-09-09 13:57:16 +00:00
audio Change license (#13) 2024-09-09 13:57:16 +00:00
autocomplete Change license (#13) 2024-09-09 13:57:16 +00:00
components Force verification even for refreshed clients (#44) 2024-10-03 08:55:06 +00:00
contexts Change license (#13) 2024-09-09 13:57:16 +00:00
customisations Change license (#13) 2024-09-09 13:57:16 +00:00
dispatcher Change license (#13) 2024-09-09 13:57:16 +00:00
editor Change license (#13) 2024-09-09 13:57:16 +00:00
events Change license (#13) 2024-09-09 13:57:16 +00:00
hooks Change license (#13) 2024-09-09 13:57:16 +00:00
i18n Use Intl for names of languages (#11427) 2023-08-22 14:07:16 +00:00
images
img
integrations Change license (#13) 2024-09-09 13:57:16 +00:00
models Change license (#13) 2024-09-09 13:57:16 +00:00
modules Change license (#13) 2024-09-09 13:57:16 +00:00
notifications Change license (#13) 2024-09-09 13:57:16 +00:00
settings Disable ICE fallback based on well-known configuration (#111) 2024-10-02 14:08:15 +00:00
setup Change license (#13) 2024-09-09 13:57:16 +00:00
stores Remove right panel toggling behaviour on room header buttons (#100) 2024-09-30 16:36:24 +00:00
test-utils Add labs option to exclude unverified devices (#92) 2024-09-30 10:29:14 +00:00
toasts Change license (#13) 2024-09-09 13:57:16 +00:00
utils Allow to unpin redacted event (#98) 2024-10-02 08:23:22 +00:00
voice-broadcast Use Compound close icon in favour of mishmash of x/close icons (#108) 2024-10-02 10:06:17 +00:00
widgets Change license (#13) 2024-09-09 13:57:16 +00:00
Avatar-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
ContentMessages-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
DecryptionFailureTracker-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
DeviceListener-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
HtmlUtils-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
Image-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
KeyBindingsManager-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
LegacyCallHandler-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Lifecycle-test.ts Use new AES functions (#97) 2024-10-01 14:12:46 +00:00
Markdown-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
MatrixClientPeg-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
MediaDeviceHandler-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Modal-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Notifier-test.ts Allow joining calls and video rooms without enabling the labs flags (#95) 2024-09-30 14:07:53 +00:00
PosthogAnalytics-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
PreferredRoomVersions-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Reply-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
RoomNotifs-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Rooms-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
ScalarAuthClient-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
SdkConfig-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
SecurityManager-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
SlashCommands-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
SlidingSyncManager-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
SupportedBrowser-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Terms-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
TestSdkContext.ts Change license (#13) 2024-09-09 13:57:16 +00:00
TextForEvent-test.ts Unlabs feature pinning (#22) 2024-09-16 14:51:59 +00:00
TimezoneHandler-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
Unread-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
UserActivity-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
WorkerManager-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
createRoom-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
email-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
globalSetup.ts Change license (#13) 2024-09-09 13:57:16 +00:00
languageHandler-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
linkify-matrix-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
predictableRandom.ts Change license (#13) 2024-09-09 13:57:16 +00:00
setupTests.ts Change license (#13) 2024-09-09 13:57:16 +00:00
slowReporter.cjs Change license (#13) 2024-09-09 13:57:16 +00:00
submit-rageshake-test.ts Unlabs feature pinning (#22) 2024-09-16 14:51:59 +00:00
theme-test.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useTopic-test.tsx Change license (#13) 2024-09-09 13:57:16 +00:00