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

[e2e] Make expandable tree items more actionable #5994

Closed
ozyx opened this issue Nov 17, 2022 · 0 comments · Fixed by #5997
Closed

[e2e] Make expandable tree items more actionable #5994

ozyx opened this issue Nov 17, 2022 · 0 comments · Fixed by #5997
Assignees
Labels
type:maintenance tests, chores, or project maintenance
Milestone

Comments

@ozyx
Copy link
Contributor

ozyx commented Nov 17, 2022

Summary

We've made great improvements to the a11y of our object tree for use within our e2e tests. For example, we can now use compounding locators such as the following in order to dynamically expand tree items:

const treePane = page.locator('#tree-pane');
const collapsedTreeItems = treePane.locator('role=treeitem[expanded=false]');
// Expand the first collapsed tree item
await collapsedTreeItems.first().locator('.c-disclosure-triangle').click();

However, .c-disclosure-triangle (the actual element we click to expand the tree item) doesn't currently have any visibility css property attached to it, so Playwright locators will pick up expand triangles for unexpandable tree items (such as Clocks) since they are technically invisible to the end user, but not to Playwright's locators.

A fix for this would be to add visibility: hidden or visibility: visible to the .c-disclosure-triangle class depending on whether or not it .is-enabled (another class we already append to expandable tree items).

@ozyx ozyx added the type:maintenance tests, chores, or project maintenance label Nov 17, 2022
@ozyx ozyx self-assigned this Nov 17, 2022
@ozyx ozyx added this to the Target:2.1.4 milestone Nov 17, 2022
@ozyx ozyx modified the milestones: Target:2.1.4, Target:2.1.5 Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance tests, chores, or project maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants