-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sankey chart - component tests (#29108)
- Loading branch information
1 parent
f90a7d6
commit 5cb51c1
Showing
3 changed files
with
1,199 additions
and
8,029 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
packages/react-charting/docs/TestPlans/SankeyChart/ComponentTests.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
**Sankey Chart – Component test plan** | ||
|
||
**Sub-components: Node, Callout, Labels,** | ||
|
||
1. **Node: Node data, Node color, Node label** | ||
1. **Callout: Default callout** | ||
1. **Labels: Default labels** | ||
|
||
| **Test steps** | **Validation** | **Tool used** | | ||
| :---------------------------------------------------------------------: | :--------------------------------------------------------------: | :-----------: | | ||
| Test 1: [Snapshot testing] | | | | ||
| - With only data prop, string data as node ID. | Should render sankey chart with axis correctly | RTL | | ||
| - With only data prop, numeric data as node ID. | Should render sankey chart with axis correctly | Enzyme | | ||
| - With node color and border colors | Should render Sankey chart with specified node and border colors | Enzyme | | ||
| Test 2: Render calling with respective to props | | | | ||
| - No prop changes: Mount Sankey chart and then set the same props again | Render function should have been called twice | Enzyme | | ||
| - Prop changes: Mount Sankey chart and then set some other prop | Render function should have been called twice | Enzyme | | ||
| Test 3: Mouse events | | | | ||
| - Mouse over on a node | Should update Sankey chart correctly on mouseover | Enzyme | | ||
| - Mouse over on link | Should update Sankey chart correctly on mouseover | Enzyme | | ||
| - Mouse click on a node | Should update node and path color based on the link | RTL | | ||
| Test 4: [Sub-Component]: Node | | | | ||
| - Specify node color | Should render node with the specified color | Enzyme | | ||
| - With node description is large | Should render tooltip correctly when node description is large | Enzyme | | ||
| Test 5: [Sub-Component]: Callout | | | | ||
| - Hover mouse over a link to display callout | Should show the default callout over that link | Enzyme | | ||
| Test 6: [Sub-Component]: Labels | | | | ||
| - Set node name to “x” | Should render node name properly | RTL | | ||
| Test 7: Theme changed to Dark Theme | Should reflect theme change | RTL | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.