* 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>
* 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
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>
* 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>
* 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>
* 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>
* 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>