Back to Fluentui

UnitTests

packages/charts/react-charting/docs/TestPlans/GaugeChart/UnitTests.md

4.40.2-hotfix212.3 KB
Original Source

Unit Test Plan - Gauge Chart

Test stepsValidationTool used
Test 1: Process Pros
- With segments dataShould return proper arcs dataRTL
- Without segments dataShould not return arcs when there is no dataRTL
Test 2: Get Margins
- With hideMinMax is falseShould return margins data properly when hideMinMax is falseRTL
- With hideMinMax is true<p>Should return margins data properly when hideMinMax is true</p><p></p>RTL
- With hideMinMax is false and chart title set to “x”Should return margins data properly when hideMinMax is false and chart title is availableRTL
- With hideMinMax is true and chart title set to “x”Should return margins data properly when hideMinMax is true and chart title is availableRTL
- With hideMinMax is false and subLabel set to “x”Should return margins data properly when hideMinMax is false and sublabel text is availableRTL
- With hideMinMax is true and subLabel set to “x”Should return margins data properly when hideMinMax is true and sublabel text is availableRTL
- With hideMinMax is false, chartTitle set to “x” and subLabel set to “x”Should return margins data properly when hideMinMax is false and chartTitle,sublabel text is availableRTL
- With hideMinMax is true, chartTitle set to “x” and subLabel set to “x”Should return margins data properly when hideMinMax is true and chartTitle,sublabel text is availableRTL
Test 3: Calculate Needle Rotation
- With chartValue greater than minValue and maxValueShould return proper needleRotation value when chartValue greater than minValue and maxValueRTL
- With chartValue is in between minValue and maxValue<p>Should return proper needleRotation value when chartValue in between minValue and maxValue</p><p></p>RTL
- With chartValue same as minValue<p>Should return proper needleRotation value when ChartValue same as minValue</p><p></p>RTL
- With chartValue same as maxValue<p>Should return proper needleRotation value when chartValue same as maxValue</p><p></p>RTL
- With chartValue, minValue and maxValues are same<p>Should return proper needleRotation value when ChartValue, minValue and maxValues are same</p><p></p>RTL
- With maxValue is less than minValue<p>Should return proper needleRotation value when maxValue is less than minValue</p><p></p>RTL
Test 4: Get Segment Label
- with variant and isAriaLabel values<p>Should return proper segment label value with variant and isAriaLabel values</p><p></p>RTL
- With variant is SingleSegment and isAriaLabel is default/false<p>Should return proper segment label value with variant is SingleSegment and isAriaLabel is default/false</p><p></p>RTL
- With variant is SingleSegment and isAriaLabel is true<p>Should return proper segment label value with variant is SingleSegment and isAriaLabel is true</p><p></p>RTL
- With variant is MultipleSegments and isAriaLabel is true<p>Should return proper segment label value with variant is MultipleSegments and isAriaLabel is true</p><p></p>RTL
- With variant is MultipleSegments and isAriaLabel is false<p>Should return proper segment label value with variant is MultipleSegments and isAriaLabel is false</p><p></p>RTL
- With minValue is greater than zero, variant is SingleSegment and isAriaLabel is true<p>Should return proper segment label value with minValue is greater than zero, variant is SingleSegment and isAriaLabel is true</p><p></p>RTL
- With minValue is greater than zero, variant is MultipleSegments and isAriaLabel is true<p>Should return proper segment label value with minValue is greater than zero, variant is MultipleSegments and isAriaLabel is true</p><p></p>RTL
Test 5: Get Chart Value Label
- With chartValueFormat set as Default value<p>Should return proper chart label value when chartValueFormat is Default Value</p><p></p>RTL
- With chartValueFormat set as “Fraction”<p>Should return proper chart label value when chartValueFormat is Fraction</p><p></p>RTL
- With chartValueFormat set as “Percentage”<p>Should return proper chart label value when chartValueFormat is Percentage</p><p></p>RTL
- With chartValueFormat set as “Percentage” and forCallout set as true<p>Should return proper chart label value when chartValueFormat is Percentage and forCallout is true</p><p></p>RTL
- With minValue > 0, chartValueFormat set as Percentage and forCallout set as true<p>Should return proper chart label value when minValue is greater than zero, chartValueFormat is Percentage and forCallout is true</p><p></p>RTL
- With minValue > 0, chartValueFormat set as Fraction and forCallout set as true<p>Should return proper chart label value when minValue is zero, chartValueFormat is Fraction and forCallout is true</p><p></p>RTL
- With minValue = 0, chartValueFormat set as Percentage and forCallout set as true<p>Should return proper chart label value when minValue is zero, chartValueFormat is Percentage and forCallout is true</p><p></p>RTL
Test 6: Get Styles Based On Breakpoints
- When outerRadius is not defined<p>Should return proper arcWidth and chartValueSize when _outerRadius is not defined</p><p></p>RTL
- When outerRadius < minRadius<p>Should return proper arcWidth and chartValueSize when _outerRadius is less than minRadius</p><p></p>RTL
- When outerRadius > minRadius<p>Should return proper arcWidth and chartValueSize when _outerRadius is greater than minRadius</p><p></p>RTL
Test 7: Wrap Content
- When test node not defined<p>should terminate when text node is not found</p><p></p>RTl
- When test content exceeds the maxWidth<p>should truncate text content when it exceeds the maxWidth</p><p></p>RTL
- When test content fits within the maxWidth<p>should not truncate text content when it is under maxWidth range</p><p></p>RTL
Test 8: Y Value Hover Sub Counts Exists
- Without yAxisCalloutData value<p>Should return false when yAxisCalloutData value is not defined</p><p></p>RTL
- When yAxisCalloutData value is a string data type<p>Should return false when yAxisCalloutData value is string</p><p></p>RTL
- When yAxisCalloutData value is not a string data type<p>Should return true when yAxisCalloutData value is not a string value</p><p></p>RTL