updated tests to account for showDataLabel set to false as default

Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
This commit is contained in:
pranavm2109
2025-04-04 15:20:51 -04:00
parent 2798e27b1e
commit 8bdd7ec719

View File

@@ -316,9 +316,15 @@ describe('XY Chart', () => {
);
cy.get('svg');
});
it('should render bar labels by default', () => {
it('should render bar labels when showDataLabel is set to true', () => {
imgSnapshotTest(
`
---
config:
themeVariables:
xyChart:
showDataLabel: true
---
xychart-beta
title "Default Label Chart"
x-axis Categories [A, B, C]
@@ -329,14 +335,9 @@ describe('XY Chart', () => {
);
});
it('should not render bar labels when showLabelData is false', () => {
it('should not render bar labels by default', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showLabelData: false
---
xychart-beta
title "No Label Chart"
x-axis Categories [A, B, C]
@@ -372,7 +373,6 @@ describe('XY Chart', () => {
---
config:
xyChart:
showDataLabel: false
chartOrientation: horizontal
---
xychart-beta