element-web/test/components/views
Callum Brown 6961c25603
Support registration tokens (#7275)
* Support token authenticated registration

https://spec.matrix.org/v1.2/client-server-api/#token-authenticated-registration

Signed-off-by: Callum Brown <callum@calcuode.com>

* Backwards compatibility with unstable auth type

Some server installs are not updated to use the stable version
of the registration token authentication type, so also handle
the unstable version defined in MSC3231.

Signed-off-by: Callum Brown <callum@calcuode.com>

* Make LOGIN_TYPE public and readonly

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Remove line related to skinning

Signed-off-by: Callum Brown <callum@calcuode.com>

* Change empty string to null

Signed-off-by: Callum Brown <callum@calcuode.com>

* Use "public"s for new code style

Signed-off-by: Callum Brown <callum@calcuode.com>

* Change input to AccessibleButton

Signed-off-by: Callum Brown <callum@calcuode.com>

* Add more detail regarding source of token

Signed-off-by: Callum Brown <callum@calcuode.com>

* Fix lint error

The text and button type will be the same every time
for registration tokens, unlike (possibly) for SSO.

Signed-off-by: Callum Brown <callum@calcuode.com>

* Change null back to ""

Due to the following warning when attempting to test:
> Warning: `value` prop on `input` should not be null.
> Consider using an empty string to clear the component or
> `undefined` for uncontrolled components.

Signed-off-by: Callum Brown <callum@calcuode.com>

* Disable submit button when no token entered

Signed-off-by: Callum Brown <callum@calcuode.com>

* Add test for registration tokens

Adapted from test/components/views/dialogs/InteractiveAuthDialog-test.tsx

Signed-off-by: Callum Brown <callum@calcuode.com>

* Fix linting errors

Signed-off-by: Callum Brown <callum@calcuode.com>

* Fix test for registration tokens

Signed-off-by: Callum Brown <callum@calcuode.com>

Signed-off-by: Callum Brown <callum@calcuode.com>
Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-01-24 12:02:07 +00:00
..
audio_messages Fix seekbar position for zero length audio (#9949) 2023-01-23 17:28:31 +01:00
auth Support registration tokens (#7275) 2023-01-24 12:02:07 +00:00
avatars Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
beacon Convert enzyme to rtl: BeaconMarker (#9840) 2023-01-04 10:00:13 +00:00
beta Apply prettier formatting 2022-12-12 12:24:14 +01:00
context_menus Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
dialogs Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
elements Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00
location Migrate Enzyme to RTL (#9842) 2022-12-29 15:35:19 +00:00
messages convert MPollBody tests into rtl (#9906) 2023-01-16 01:25:33 +00:00
right_panel Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
rooms Fix RTE focus behaviour in threads 2023-01-23 15:41:01 +01:00
settings Fix mock client missing user functions (#9887) 2023-01-11 11:33:06 +00:00
spaces Enzyme to rtl: QuickThemeSwitcher (#9843) 2022-12-29 12:44:18 +00:00
typography Apply prettier formatting 2022-12-12 12:24:14 +01:00
user-onboarding Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
voip Redesign the picture-in-picture window (#9800) 2023-01-04 04:44:38 +00:00
Validation-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00