From e4a2d2a290e1eaab82988f2e521c453f1a2163c2 Mon Sep 17 00:00:00 2001 From: Ashish Jain Date: Wed, 30 Oct 2019 18:29:26 +0100 Subject: [PATCH] Updated Jest test cases for Pie diagram --- cypress/integration/rendering/pie.spec.js | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cypress/integration/rendering/pie.spec.js b/cypress/integration/rendering/pie.spec.js index f930ac246..b69aad631 100644 --- a/cypress/integration/rendering/pie.spec.js +++ b/cypress/integration/rendering/pie.spec.js @@ -12,5 +12,29 @@ describe('Pie Chart', () => { `, {} ); + 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'); }); });