Commit graph

284 commits

Author SHA1 Message Date
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