Commit Graph

364 Commits (b496fe0a2bf11a3837e6e05e2e9b36f19b9e235c)

Author SHA1 Message Date
Kerry 8513d2f4ff
Fix: flaky percy test "Rendering permalinks" (#10874)
* hide timestamp

* retrigger sonar

* trigger build

* hide elements instead of removing them which might effect scroll

* lint
2023-05-19 02:53:44 +00:00
Richard van der Hoff 6c262fff6b
Deflake `spotlight` cypress tests (#10943)
* Avoid racing with dialog update

* Wait for rooms to update before opening dialog

* Remove some apparently-spurious `wait`s
2023-05-18 21:44:37 +00:00
Richard van der Hoff 8654a24405
Minor cleanups to `handleVerificationRequest` in cypress tests (#10941)
* Remove redundant `verifier.done()` call

This `done` call completes the verification process and stops it responding
with further messages. It is unnecessary, *provided* the verification completes
successfully, for which see
https://github.com/matrix-org/matrix-js-sdk/pull/3382.

* Remove duplicated code in `decryption-failure` test

* remove unused imports
2023-05-18 15:12:41 +00:00
Suguru Hirahara 7d0c68aa29
Edit `room-header.spec.ts` to check apps button (#10934)
* Edit room-header.spec.ts to check apps button

* Check aria-checked status instead

* Edit a comment
2023-05-18 12:54:53 +00:00
Kerry 8cd84b0e7b
Use semantic headings in user settings - integrations and account deletion (#10837)
* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* put back margin var

* use SettingsTab wrapper

* use semantic headings for deactivate acc section

* use semantic heading in manage integratios

* i18n

* explicit cast to boolean

* Update src/components/views/settings/shared/SettingsSubsection.tsx

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* test manage integration settings

* test deactivate account section display

* remove debug

* fix cypress test

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-05-17 07:52:44 +00:00
Kerry 38ae8e98e4
Use semantic headings in user settings Preferences (#10794)
* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* use semantic headings in usersettingspreferences

* rethemendex

* put back margin var
2023-05-17 01:16:49 +00:00
Suguru Hirahara e01d47923d
Deprecate `mx_RightPanel_headerButton` class (#10821)
* Replace: %s/mx_RightPanel_headerButton/mx_RoomHeader_button/g

* Conform the selectors to our naming policy: with flag (--)

- %s/mx_RoomHeader_button_highlight/mx_RoomHeader_button--highlight/g
- %s/mx_RoomHeader_button_unread/mx_RoomHeader_button--unread/g

* Update a Jest snapshot

* Move the declarations and Sass variables

- Move Sass variables to the place where they are used
2023-05-16 15:42:58 +00:00
Richard van der Hoff 81df8a3d2b
Add intercept of `config.json` (#10908)
* Add intercept of `config.json`

To help make sure that we run our tests against a known config, rather than
accidentally making requests to `matrix.org`.

* Remove now-redundant stubs of matrix.org files

Now that we intercept config.json, all this stuff is redundant.

* Reinstate fixture which is actually used

Turns out this is used after all

* Add a `map_style_url`

* disable failing axe check
2023-05-16 12:15:20 +00:00
alunturner 0d981326ac
RTE plain text mentions as pills (#10852)
* insert mentions as links styled as pills

* post merge fix and update test

* update comments, move typeguard out

* create a text node instead of setting innerText

* update test

* update test

* fix broken cypress test, remove .only

* make it able to deal with inserting in middle of blank lines

* update comment

* fix strict null error

* use typeguard

* avoid implicit truth check

* add hook tests

* add comment

* Update test/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>

---------

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-05-16 11:54:16 +00:00
Michael Weimann 4e5687c454
Send correct receipts when viewing a room (#10864)
* Send correct receipts when viewing a room

* Fix strict type issues

* Handle promises

* Handle more primises

* Add generic array type

* Replace existende check with type predicate

* Fix wrong variable check

* Improve comment about initial read marker

* Use read_markers API for fully read receipts

* Log public receipt fallback

* Rename variables in new code to be aligned to the spec

* Add end-2-end test for read markers and receipts
2023-05-15 16:06:02 +00:00
Michael Telatynski 8b7eb8bb1d
Fix aria-required-children axe violation (#10900)
* Fix aria-required-children axe violation

* Fix test selector
2023-05-15 12:36:28 +00:00
Suguru Hirahara 4d59a6ff1f
Fix timeline search bar being overlapped by the right panel (#10809)
* Set zero min-width to prevent input area blowout

* Set min-width values to mx_SearchBar_input and mx_SearchBar_button

* Prevent the input area and cancel button from being overlapped by BaseCard

* Use custom properties: --size-button-search

* Take Percy snapshot of mx_SearchBar

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Edit a comment

* Feedback

* Edit a comment

* Update cypress/e2e/timeline/timeline.spec.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-05-15 11:58:59 +00:00
Suguru Hirahara 3b2216ec9d
Fix class name of the read marker on `MessagePanel` (#10745)
* Optimize mx_RoomView_myReadMarker

- Replace the compound selector with a type selector
- Nest the type selector in "mx_RoomView_myReadMarker_container"

* Conform the style rules to the naming policy

Including "container" in a class name is redundant as our naming policy tells that a string followed by an underscore (_) represents a container if it contains an element.

* Run prettier

* Replace `mx_RoomView_myReadMarker hr` with `mx_RoomView_myReadMarker`

- Remove a unit
- Hide hr's parent (mx_RoomView_myReadMarker) on Percy snapshots

* Change the class name from `mx_RoomView_myReadMarker` to `mx_MessagePanel_myReadMarker`

The read marker is specified on MessagePanel.tsx, and should be named so to avoid confusion.

- Create _MessagePanel.pcss for the style rules of MessagePanel

* Update permalinks.spec.ts
2023-05-15 11:02:04 +00:00
Richard van der Hoff ed06219dcd
Fix cypress test in spotlight tests (#10884)
Sometimes, when I ran these tests locally, they would fail. The problem appears
to be that the join takes some time and can end up racing against the body of
the test. The solution is to wait for the join to complete before proceeding.
2023-05-15 10:37:24 +00:00
Suguru Hirahara 857b3085e6
Merge `theme-choice-panel.spec.ts` with `appearance-user-settings-tab.spec.ts` (#10890)
* Merge theme-choice-panel.spec.ts with appearance-user-settings-tab.spec.ts

* Remove theme-choice-panel.spec.ts

* Remove redundant lines

* Run prettier
2023-05-15 08:58:19 +00:00
Suguru Hirahara cb779fe872
Conform the style rules of `GeneralUserSettingsTab.tsx` to the style guide (#10595)
* Nesting: `mx_GeneralUserSettingsTab_changePassword`

* Nesting: `mx_Spinner`

* Conform the style rules to the naming policy

For elements inside "mx_GeneralUserSettingsTab_accountSection" and "mx_GeneralUserSettingsTab_discovery"

* Conform `mx_GeneralUserSettingsTab_discovery_existing*` to the naming policy
2023-05-12 10:33:01 +00:00
Suguru Hirahara 01238c1c38
Edit widths of Percy snapshots of "User settings tab - Appearance" (#10861) 2023-05-12 10:00:01 +00:00
Andy Balaam dbf73f725f
Disable two flaky Percy tests - see #25283 and #24881 (#10878) 2023-05-12 09:56:32 +00:00
Andy Balaam 415fcde5e8
Cypress tests for read receipts, threaded and unthreaded (#10872) 2023-05-12 08:04:33 +00:00
Kerry 2767fd623a
Percy: hide timestamp in permalink rendering screenshot test (#10836)
* hide timestamp

* retrigger sonar

* trigger build
2023-05-12 01:45:31 +00:00
alunturner 0889dc55da
Room and user mentions for plain text editor (#10665)
* update useSuggestion

* update useSuggestion-tests

* add processMention tests

* add test

* add getMentionOrCommand tests

* change mock href for codeQL reasons

* fix TS issue in test

* add a big old cypress test

* fix lint error

* update comments

* reorganise functions in order of importance

* rename functions and variables

* add endOffset to return object

* fix failing tests

* update function names and comments

* update comment, remove delay

* update comments and early return

* nest mappedSuggestion inside Suggestion state and update test

* rename suggestion => suggestionData

* update comment

* add argument to findSuggestionInText

* make findSuggestionInText return mappedSuggestion

* fix TS error

* update comments and index check from === -1 to < 0

* tidy logic in increment functions

* rename variable

* Big refactor to address multiple comments, improve behaviour and add tests

* improve comments

* tidy up comment

* extend comment

* combine similar returns

* update comment

* remove single use variable

* fix comments
2023-05-11 14:28:42 +00:00
Richard van der Hoff 9aade5a4d5
Improve cypress logging output (#10845)
... by grouping together the output from some custom commands.
2023-05-11 10:46:50 +00:00
Richard van der Hoff 2d58489309
Cypress test to check cross-signing keys on register (#10850)
Part of https://github.com/vector-im/element-web/issues/25314
2023-05-11 10:34:52 +00:00
Richard van der Hoff 3c32ad7cab
Fix CSP problems due to cypress-axe (#10843)
* Fix CSP problems due to cypress-axe

Rewrite `injectAxe` to use a script tag instead of an `eval`.

* remove gha workflow hack
2023-05-11 10:31:09 +00:00
Suguru Hirahara eac548c25a
Fix snapshot `File Panel - empty` (#10855) 2023-05-11 09:25:28 +00:00
Suguru Hirahara 16ec3b5d7b
Add `appearance-user-settings-tab.spec.ts` (#10697)
* Add `appearance-user-settings-tab.spec.ts`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Empty commit

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix a comment

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-11 06:33:50 +00:00
Kerry 675756a699
Flaky Cypress test - `should handle long room address and long room name` on right-panel.spec.ts (#10835)
* wait for room alias to be set before closing modal

* retrigger sonar
2023-05-11 02:32:32 +00:00
Suguru Hirahara c4f59d4d56
Add E2E test of `ThemeChoicePanel` (#10469)
* Add E2E test of ThemeChoicePanel

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Edit a comment

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Apply feedback

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove obsolete data-testId attributes

They has become obsolete with bfa8152538a3a0804ac14e231578d0cba73aa308.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Update a jest snapshot

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-09 13:48:55 +00:00
Suguru Hirahara ed5c02be6d
Fix long room address and name not being clipped on room info card and update `_RoomSummaryCard.pcss` (#10811)
* Handle a long room address and name with ellipsis on RoomSummaryCard

* Use a class selector for maintainability

Sort the selectors
2023-05-09 07:56:09 +00:00
Suguru Hirahara 1cfe126e14
Fix icon on empty notification panel (#10817)
* Use custom properties for the empty panel icons on FilePanel and NotificationPanel

* Create E2E test for the notification panel
2023-05-09 05:02:08 +00:00
Suguru Hirahara 56f694620c
Update file-panel.spec.ts to take a snapshot of the empty file panel (#10814) 2023-05-08 05:25:23 +00:00
Suguru Hirahara 00fe0b4316
Fix the color of the verified E2EE icon on RoomSummaryCard (#10812) 2023-05-08 02:26:29 +00:00
Suguru Hirahara f6f5d44bde
Remove `mx_HeaderButtons` class and add a test (#10713)
* Remove `_HeaderButtons.pcss`

Now that mx_HeaderButtons class is no longer necessary as ARIA "tabpanel" role has been removed from it, it is possible to remove both the class and the style rule for it.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Tests: add `room-header.spec.ts` and edit the existing tests

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Edit snapshot widths settings

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix typo

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Edit a comment

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Optimize a test to check default buttons

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Check highlighted buttons

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Loop

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-05 15:29:10 +00:00
Suguru Hirahara 0d2af83dbe
Add E2E test: `invite-dialog.spec.ts` (#10693)
* Add `invite-dialog.spec.ts`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Apply the latest status

The ARIA role of the buttons in 'mx_HeaderButtons' was recently changed from 'tab' to 'button'

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-04 13:09:26 +00:00
Suguru Hirahara 9fc4410ee9
Update style rules of `MessageTimestamp` (#10780)
* Remove an obsolete variable - `$MessageTimestamp_width_hover`

Added by 9b54aba4c0
Deprecated 5343be7814

* Replace a variable with a custom property - $MessageTimestamp_width

* Merge with an existing property in :root

rename

* Manage the variable on _MessageTimestamp.pcss
2023-05-04 12:19:26 +00:00
Andy Balaam e8cddcac3f
Support launching Cypress tests in Podman on Ubuntu (#10768)
* Support launching Cypress tests in Podman on Ubuntu

* Add a comment about why we are adding UID=0 GUI=0

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Note that this setup is for rootless podman

* Add a comment about why we're requesting -u 0:0

* Clarify wording of comment

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Reword another comment

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-05-03 13:28:35 +00:00
Andy Balaam d494b45910
Test for element-web#24629 - read receipts on main and unthreaded don't clash (#10769) 2023-05-03 11:13:46 +00:00
Suguru Hirahara 23174904ed
Merge style rules related to EventTile on IRC layout (#10700)
* Manage rules related to EventTile on `_EventTile.pcss`

The style rules with the selector "mx_EventTile" should be managed on _EventTile.pcss.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `--EventTile_irc_line_info-margin-inline-start`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `mx_EventTile_msgOption`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `mx_MessageTimestamp`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `mx_EventTileBubble`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `mx_ReplyChain`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `mx_ReplyTile .mx_EventTileBubble`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `&.mx_EventTile_isEditing > .mx_EventTile_line`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - `&.mx_EventTile_info`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Convert the variable with a custom property

To fix the syntax error "Undefined variable $irc-line-height" because of cascading order.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge - '.mx_EventTile_emote'

The class is both specified by the const 'classes' (for classNames of mx_EventTile) and const 'lineClasses' (for mx_EventTile_line), but it is irrelevant here because the style rule does not expect mx_EventTile_avatar to be a direct descendant. In other words, both ".mx_EventTile.mx_EventTile_emote" and ".mx_EventTile .mx_EventTile_emote" are accepted.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-03 11:06:51 +00:00
Suguru Hirahara a81940b62a
Update existing Cypress tests - use Cypress Testing Library (#10755)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-01 20:13:24 +00:00
Suguru Hirahara 30ac950523
Emulate TabbedView's actual min and max widths on user settings tabs (#10737)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-28 08:13:04 +00:00
Suguru Hirahara 326e217d3f
Enable Jest and Percy snapshots for `PreferencesUserSettingsTab` (#10701)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-27 18:11:48 +00:00
Suguru Hirahara d1a1506572
Update tests related to user onboarding - use Cypress Testing Library (#10728)
* Update user-onboarding-old.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Update user-onboarding-new.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-27 17:12:05 +00:00
Suguru Hirahara fcf2fe2c1d
Update read_events.spec.ts - use Cypress Testing Library (#10719)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-27 10:37:58 +00:00
David Robertson 8eac9f821a
Rename sliding-sync.ts to sliding-sync.spec.ts (#10723)
Follow up to #10709. Will hopefully make the CI on matrix-org/sliding-sync greener.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-27 10:33:20 +00:00
Michael Telatynski e1f7b0af2c
Offload some more waveform processing onto a worker (#9223) 2023-04-27 11:02:20 +01:00
alunturner ca25c8f430
Commands for plain text editor (#10567)
* add the handlers for when autocomplete is open plus rough / handling

* hack in using the wysiwyg autocomplete

* switch to using onSelect for the behaviour

* expand comment

* add a handle command function to replace text

* add event firing step

* fix TS errors for RefObject

* extract common functionality to new util

* use util for plain text mode

* use util for rich text mode

* remove unused imports

* make util able to handle either type of keyboard event

* fix TS error for mxClient

* lift all new code into main component prior to extracting to custom hook

* shift logic into custom hook

* rename ref to editorRef for clarity

* remove comment

* try to add cypress test for behaviour

* remove unused imports

* fix various lint/TS errors for CI

* update cypress test

* add test for pressing escape to close autocomplete

* expand cypress tests

* add typing while autocomplete open test

* refactor to single piece of state and update comments

* update comment

* extract functions for testing

* add first tests

* improve tests

* remove console log

* call useSuggestion hook from different location

* update useSuggestion hook tests

* improve cypress tests

* remove unused import

* fix selector in cypress test

* add another set of util tests

* remove .only

* remove .only

* remove import

* improve cypress tests

* remove .only

* add comment

* improve comments

* tidy up tests

* consolidate all cypress tests to one

* add early return

* fix typo, add documentation

* add early return, tidy up comments

* change function expression to function declaration

* add documentation

* fix broken test

* add check to cypress tests

* update types

* update comment

* update comments

* shift ref declaration inside the hook

* remove unused import

* update cypress test and add comments

* update usePlainTextListener comments

* apply suggested changes to useSuggestion

* update tests

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-27 07:37:47 +00:00
Michael Telatynski 86ea059de6
Make cypress happy about spec files all containing tests (#10709) 2023-04-25 15:42:59 +00:00
Michael Telatynski 4b1b9b17ef
Update roles cypress is looking for (#10708)
* Update roles cypress is looking for

* Fix sliding sync test
2023-04-25 14:46:18 +00:00
Michael Telatynski a1a087f755
Fix usages of ARIA tabpanel (#10628)
* RovingTabIndex handle looping around start/end

* Make TabbedView expose aria tabpanel/tablist/tab roles

* Fix right panel being wrongly specified as aria tabs

Not all right panels map to the top right header buttons so we cannot describe it as a tabpanel relation

* tsc strict

* Update snapshots

* Fix ARIA AXE violation

* Update tests
2023-04-25 09:31:54 +01:00
Suguru Hirahara e24e85f7a5
Merge `set-integration-manager.spec.ts` with `general-user-settings-tab.spec.ts` (#10698)
* Merge `set-integration-manager.spec.ts` with `general-user-settings-tab.spec.ts`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove `set-integration-manager.spec.ts`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove a duplicate command

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-24 07:56:25 +00:00
Suguru Hirahara 893feed13b
Remove a redundant snapshot - `'Manage integrations' on General settings tab` (#10689)
This snapshot became redundant thanks to a new one on general-user-settings-tab.spec.ts (User settings tab - General), and should be removed to reduce the usage of quota.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 13:41:48 +00:00
Suguru Hirahara 259b5fe253
Update `threads.spec.ts` - use Cypress Testing Library (#10680)
* Set within()

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use findByRole("textbox")

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use findByText()

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Apply findByRole() to reaction and emoji picker

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use findByText() and findByRole() for removing a message

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Apply findByRole() to the close button

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Replace other commands

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 09:45:10 +00:00
Suguru Hirahara 05ef1d5560
Update `sliding-sync.spec.ts` - use Cypress Testing Library (#10618)
* Update sliding-sync.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use findByRole() - group, treeitem

The elements with ARIA "treeitem" role resides in ones with ARIA "group" role such as Favourites, People, and Invites. The elements with the "treeitem" role correspond to rooms on the room list.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use the library more - 'should render the Rooms list in reverse chronological order by default and allowing sorting A-Z'

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use cy.findAllByRole("treeitem")

Note the Test room is excluded from being counted thanks to within().

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Rename the rooms to avoid confusion

Since it has been unclear "Join" etc. is a verb or a room name, the room
names are changed as below:

- Join -> Room to Join
- Reject -> Room to Reject (the invite)
- Rescind -> Room to Rescind (the invite)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Specify ARIA label for the room sublist headers

Have different ARIA labels specified for "mx_RoomSublist" and "mx_RoomSublist_headerContainer" to clarify the structure.

Change the test to check the new ARIA label.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* lint

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix a race condition

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Revert "Specify ARIA label for the room sublist headers"

This reverts commit 193a47de4c0fac4139d7c689fa020d6f0acc6819.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix realHover() target

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 09:32:26 +00:00
Suguru Hirahara 5445ee85cd
Update spaces.spec.ts - use Cypress Testing Library (#10620)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 21:36:44 +00:00
Michael Telatynski 2da52372d4
Add arrow key controls to emoji and reaction pickers (#10637)
* Add arrow key controls to emoji and reaction pickers

* Iterate types

* Switch to using aria-activedescendant

* Add tests

* Fix tests

* Iterate

* Update test

* Tweak header keyboard navigation behaviour

* Also handle scrolling on left/right arrow keys

* Iterate
2023-04-20 14:56:21 +00:00
Suguru Hirahara 467c52a2ae
Add E2E test - `general-user-settings-tab.spec.ts` (#10658)
* Add E2E test: `general-user-settings-tab.spec.ts`

Initial implementation

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* lint

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Check an input area for a new email address too

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 13:18:19 +00:00
Richard van der Hoff 2cec8b5a44
Add Cypress tests for the "complete security" phase (#10668)
* Cypress tests for the "complete security" phase

* fix imports
2023-04-20 11:04:51 +00:00
Suguru Hirahara 6b211dd602
Update events.spec.ts - use Cypress Testing Library (#10590)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 09:33:31 +00:00
Richard van der Hoff e350b4c2c2
Deflakey `threads` cypress test (#10632)
`inviteUser` is asynchronous so you can't just call it and plough straight on.

Also some logging improvements which helped debug this
2023-04-18 10:17:46 +00:00
Suguru Hirahara d1461d3d7d
Update polls.spec.ts - use Cypress Testing Library (#10609)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 18:19:08 +00:00
Suguru Hirahara a092a91cd9
Update lazy-loading.spec.ts - use Cypress Testing Library (#10591)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 16:01:09 +00:00
Suguru Hirahara 7114f82e6f
Update spotlight.spec.ts - use Cypress Testing Library (#10621)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 14:06:20 +00:00
Suguru Hirahara 9c277d6b02
Update file-panel.spec.ts - use Cypress Testing Library (#10574)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 11:07:27 +00:00
Suguru Hirahara 013b7204d3
Update room-directory.spec.ts - use Cypress Testing Library (#10596)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 09:54:35 +00:00
Suguru Hirahara 4d859a34e7
Update right-panel.spec.ts - use Cypress Testing Library (#10539)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 09:19:40 +00:00
Suguru Hirahara 8471e45622
Update send_event.spec.ts - use Cypress Testing Library (#10613)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 08:32:32 +00:00
Suguru Hirahara 816a078651
Update pollHistory.spec.ts - use Cypress Testing Library (#10611)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 08:24:10 +00:00
Suguru Hirahara 812564940d
Update `location.spec.ts` - use Cypress Testing Library (#10612)
* 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>
2023-04-17 08:24:09 +00:00
Suguru Hirahara 4c0efc5e68
Update Cypress test files under `support/` directory - use Cypress Testing Library (#10619)
* Update support files - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix openMessageComposerOptions()

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 07:37:49 +00:00
Suguru Hirahara 9d8d610f31
Update `room.spec.ts` - use Cypress Testing Library (#10608)
* Update room.spec.ts - use Cypress Testing Library

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>
2023-04-17 07:35:14 +00:00
Suguru Hirahara 8a4a584ba0
Make test ID compatible with findByTestId() of Cypress Testing Library (#10617)
'data-test-id' is not discoverable with findByTestId() of Cypress Testing Library.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 06:10:11 +00:00
Suguru Hirahara 93858813a3
Update stickers.spec.ts - use Cypress Testing Library (#10622)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-17 05:56:37 +00:00
Suguru Hirahara 41c0b0881a
Update pills-click-in-app.spec.ts - use Cypress Testing Library (#10582)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-16 22:50:57 +00:00
Suguru Hirahara 256c3591aa
Update login.spec.ts - use Cypress Testing Library (#10597)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-14 11:40:43 +00:00
Michael Weimann bdd6d8d661
Add support for Cypress tests with Podman (#10603) 2023-04-14 11:02:59 +00:00
Suguru Hirahara 72fe394e4c
Update kick.spec.ts - use Cypress Testing Library (#10587)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-13 10:08:39 +00:00
Suguru Hirahara a2c2c01edc
Update get-openid-token.spec.ts - use Cypress Testing Library (#10586)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-13 06:27:39 +00:00
Suguru Hirahara 9b8459e8e9
Update device-management.spec.ts - use Cypress Testing Library (#10585)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-12 15:58:28 +00:00
Suguru Hirahara c5de595e79
Update `user-view.spec.ts` - use Cypress Testing Library (#10577)
* 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>
2023-04-12 15:55:10 +00:00
Suguru Hirahara c9c974d455
Use Cypress Testing Library - `crypto.spec.ts` (#10512)
* Update crypto.spec.ts - use Cypress Testing Library

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>
2023-04-12 15:48:31 +00:00
Suguru Hirahara d179956af8
Update one-to-one-chat.spec.ts - use Cypress Testing Library (#10572)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-12 13:11:28 +00:00
Suguru Hirahara c9599a3ef2
Update user-menu.spec.ts - use Cypress Testing Library (#10578)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-12 12:56:34 +00:00
Suguru Hirahara bef6eca484
Update tests to ensure file size unit has been fixed (#10568)
* 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>
2023-04-12 10:21:13 +00:00
Suguru Hirahara 5316bb58f7
Remove find.ts and custom commands on Cypress Testing Library (#10544)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-12 07:26:12 +00:00
Suguru Hirahara b5493680ce
Update `register.spec.ts` - use Cypress Testing Library (#10566)
* Update register.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* findByRole - checkbox

<input type='checkbox'> has implicit ARIA 'checkbox' role

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 17:37:05 +00:00
Suguru Hirahara 65f605951f
Update `timeline.spec.ts` (#10540)
* timeline.spec.ts - deprecate custom commands of find.ts

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Iterate

- clickButtonReply()
- findByText()

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 10:33:32 +00:00
Suguru Hirahara 7b5d1802b1
Update `editing.spec.ts` (#10543)
* Update editing.spec.ts - deprecate custom commands

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Update editing.spec.ts - use findByRole textbox etc

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 08:22:45 +00:00
Suguru Hirahara 737b30d2fa
Use Cypress Testing Library - consent.spec.ts (#10514)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 06:13:30 +00:00
Suguru Hirahara 144b2c7e15
Update create-room.spec.ts - deprecate custom commands (#10542)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 06:09:38 +00:00
Suguru Hirahara d96d6d5e4c
Update decryption-failure.spec.ts (#10541)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 06:08:38 +00:00
Suguru Hirahara a3bc3dff3d
Update `composer.spec.ts` to use `findBy*` type queries (#10538)
* Update composer.spec.ts - deprecate custom commands

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Update composer.spec.ts - apply findByText() and findByTestId()

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-11 06:07:25 +00:00
Neeraj Vageele 3f60ccabcb
fix spelling for test case in consent.spec.ts (#10551)
Co-authored-by: Neeraj <neerajv@thirdrocktechkno.com>
2023-04-10 19:08:40 +00:00
Suguru Hirahara 7ef7ccb55f
Update `audio-player.spec.ts` to reflect the latest status (#10537)
* audio-player.spec.ts - deprecate custom commands of find.ts

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* audio-player.spec.ts

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* audio-player.spec.ts - fix findByRole for 'Upload' button and use findByTestId

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Enable high contrast with 'findByLabelText'

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-10 10:53:23 +00:00
Suguru Hirahara d8203895e9
Use Cypress Testing Library - `decryption-failure.spec.ts` (#10513)
* Use Cypress Testing Library - decryption-failure.spec.ts

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* findButton - view your device list

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use findByText

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-06 16:20:39 +00:00
Suguru Hirahara 374a23edb5
Add E2E test of audio player (#10441)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-06 08:45:55 +00:00
Suguru Hirahara 78e03e0617
Use Cypress Testing Library - composer.spec.ts (#10511)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-05 11:47:14 +01:00
Suguru Hirahara 7503bf6b96
Fix spacing of headings of integration manager on General settings tab (#10232)
* Fix spacing of headings of integration manager on General settings tab

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* lint

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Check the column gap

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Iterate

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Scroll to 'mx_SetIntegrationManager' and take a snapshot of the dialog

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Revert "Scroll to 'mx_SetIntegrationManager' and take a snapshot of the dialog"

This reverts commit 9151d6a34de109c0dffa95046397c13f4b61f5a4.

* Specify actual width of mx_SetIntegrationManager

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-05 08:13:32 +01:00
Janne Mareike Koschinski 52eec283b3
Quick settings: Change the copy / labels on the options (#10427)
* Quick settings: Change the copy / labels on the options
* Update i18n
2023-04-04 21:00:57 +02:00
Suguru Hirahara a340387374
Remove an obsolete CSS declaration and add a test to `file-panel.spec.ts` (#10498)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-04 18:38:05 +01:00
Suguru Hirahara 4064ae7ad0
Use Cypress Testing Library - `timeline.spec.ts` (#10471)
* Use Cypress Testing Library - timeline.spec.ts

- findButton
- findMenuitem

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove force: false from click()

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Add const messageEdit

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-04 09:54:06 +01:00