فهرست منبع

test(graph): validates that percentage is shown when using stack and percentage

fixes #2379
carl bergquist 10 سال پیش
والد
کامیت
b99ea80b58
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      public/test/specs/graph-specs.js

+ 11 - 0
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%");
+      });
+    });
   });
   });
 });
 });