-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Line Chart and Area Chart - Component tests #28235
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 28 commits into
microsoft:master
from
v-baambati:LineChatUnitTesting
Aug 28, 2023
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
2f64c8c
integrated line chat test cases
v-baambati e569967
separated test cases based on the sub component
v-baambati 1753367
added test cases for line chart
v-baambati a8c9511
Merge branch 'master' into LineChatUnitTesting
v-baambati 1eec8fb
Added component test plan for line chart
v-baambati f6e228c
Merge branch 'microsoft:master' into LineChatUnitTesting
v-baambati 3844392
Merge branch 'LineChatUnitTesting' of https://github.com/v-baambati/f…
v-baambati b79af81
Updated line chart test cases
v-baambati df6a8d8
Updated line chart test cases
v-baambati b3cfbaf
Added component tests for Area chart
v-baambati 78d1e6c
updated Tests for Line and Area charts
v-baambati 7b23a87
Formatted document as per the build issues
v-baambati 12f1217
updated test cases numbers properly
v-baambati 2989c69
Merge branch 'master' into LineChatUnitTesting
v-baambati 4026b90
updated Area chat component tests
v-baambati 1bb28b2
updated line chart tests with testWithWait functions
v-baambati 8364913
added new tests
v-baambati fe0f3fa
resolved merge conflicts
v-baambati c14575f
reverted chnages in Linechart base class
v-baambati ec014bf
reverted unwanted chnages
v-baambati 0a6d139
updated existing tests
v-baambati f878558
updated existing test cases
v-baambati 18e637d
Merge branch 'master' of https://github.com/microsoft/fluentui into L…
v-baambati 7b257de
removed unwanted code
v-baambati b083145
srmukher: Resolving date mismatch in snapshots
v-baambati d894339
srmukher: Resolving date mismatch in snapshots
v-baambati ccd45d5
Merge branch 'master' of https://github.com/microsoft/fluentui into L…
v-baambati 19fb789
updated chnage file
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
10 changes: 10 additions & 0 deletions
10
change/@fluentui-react-charting-fb2207fd-522a-4790-b398-e9546a11aec2.json
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,10 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": { | ||
| "title": "", | ||
| "value": "" | ||
| }, | ||
| "packageName": "@fluentui/react-charting", | ||
| "email": "132879294+v-baambati@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
61 changes: 61 additions & 0 deletions
61
packages/react-charting/docs/TestPlans/AreaChart/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,61 @@ | ||
| **Area Chart – Component test plan** | ||
|
|
||
| **Sub-components: Area, x-axis, y-axis and Legend** | ||
|
|
||
AtishayMsft marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 1. **Line: Area data, Area color (multi colors), Area label (show/hide)** | ||
| 1. **Legends: show/hide legends, highlight the corresponding Area on legend hover** | ||
| 1. **Callout: Default/custom callout** | ||
| 1. **Labels: x-Axis labels, y-Axis labels** | ||
|
|
||
| | **Test steps** | **Validation** | **Tool used** | | ||
| | :-------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: | :-----------: | | ||
| | Test 1: [Snapshot testing] | | | | ||
| | - With only data prop, numerical data on x-axis. | Renders Area chart correctly | RTL | | ||
v-baambati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | - With only data prop, date data on x-axis. | Renders Area chart correctly | RTL | | ||
| | - With only data prop, string data on x-axis. | Should not render area chart | Pending | | ||
| | - 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 yAxisTickFormat set to “%d” | <p>Should render the y-axis ticks in the format specified</p><p></p> | Enzyme | | ||
| | - With single point | Should render Area chat with single point | Enzyme | | ||
| | - With Default color | Should render with default colors when line color not provided | Enzyme | | ||
| | - With specific colors | Should render areas with specified colors | RTL | | ||
| | - With optimizeLargeData set to “true” | Should not render circles when optimizeLargeData is true | 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 | | ||
| | Test 3: Render calling with respective to props | | | | ||
| | - No prop changes: Mount Area chart and then set the same props again | Render function should have been called twice | Enzyme | | ||
| | - Prop changes: Mount Area chart and then set some other prop | Render function should have been called twice | Enzyme | | ||
| | Test 4: Mouse events | | | | ||
| | - Mouse over on Area | Should render callout correctly on mouseover | Enzyme | | ||
| | - Mouse move from one area to other area | Should render callout correctly on mouse move | Enzyme | | ||
| | - Mouse over on a area with customized callout | Should render customized callout on mouseover | Enzyme | | ||
| | - Customized callout on area from one area to other area | Should render customized callout for stack on mouseover | Enzyme | | ||
| | Test 5: Render empty chart aria label div when chart is empty | | | | ||
| | - Area chart mounted with non-empty data | No empty chart aria label div rendered | Enzyme | | ||
| | - Area chart mounted with empty data | Empty chart aria label div rendered | Enzyme | | ||
| | Test 6: [Sub-Component]: Legends | | | | ||
| | - Hover mouse over area legends | Should reduce the opacity of the other Areas | RTL | | ||
| | - Hover mouse over area legends | Should reduce the opacity of the other lines in area chart and opacity of the selected area line should be zero | RTL | | ||
| | - Hover mouse over area legends | Should reduce the opacity of the other legends | RTL | | ||
| | - Single mouse click on legends | Should select legend on single mouse click on respective legend | RTL | | ||
| | - Double mouse click on legends | Should deselect legend on double mouse click on respective legend | RTL | | ||
| | Test 7: [Sub-Component]: Callout | | | | ||
| | - Hover mouse over a single area | Should show the default callout over that Area | RTL | | ||
| | - Hover mouse over a stacked area | Should show the default stacked callout over that Area | RTL | | ||
| | - Specify custom callout and hover mouse over a Area | Should show the custom callout over that Area | RTL | | ||
| | Test 8: [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 39 degrees | RTL | | ||
| | Test 9: [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 10: Theme changed to Dark Theme | Should reflect theme change | RTL | | ||
v-baambati marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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.