* Update location.spec.ts - use Cypress Testing Library
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Make the test id of location share option discoverable with findByTestId()
findByTestId seeks for data-testid, instead of data-test-id.
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
---------
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Conform more of the codebase to `strictNullChecks`
* Conform more of the codebase to `strictNullChecks`
* Fix types
* Conform more of the codebase to `strictNullChecks`
* Conform more of the codebase to `strictNullChecks`
* Properly translate errors in AddThreepid.ts
Part of https://github.com/vector-im/element-web/issues/9597
* Use translated message
* Avoid returning undefined ever
* More usage
* Introduce UserFriendlyError
* Use UserFriendlyError
* Add more usage instead of normal error
* Use types and translatedMessage
* Fix lints
* Update i18n although it's wrong
* Use unknown for easier creation from try/catch
* Use types
* Use error types
* Use types
* Update i18n strings
* Remove generic re-label of HTTPError
See https://github.com/matrix-org/matrix-react-sdk/pull/10432#discussion_r1156468143
The HTTPError already has a good label and it isn't even translated if we re-label it here in this way generically
Probably best to just remove in favor of thinking about a translations in general from the `matrix-js-sdk`, see https://github.com/matrix-org/matrix-js-sdk/issues/1309
* Make error message extraction generic
* Update i18n strings
* Add tests for email addresses
* More consistent error logging to actually see error in logs
* Consistent error handling
* Any is okay because we have a fallback
* Check error type
* Use dedicated mockResolvedValue function
See https://github.com/matrix-org/matrix-react-sdk/pull/10432#discussion_r1163344034
* Remove dependency on `org.matrix.e2e_cross_signing` unstable feature
Currently, we have some code that relies on the server declaring support for an
`unstable_feature` called `org.matrix.e2e_cross_signing`. There is nothing in
the spec that requires this, so this would make us incompatible with some
server implementations.
The features in question were added in spec v1.1, so we can test for that
instead.
* fix unit test
* Simplify `isDeviceVerified` definitions
Currently, we have two similar but different definitions of `isDeviceVerified`,
and they both do a lot of wrangling that relies on js-sdk internals. We can
simplify it a lot by just calling `MatrixClientPeg.checkDeviceTrust`.
* fix tests
* more test fixes
* Use AccessibleButton for "Accept" on AuthPage
- Use AccessibleButton
- Remove mx_InteractiveAuthEntryComponents_termsSubmit:disabled as disabled state is handled by AccessibleButton
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Empty commit
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
---------
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Update user-view.spec.ts - use Cypress Testing Library
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Remove a line to have the test wait until the spinner disappears
The custom command 'percySnapshotElement' waits until it disappears so there is no need to keep it.
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
---------
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Improve typing in constructor of RoomPermalinkCreator
* Provide via servers if present when navigating to predecessor room from Advanced Room Settings
* Show an error tile when the predecessor room is not found
* Test for MatrixToPermalinkConstructor.forRoom
* Test for MatrixToPermalinkConstructor.forEvent
* Display a tile for predecessor event if it contains via servers
* Fix missing case where event id is provided as well as via servers
* Refactor RoomPredecessor tests
* Return lost filterConsole to its home
* Comments for IState in AdvancedRoomSettingsTab
* Explain why we might render a tile even without prevRoom
* Guess the old room's via servers if they are not provided
* Fix TypeScript errors
* Adjust regular expression (hopefully) to avoid potential catastrophic backtracking
* Another attempt at avoiding super-liner regex performance
* Tests for guessServerNameFromRoomId and better implementation
* Further attempt to prevent backtracking
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests to ensure file size unit has been fixed
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Update cypress/e2e/timeline/timeline.spec.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Edit comments mentioning kilobytes
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
---------
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Lock file maintenance
* Pin jest
* Pin back jest-canvas-mock
* Roll back jest
* Roll back jest
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>