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 several TreeView unit tests #9825

Open
thatblindgeye opened this issue Nov 17, 2023 · 6 comments
Open

Update several TreeView unit tests #9825

thatblindgeye opened this issue Nov 17, 2023 · 6 comments
Assignees

Comments

@thatblindgeye
Copy link
Contributor

Describe the enhancement or change
Followup to #9773, some tests could use some updating

  • Update tests that are using getByText(...).tagName.toBe("BUTTON") so that they use getByRole("button") instead
  • In TreeViewRoot, add tests for hasCheckboxes and hasSelectableNodes; should first try testing if pressing Tab focuses the correct element, otherwise try using a user.click event, otherwise just check that the tabindex attribute is applied to the correct element
  • In TreeViewList, update the "Renders toolbar content when toolbar prop is passed" test to check that getByrole('separator') is in the doc, and update "Does not render toolbar content when toolbar prop is not passed" test to check that queryByText... is not in the doc
  • check that any getByRole('button') calls are also passing in the {name: ...} options object

Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?

Any other information?

@wise-king-sullyman
Copy link
Contributor

A few other things we might want to address in the TreeViewListItem tests

  • we have a few tests where we're just asserting that a node has an attribute but not what the value of that attribute is, do we just not care what the value is in those instances? I would think we would assert about the value as well as the presence.
  • In the callback tests when we're asserting that the callback isn't called when it shouldn't be we're interacting with the component but not passing the callback, shouldn't it be the other way around?
  • the parentItem and useMemo props don't seem to be tested

@wise-king-sullyman wise-king-sullyman moved this from Needs triage to Backlog in PatternFly Issues Nov 21, 2023
Copy link

stale bot commented Jan 30, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jan 30, 2024
@thatblindgeye
Copy link
Contributor Author

Some tests could be added per updates made in #10220

@kmcfaul kmcfaul moved this from Backlog to Not started in PatternFly Issues Apr 1, 2024
@thatblindgeye thatblindgeye moved this from Not started to Backlog in PatternFly Issues Apr 11, 2024
@kmcfaul kmcfaul moved this from Backlog to Not started in PatternFly Issues May 9, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Copy link

github-actions bot commented Aug 7, 2024

This issue has been automatically marked as stale because it has not had recent activity.

Copy link

github-actions bot commented Oct 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@kmcfaul kmcfaul removed the Tech debt label Oct 25, 2024
@tlabaj tlabaj removed this from the Prioritized Backlog milestone Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Not started
Development

No branches or pull requests

4 participants