From b99ea80b581a582908eae4612a837b6449838069 Mon Sep 17 00:00:00 2001 From: carl bergquist Date: Tue, 15 Dec 2015 17:28:49 +0100 Subject: [PATCH] test(graph): validates that percentage is shown when using stack and percentage fixes #2379 --- public/test/specs/graph-specs.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/test/specs/graph-specs.js b/public/test/specs/graph-specs.js index 60637296564..29fdeeb825e 100644 --- a/public/test/specs/graph-specs.js +++ b/public/test/specs/graph-specs.js @@ -215,6 +215,17 @@ define([ }); }); + graphScenario('when stack and percent', function(ctx) { + ctx.setup(function(scope) { + scope.panel.percentage = true; + scope.panel.stack = true; + }); + + it('should show percentage', function() { + var axis = ctx.plotOptions.yaxes[0]; + expect(axis.tickFormatter(100, axis)).to.be("100%"); + }); + }); }); });