From 8bdd7ec719e42407f1b3b51e2ee66e023c64d6a5 Mon Sep 17 00:00:00 2001 From: pranavm2109 Date: Fri, 4 Apr 2025 15:20:51 -0400 Subject: [PATCH] updated tests to account for showDataLabel set to false as default Co-authored-by: Shahir Ahmed --- cypress/integration/rendering/xyChart.spec.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cypress/integration/rendering/xyChart.spec.js b/cypress/integration/rendering/xyChart.spec.js index dc3ba2235..3ab42fa34 100644 --- a/cypress/integration/rendering/xyChart.spec.js +++ b/cypress/integration/rendering/xyChart.spec.js @@ -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