-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
TreeGrid: Add tests for callback functions #38942
TreeGrid: Add tests for callback functions #38942
Conversation
Size Change: +120 B (0%) Total Size: 1.15 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these tests!
LGTM
Thanks for the review @ramonjd! I'll merge this in now since it doesn't affect any of the component's behaviour, but let me know if anyone would like me to make any changes, and I'm happy to follow up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @andrewserong for adding these tests!
Just a question — is there a reason why, in the tests, we're using "vanilla" tr
and td
s instead of TreeGridRow
and TreeGridCell
?
Thanks for taking a look @ciampo! I actually ran into some errors with So, since I was primarily testing the contract of the callbacks, I thought the vanilla |
Description
Following on from the ListView multi-select behaviour added in #38314, this PR adds test coverage for the TreeGrid component's callback functions, to ensure that the expected contract is maintained when we make changes to the component. This includes:
onExpandRow
callback, that returns the DOM element for the row to be expandedonCollapseRow
callback, that returns the DOM element for the row to be collapsedonFocusRow
callback, that returns the event that was fired, the starting row DOM element, and the destination row DOM elementTesting Instructions
From the command line run the following:
Screenshots
Types of changes
Code quality / test coverage.
Checklist:
*.native.js
files for terms that need renaming or removal).