mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
updated tests to account for showDataLabel set to false as default
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
This commit is contained in:
@@ -316,9 +316,15 @@ describe('XY Chart', () => {
|
|||||||
);
|
);
|
||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
it('should render bar labels by default', () => {
|
it('should render bar labels when showDataLabel is set to true', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
themeVariables:
|
||||||
|
xyChart:
|
||||||
|
showDataLabel: true
|
||||||
|
---
|
||||||
xychart-beta
|
xychart-beta
|
||||||
title "Default Label Chart"
|
title "Default Label Chart"
|
||||||
x-axis Categories [A, B, C]
|
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(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showLabelData: false
|
|
||||||
---
|
|
||||||
xychart-beta
|
xychart-beta
|
||||||
title "No Label Chart"
|
title "No Label Chart"
|
||||||
x-axis Categories [A, B, C]
|
x-axis Categories [A, B, C]
|
||||||
@@ -372,7 +373,6 @@ describe('XY Chart', () => {
|
|||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: false
|
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart-beta
|
||||||
|
Reference in New Issue
Block a user