-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Vertical stacked bar chart - Component tests #28594
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
Merged
AtishayMsft
merged 14 commits into
microsoft:master
from
v-baambati:VerticalStackedBarChartUnitTesting
Aug 24, 2023
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f524a55
Added component tests for VerticalStackedBarChart
v-baambati ab1f58b
Updated VerticalStackedBarChat component charts and component test pl…
v-baambati 12f58cf
Formated the new files
v-baambati 08dbbe6
intgerted testWithWait and testWithoutWait functions
v-baambati 0def7c3
updated verticalstackedbar chart component tests
v-baambati 4299a3f
updated verticalstackedbar chart component tests
v-baambati 87e0d68
added new test cases
v-baambati 47fab9b
updated verticalstackedbar chart component tests
v-baambati f3252d4
resolved merge conflicts
v-baambati c335b4a
added barMaxGap and barCornerRadius test cases
v-baambati fe5a31b
added barMaxGap and barCornerRadius test cases
v-baambati 9c959b2
Merge branch 'master' of https://github.com/microsoft/fluentui into V…
v-baambati 91b3a6c
removed unwanted lines and code
v-baambati 6cb9e34
resolved swift lint errors for function prototype
v-baambati File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
packages/react-charting/docs/TestPlans/VerticalStackedBarChart/ComponentTests.md
This file contains hidden or 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,73 @@ | ||
| **Vertical Stacked Bar Chart – Component test plan** | ||
|
|
||
| **Sub-components: Bar, Line, Legends, Callout, Labels** | ||
|
|
||
| 1. **Bar: Bar data, Bar color (single/multiple), bar label** | ||
| 1. **Line: show/hide line, highlight data points on line and show callout** | ||
| 1. **Legends: show/hide legends, highlight the corresponding bar/line on legend hover** | ||
| 1. **Callout: Default/custom callout** | ||
| 1. **Labels: x-Axis labels default/rotated** | ||
|
|
||
| | **Test steps** | **Validation** | **Tool used** | | ||
| | :---------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :-----------: | | ||
| | Test 1: [Snapshot testing] | | | | ||
| | - With only data prop, numerical data on x-axis. | Renders VerticalStackedBar chart correctly | RTL | | ||
| | - With HideLegend prop set to “true” | Should hide legends | Enzyme | | ||
| | - With HideTooltip prop set to “true” | Should hide the tooltip in chart | Enzyme | | ||
| | - With EnabledLegendsWrapLines set to “true” | Should enable the legends to wrap lines if there is not enough space to show all legends on a single line | Enzyme | | ||
| | - With ShowXAxisLablesTooltip set to “true” | Should truncate x axis labels and show tooltip on x axis labels | Enzyme | | ||
| | - With WrapXAxisLables set to “true” | Should wrap x axis label values | Enzyme | | ||
| | - With isCalloutForStack set to “true” | Should render callout for stack properly | Enzyme | | ||
| | - With yAxisTickFormat set to “%d” | <p>Should render the y-axis ticks in the format specified</p><p></p> | Enzyme | | ||
| | - With hideLabels set to “true” | Should hide bar labels | Enzyme | | ||
| | Test 2: Basic props testing | | | | ||
| | - HideLegend prop set to “true” | Should not mount legend when hideLegend is true | Enzyme | | ||
| | - HideLegend prop set to “false” | Should mount legend when hideLegend is false | Enzyme | | ||
| | - HideTooltip prop set to “true” | Should not mount callout when hideTootip is true | Enzyme | | ||
| | - HideTooltip prop set to “false” | Should mount callout when hideTootip is false | Enzyme | | ||
| | - onRenderCalloutPerStack prop is not given | Should not render onRenderCalloutPerStack | Enzyme | | ||
| | - onRenderCalloutPerDataPoint is given | Should render onRenderCalloutPerDataPoint | Enzyme | | ||
| | - onRenderCalloutPerDataPoint is not given | Should not render onRenderCalloutPerDataPoint | Enzyme | | ||
| | - onRenderCalloutPerDataPoint is given | Should render onRenderCalloutPerDataPoint | Enzyme | | ||
| | Test 3: Render calling with respective to props | | | | ||
| | - No prop changes: Mount VerticalStackedBar chart and then set the same props again | Render function should have been called twice | Enzyme | | ||
| | - Prop changes: Mount VerticalStackedBar chart and then set some other prop | Render function should have been called twice | Enzyme | | ||
| | Test 4: Mouse events | | | | ||
v-baambati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | - Mouse over on a bar | Should render callout correctly on mouseover | Enzyme | | ||
| | - Mouse move from one bar to other bar | Should render callout correctly on mouse move | Enzyme | | ||
| | - Mouse over on a bar with customized callout | Should render customized callout on mouseover | Enzyme | | ||
| | - Customized callout per stack on mouse over | Should render customized callout per stack correctly on mouseover | Enzyme | | ||
| | - Customized callout on a bar from one bar to other bar | Should render customized callout for stack on mouseover | Enzyme | | ||
| | Test 5: [Sub-Component]: Line | | | | ||
| | - Specify line data | Should render line with the data provided | RTL | | ||
| | Test 6: [Sub-Component]: Bar | | | | ||
| | - Specify bar color | Should render bar with the specified color | RTL | | ||
| | - Specify separate bars in a single bar | Should render stacked bar with specified data | RTL | | ||
| | - setMinimumBarHeight to “x” | Should render bars properly, bars below this height will be displayed at this height | RTL | | ||
| | - set barWidth to “x” | Should render bars with specified bar width | RTL | | ||
| | - set barGapMax to “x” | Should render bars with specified bar gap | RTL | | ||
| | - set barCornerRadius | Should render top bar with specified bar corner radius | RTL | | ||
| | Test 7: [Sub-Component]: Legends | | | | ||
| | - Hide legends | Should not show any rendered legends | RTL | | ||
| | - Hover mouse over line legends | Should reduce the opacity of the other lines/bars | RTL | | ||
| | - Hover mouse over bar legends | Should reduce the opacity of the other lines/bars | RTL | | ||
| | - Mouse move from one Legend to another Legend | Should reset the opacity of the lines on mouse leave a bar legend | RTL | | ||
| | - Single mouse click on bar legends | Should select legend on single mouse click on respective legend | RTL | | ||
| | - Double mouse click on bar legends | Should deselect legend on double mouse click on respective legend | RTL | | ||
| | - Single mouse click on line legends | Should select legend on single mouse click on respective legend | RTL | | ||
| | - Double mouse click on line legends | Should deselect legend on double mouse click on respective legend | RTL | | ||
| | Test 8: [Sub-Component]: Callout | | | | ||
v-baambati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | - Hover mouse over a bar | Should call the handler on mouse over bar | RTL | | ||
| | - Hover mouse over a bar to display callout | Should show the default callout over that bar | RTL | | ||
| | - Hover mouse over a stacked bar | Should show the default stacked call out | RTL | | ||
| | - Hover mouse over the line | Should show the default callout over that line | RTL | | ||
| | - Specify custom callout and hover mouse over a bar | Should show the custom callout over that bar | RTL | | ||
| | - Specify custom callout and hover mouse over the line | Should show the custom callout over that line | RTL | | ||
| | - Mouse click on bar | Should call the handler on mouse click on the bar | RTL | | ||
| | Test 9: [Sub-Component]: x-axis labels | | | | ||
| | - Truncate x-axis labels | Should show the x-axis labels tooltip when hovered | RTL | | ||
| | - Rotate x-axis labels | Should rotate the x-axis labels by 45 degrees | RTL | | ||
v-baambati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | Test 10: [Sub-Component]: Screen resolution | | | | ||
| | - Increase the screen resolution (zoom in) | Should remain unchanged on zoom in | RTL | | ||
| | - Decrease the screen resolution (zoom out) | Should remain unchanged on zoom out | RTL | | ||
| | Test 11: Theme changed to Dark Theme | Should reflect theme change | RTL | | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.