From f79087c924b3fc58c8fd86d1631c4b2bba6ff0be Mon Sep 17 00:00:00 2001 From: madhuka Date: Sat, 27 Jun 2015 23:50:47 +0530 Subject: [PATCH] Test Complating for Google Chart Factory --- test/spec/chart-factory/google-chart-factory.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/spec/chart-factory/google-chart-factory.js b/test/spec/chart-factory/google-chart-factory.js index bbb7e78..30a6021 100644 --- a/test/spec/chart-factory/google-chart-factory.js +++ b/test/spec/chart-factory/google-chart-factory.js @@ -13,6 +13,9 @@ describe("apacheZeppelinGsocApp GoogleChartFactory", function() { it(" to be define", function() { expect(myChart).toBeDefined(); }); + it(" using google chart library", function() { + expect(myChart.libname).toBe('googleChart'); + }); }); describe("Model", function() { //testing Google chart is built in Genric chart model @@ -48,7 +51,18 @@ describe("apacheZeppelinGsocApp GoogleChartFactory", function() { expect(myChart.viewModel.formatters).toBeDefined(); }); it("testing for deafults vales of attributes", function() { - expect(myChart.viewModel.options.height).toBe(300); + expect(myChart.viewModel.options.height).toBe(400); + expect(myChart.viewModel.options.displayExactValues).toBe( + true); + expect(myChart.viewModel.options.fill).toBe(20); + }); + it("testing for axis", function() { + expect(myChart.viewModel.options.vAxis).toBeDefined(); + expect(myChart.viewModel.options.hAxis).toBeDefined(); + expect(myChart.viewModel.options.vAxis instanceof Object).toBe( + true); + expect(myChart.viewModel.options.hAxis instanceof Object).toBe( + true); }); }); }); \ No newline at end of file