41 lines
875 B
JavaScript
Raw Normal View History

2019-09-11 21:20:28 +02:00
/* eslint-env jest */
2019-09-18 18:25:06 +02:00
import { imgSnapshotTest } from '../../helpers/util.js';
2019-09-11 21:20:28 +02:00
describe('Pie Chart', () => {
it('should render a simple pie diagram', () => {
2019-09-18 18:25:06 +02:00
imgSnapshotTest(
`
2019-09-11 21:20:28 +02:00
pie title Sports in Sweden
"Bandy" : 40
"Ice-Hockey" : 80
"Football" : 90
`,
2019-09-18 18:25:06 +02:00
{}
);
cy.get('svg');
});
it('should render a simple pie diagram with long labels', () => {
imgSnapshotTest(
`
pie title NETFLIX
"Time spent looking for movie" : 90
"Time spent watching it" : 10
`,
{}
);
cy.get('svg');
});
it('should render a simple pie diagram with capital letters for labels', () => {
imgSnapshotTest(
`
pie title What Voldemort doesn't have?
"FRIENDS" : 2
"FAMILY" : 3
"NOSE" : 45
`,
{}
);
cy.get('svg');
2019-09-18 18:25:06 +02:00
});
});