react-rainbow
react-rainbow copied to clipboard
tests: add integration tests to the tree component
Specs
- [ ] add specs proposals
Description
Add full testing to Tree component
Integration tests specs
Basic
- [ ] should open on the first click and close on clicking again.
Loading
- [ ] Should show the spinner loading just before opening the tree.
Checkbox
- [ ] Clicking on an item Should select all of its children.
@devrchancay note that there is some test already, for example, should open on the first click and close on clicking again.
this is already done, we can add some others like:
- [ ] should select the node clicked (also here we need to check that clicking on a node only select it and does not collapse or expand it) (select a node is not the same as click on the expand collapse button)
- [ ] should focus the first node when pressing tab if none node is already selected (here pressing tab means set the focus through the tab key, you may need to press tab key more than once to get the focus to the Tree)
- [ ] should focus the selected node when pressing tab (this is the same as above only that when a node is already selected when you press tab to get the focus in the Tree instead of focus the first node it should focus the selected node)