Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sliding-sync.spec.ts - use Cypress Testing Library #10618

Merged
merged 11 commits into from
Apr 21, 2023
Merged

Update sliding-sync.spec.ts - use Cypress Testing Library #10618

merged 11 commits into from
Apr 21, 2023

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Apr 15, 2023

For element-hq/element-web#25033

This PR intends to update sliding-sync.spec.ts by:

  • using Cypress Testing Library
  • changing the test rooms name from Join, Reject and Rescind to Room to Join, Room to Reject and Room to Rescind, respectively, as findByRole() this PR is going to add is used to search buttons as well, whose label texts are same as the rooms name. This change intends to avoid confusion due to the similarity (to avoid something like this: "Invite" button to search the room "Invite", etc.)

type: task

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

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
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>
…ological order by default and allowing sorting A-Z'

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Note the Test room is excluded from being counted thanks to within().

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
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>
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>
@github-actions github-actions bot added Z-Community-PR Issue is solved by a community member's PR T-Task Refactoring, enabling or disabling functionality, other engineering tasks labels Apr 15, 2023
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
@luixxiul luixxiul marked this pull request as ready for review April 15, 2023 11:34
@luixxiul luixxiul requested a review from a team as a code owner April 15, 2023 11:34
@dbkr
Copy link
Member

dbkr commented Apr 17, 2023

I'm no ARIA expert, but it would seem more logical to me to just have one element with the appropriate aria label rather than the header explicitly having a label saying that it's the header?

@luixxiul
Copy link
Contributor Author

I'm sorry, but I am not quite sure either... At first, I am going to update the test by not touching ARIA related stuff, leaving comments / creating an issue about it.

This reverts commit 193a47d.

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

@dbkr The change on ARIA stuff has been reverted. Would you kindly review again?

@luixxiul luixxiul changed the title Update sliding-sync.spec.ts - use Cypress Testing Library and change ARIA label attribute Update sliding-sync.spec.ts - use Cypress Testing Library Apr 20, 2023
@alunturner alunturner removed their request for review April 20, 2023 14:53
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks very much!

@dbkr dbkr added this pull request to the merge queue Apr 21, 2023
Merged via the queue into matrix-org:develop with commit 05ef1d5 Apr 21, 2023
@luixxiul
Copy link
Contributor Author

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants