From 59cdd46369138b95b34eb0966c3e2093388d798d Mon Sep 17 00:00:00 2001 From: madhuka Date: Wed, 24 Jun 2015 19:19:13 +0530 Subject: [PATCH 1/5] Adding Chart services Test --- test/spec/chart-factory/nvd3-chart-factory.js | 16 +++++++++++ test/spec/chart-factory/services.js | 28 +++++++++++++++++++ test/spec/services/services.js | 28 +++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 test/spec/chart-factory/nvd3-chart-factory.js create mode 100644 test/spec/chart-factory/services.js create mode 100644 test/spec/services/services.js diff --git a/test/spec/chart-factory/nvd3-chart-factory.js b/test/spec/chart-factory/nvd3-chart-factory.js new file mode 100644 index 0000000..1d77223 --- /dev/null +++ b/test/spec/chart-factory/nvd3-chart-factory.js @@ -0,0 +1,16 @@ +'use strict'; + +describe("apacheZeppelinGsocApp NVD3ChartFactory", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var NVD3ChartFactory; + beforeEach(inject(function(NVD3ChartFactory) { + NVD3ChartFactory = NVD3ChartFactory; + })); + describe("Testing Function APIs", function() { + /* it("NVD3ChartFactory to be define", function() { + expect(NVD3ChartFactory).toBeDefined(); + expect(NVD3ChartFactory.ChartList).toBeDefined(); + expect(NVD3ChartFactory.viewModel()).toBeDefined(); + });*/ + }); +}); \ No newline at end of file diff --git a/test/spec/chart-factory/services.js b/test/spec/chart-factory/services.js new file mode 100644 index 0000000..f5cdcde --- /dev/null +++ b/test/spec/chart-factory/services.js @@ -0,0 +1,28 @@ +'use strict'; + +describe("apacheZeppelinGsocApp chartService", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var chartService; + beforeEach(inject(function(ChartService) { + chartService = ChartService; + })); + describe("Testing Function APIs", function() { + it("chartService to be define", function() { + expect(chartService).toBeDefined(); + expect(chartService.getHighChart()).toBeDefined(); + expect(chartService.getGoogleChart()).toBeDefined(); + expect(chartService.getNVD3Chart()).toBeDefined(); + }); + }); + describe("Testing Function Operations", function() { + it("chartService on getGoogleChart", function() { + expect(chartService).toBeDefined(); + expect(chartService.getGoogleChart('Bar')).toBeDefined(); + expect(chartService.getGoogleChart('Line').libname).toBe( + 'googleChart'); + expect(chartService.getGoogleChart('Line').type).toBe('Line'); + expect(chartService.getGoogleChart('Line').viewModel.type).toBe( + 'LineChart'); + }); + }); +}); \ No newline at end of file diff --git a/test/spec/services/services.js b/test/spec/services/services.js new file mode 100644 index 0000000..f5cdcde --- /dev/null +++ b/test/spec/services/services.js @@ -0,0 +1,28 @@ +'use strict'; + +describe("apacheZeppelinGsocApp chartService", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var chartService; + beforeEach(inject(function(ChartService) { + chartService = ChartService; + })); + describe("Testing Function APIs", function() { + it("chartService to be define", function() { + expect(chartService).toBeDefined(); + expect(chartService.getHighChart()).toBeDefined(); + expect(chartService.getGoogleChart()).toBeDefined(); + expect(chartService.getNVD3Chart()).toBeDefined(); + }); + }); + describe("Testing Function Operations", function() { + it("chartService on getGoogleChart", function() { + expect(chartService).toBeDefined(); + expect(chartService.getGoogleChart('Bar')).toBeDefined(); + expect(chartService.getGoogleChart('Line').libname).toBe( + 'googleChart'); + expect(chartService.getGoogleChart('Line').type).toBe('Line'); + expect(chartService.getGoogleChart('Line').viewModel.type).toBe( + 'LineChart'); + }); + }); +}); \ No newline at end of file From e4d29c4aa7a821d2556f0a778304edb41f33bc8d Mon Sep 17 00:00:00 2001 From: madhuka Date: Fri, 26 Jun 2015 00:13:30 +0530 Subject: [PATCH 2/5] Adding Test Cases --- test/karma.conf.js | 6 +- test/spec/chart-factory/services.js | 28 -------- test/spec/services/services.js | 20 +++++- test/spec/services/switch-chart.js | 100 ++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 34 deletions(-) delete mode 100644 test/spec/chart-factory/services.js create mode 100644 test/spec/services/switch-chart.js diff --git a/test/karma.conf.js b/test/karma.conf.js index 379e921..74bed8a 100755 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -79,9 +79,9 @@ module.exports = function(config) { logLevel: config.LOG_INFO, // Uncomment the following lines if you are using grunt's server to run the tests - // proxies: { - // '/': 'http://localhost:9000/' - // }, + proxies: { + '/': 'http://localhost:9000/' + }, // URL root prevent conflicts with the site root // urlRoot: '_karma_' }); diff --git a/test/spec/chart-factory/services.js b/test/spec/chart-factory/services.js deleted file mode 100644 index f5cdcde..0000000 --- a/test/spec/chart-factory/services.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -describe("apacheZeppelinGsocApp chartService", function() { - beforeEach(module("apacheZeppelinGsocApp")); - var chartService; - beforeEach(inject(function(ChartService) { - chartService = ChartService; - })); - describe("Testing Function APIs", function() { - it("chartService to be define", function() { - expect(chartService).toBeDefined(); - expect(chartService.getHighChart()).toBeDefined(); - expect(chartService.getGoogleChart()).toBeDefined(); - expect(chartService.getNVD3Chart()).toBeDefined(); - }); - }); - describe("Testing Function Operations", function() { - it("chartService on getGoogleChart", function() { - expect(chartService).toBeDefined(); - expect(chartService.getGoogleChart('Bar')).toBeDefined(); - expect(chartService.getGoogleChart('Line').libname).toBe( - 'googleChart'); - expect(chartService.getGoogleChart('Line').type).toBe('Line'); - expect(chartService.getGoogleChart('Line').viewModel.type).toBe( - 'LineChart'); - }); - }); -}); \ No newline at end of file diff --git a/test/spec/services/services.js b/test/spec/services/services.js index f5cdcde..155aba1 100644 --- a/test/spec/services/services.js +++ b/test/spec/services/services.js @@ -1,5 +1,4 @@ 'use strict'; - describe("apacheZeppelinGsocApp chartService", function() { beforeEach(module("apacheZeppelinGsocApp")); var chartService; @@ -15,9 +14,8 @@ describe("apacheZeppelinGsocApp chartService", function() { }); }); describe("Testing Function Operations", function() { - it("chartService on getGoogleChart", function() { + it("testing the Google Chart Model", function() { expect(chartService).toBeDefined(); - expect(chartService.getGoogleChart('Bar')).toBeDefined(); expect(chartService.getGoogleChart('Line').libname).toBe( 'googleChart'); expect(chartService.getGoogleChart('Line').type).toBe('Line'); @@ -25,4 +23,20 @@ describe("apacheZeppelinGsocApp chartService", function() { 'LineChart'); }); }); + describe("Testing Function Operations", function() { + it("testing the High Chart Model", function() { + expect(chartService).toBeDefined(); + expect(chartService.getHighChart('Line').libname).toBe( + 'highxChart'); + expect(chartService.getHighChart('Line').type).toBe('Line'); + }); + }); + describe("Testing Function Operations", function() { + it("testing the NVD3 Chart Model", function() { + expect(chartService).toBeDefined(); + expect(chartService.getNVD3Chart('Bar').libname).toBe( + 'NVD3Chart'); + expect(chartService.getNVD3Chart('Bar').type).toBe('Bar'); + }); + }); }); \ No newline at end of file diff --git a/test/spec/services/switch-chart.js b/test/spec/services/switch-chart.js new file mode 100644 index 0000000..8a24b02 --- /dev/null +++ b/test/spec/services/switch-chart.js @@ -0,0 +1,100 @@ +'use strict'; +describe("apacheZeppelinGsocApp chartService", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var chartService; + beforeEach(inject(function(ChartService) { + chartService = ChartService; + })); + describe("Google Chart", function() { + it("Google Chart Type Switching", function() { + expect(chartService).toBeDefined(); + expect(chartService.getHighChart()).toBeDefined(); + expect(chartService.getGoogleChart('Bar').libname).toBe( + 'googleChart'); + expect(chartService.getGoogleChart('Bar').viewModel.type).toBe( + 'BarChart'); + expect(chartService.getGoogleChart('Line').viewModel.type).toBe( + 'LineChart'); + expect(chartService.getGoogleChart('Bar').viewModel.type).toBe( + 'BarChart'); + }); + it("testing the Google Chart View.Model", function() { + expect(chartService.getGoogleChart('Line').viewModel.data instanceof Object) + .toBe(true); + expect(chartService.getGoogleChart('Line').viewModel.cssStyle) + .toBe('height:400px; width:500px;'); + expect(chartService.getGoogleChart('Line').viewModel.options instanceof Object) + .toBe(true); + expect(chartService.getGoogleChart('Line').viewModel.options.displayExactValues) + .toBe(true); + }); + }); + describe("High Chart", function() { + var categories, myHighChart; + beforeEach(function() { + categories = [1, 2, 3, 4]; + myHighChart = chartService.getHighChart('Line'); + myHighChart.viewModel.xAxis.categories = categories; + }); + it("High Chart Type Switching", function() { + expect(chartService.getHighChart('Line').libname).toBe( + 'highxChart'); + expect(myHighChart.viewModel.options.chart.type).toBe( + 'line'); + expect(chartService.getHighChart('Line').data instanceof Object) + .toBe(true); + expect(chartService.getHighChart('Line').viewModel.options.chart + .type).toBe( + 'line'); + expect(chartService.getHighChart('Bar').viewModel.options.chart + .type).toBe( + 'bar'); + expect(chartService.getHighChart('Bar').type).toBe( + 'Bar'); + }); + it("testing the High Chart View.Model", function() { + expect(chartService.getHighChart('Line').viewModel.data instanceof Object) + .toBe(false); + expect(chartService.getHighChart('Line').viewModel.size instanceof Object) + .toBe(true); + expect(chartService.getHighChart('Line').viewModel.size.width) + .toBe(500); + expect(chartService.getHighChart('Line').viewModel.size.height) + .toBe(300); + }); + it("testing the High Chart changing the xAxis.categories", function() { + expect(myHighChart.viewModel.xAxis.categories instanceof Array) + .toBe(true); + expect(myHighChart.viewModel.xAxis.categories).toEqual( + categories); + }); + }); + describe("Testing NVD3Chart", function() { + var data, myNVD3Chart; + beforeEach(function() { + data = { + 'values': [12, 34, 23] + }; + myNVD3Chart = chartService.getNVD3Chart('Line'); + myNVD3Chart.viewModel.data = [1, 2]; + }); + it("Testing NVD3Chart Data Transform", function() { + expect(chartService.getNVD3Chart('Bar').libname).toBe( + 'NVD3Chart'); + expect(myNVD3Chart.type).toBe('Bar'); + expect(myNVD3Chart.viewModel.data).toEqual([1, 2]); + myNVD3Chart.viewModel.data = data; + expect(myNVD3Chart.viewModel.data).toEqual(data); + }); + it("Testing NVD3Chart Chart Type Transform", function() { + expect(chartService.getNVD3Chart('Line').viewModel.options.chart + .type).toBe( + 'lineChart'); + expect(chartService.getNVD3Chart('Bar').viewModel.options.chart + .type).toBe( + 'discreteBarChart'); + expect(chartService.getNVD3Chart('Bar').type).toBe( + 'Bar'); + }); + }); +}); \ No newline at end of file From 668cbd3e940b93dc3d94d57e8b674f96ce55a79d Mon Sep 17 00:00:00 2001 From: madhuka Date: Fri, 26 Jun 2015 00:15:22 +0530 Subject: [PATCH 3/5] Service is Testing Each Chart View and Chart Type Switch --- test/spec/chart-factory/nvd3-chart-factory.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 test/spec/chart-factory/nvd3-chart-factory.js diff --git a/test/spec/chart-factory/nvd3-chart-factory.js b/test/spec/chart-factory/nvd3-chart-factory.js deleted file mode 100644 index 1d77223..0000000 --- a/test/spec/chart-factory/nvd3-chart-factory.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -describe("apacheZeppelinGsocApp NVD3ChartFactory", function() { - beforeEach(module("apacheZeppelinGsocApp")); - var NVD3ChartFactory; - beforeEach(inject(function(NVD3ChartFactory) { - NVD3ChartFactory = NVD3ChartFactory; - })); - describe("Testing Function APIs", function() { - /* it("NVD3ChartFactory to be define", function() { - expect(NVD3ChartFactory).toBeDefined(); - expect(NVD3ChartFactory.ChartList).toBeDefined(); - expect(NVD3ChartFactory.viewModel()).toBeDefined(); - });*/ - }); -}); \ No newline at end of file From f3ab625debf8fda626f8b3c9ee6f70562bbac81f Mon Sep 17 00:00:00 2001 From: madhuka Date: Fri, 26 Jun 2015 12:46:02 +0530 Subject: [PATCH 4/5] angular version in resolutions as same as version in dependencies --- bower.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bower.json b/bower.json index d00b505..edbc002 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,9 @@ "devDependencies": { "angular-mocks": "^1.3.0" }, + "resolutions":{ + "angular": "^1.4.1" + }, "appPath": "app", "moduleName": "apacheZeppelinGsocApp" } From b7785bbb1f8ccde6f363b0e2350a37a2320dc4f0 Mon Sep 17 00:00:00 2001 From: madhuka Date: Fri, 26 Jun 2015 14:28:56 +0530 Subject: [PATCH 5/5] Adding Test Cases for Chart Factory --- test/spec/chart-factory/chart-factory.js | 64 +++++++++++++++++++ .../chart-factory/google-chart-factory.js | 47 ++++++++++++++ test/spec/chart-factory/high-chart-factory.js | 47 ++++++++++++++ test/spec/chart-factory/nvd3-chart-factory.js | 47 ++++++++++++++ test/spec/services/switch-chart.js | 28 ++++---- 5 files changed, 220 insertions(+), 13 deletions(-) create mode 100644 test/spec/chart-factory/chart-factory.js create mode 100644 test/spec/chart-factory/google-chart-factory.js create mode 100644 test/spec/chart-factory/high-chart-factory.js create mode 100644 test/spec/chart-factory/nvd3-chart-factory.js diff --git a/test/spec/chart-factory/chart-factory.js b/test/spec/chart-factory/chart-factory.js new file mode 100644 index 0000000..9b87f9a --- /dev/null +++ b/test/spec/chart-factory/chart-factory.js @@ -0,0 +1,64 @@ +'use strict'; +describe("apacheZeppelinGsocApp ChartFactory", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var chartService; + //Mock Chart Factory will extend the ChartFactory + var MyChartFactory; + beforeEach(inject(function(ChartFactory) { + //mockups models + function xChartModel(d) { + return { + c: [{ + v: d.Make + }] + }; + } + + function getXChart(error, rows) { + MyChartFactory.data.rows = rows; + } + var newChartLibrary = { + model: xChartModel, + get: getXChart + }; + MyChartFactory = new ChartFactory('MyTestChartLib', + newChartLibrary); + })); + //testing for genric chart factory + describe("Instance", function() { + it(" to be define", function() { + expect(MyChartFactory).toBeDefined(); + }); + }); + describe("Model", function() { + //testing My chart is built in Genric chart model + it("must extend the Genric Chart Model from ChartFactory", function() { + expect(MyChartFactory.libname).toBeDefined(); + expect(MyChartFactory.model).toBeDefined(); + expect(MyChartFactory.viewModel).toBeDefined(); + expect(MyChartFactory.type).toBeDefined(); + expect(MyChartFactory.data).toBeDefined(); + }); + //testing genric chart attribute type are followed by My Charts + it("testing the Genric Google Chart Model", function() { + expect(MyChartFactory).toBeDefined(); + expect(MyChartFactory.viewModel).toBeDefined(); + expect(MyChartFactory.viewModel instanceof Object).toBe(true); + expect(MyChartFactory.type instanceof Object).toBe(true); + expect(MyChartFactory.data instanceof Object).toBe(true); + }); + }); + describe("Operations", function() { + //testing genric chart attribute type are followed by Google Charts + it("testing chart library is setted correctly", function() { + expect(MyChartFactory.model instanceof Object).toBe(true); + expect(MyChartFactory.libname).toBe('MyTestChartLib'); + }); + it("testing set chart Model", function() { + expect(MyChartFactory.model.model instanceof Object).toBe( + true); + expect(MyChartFactory.model.get instanceof Function).toBe( + true); + }); + }); +}); \ No newline at end of file diff --git a/test/spec/chart-factory/google-chart-factory.js b/test/spec/chart-factory/google-chart-factory.js new file mode 100644 index 0000000..97f42ec --- /dev/null +++ b/test/spec/chart-factory/google-chart-factory.js @@ -0,0 +1,47 @@ +'use strict'; +describe("apacheZeppelinGsocApp GoogleChartFactory", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var myChart; + beforeEach(inject(function(GoogleChartFactory) { + //making mockchart called mychart from GoogleChartFactory + myChart = GoogleChartFactory; + //mock mychart is GoogleChart + myChart.setChartType('Line'); + })); + //testing for google chart factory + describe("Building a Chart", function() { + it(" to be define", function() { + expect(myChart).toBeDefined(); + }); + }); + describe("Model", function() { + //testing Google chart is built in Genric chart model + it("must extend the Genric Chart Model from ChartFactory", function() { + expect(myChart.libname).toBeDefined(); + expect(myChart.model).toBeDefined(); + expect(myChart.viewModel).toBeDefined(); + expect(myChart.type).toBeDefined(); + expect(myChart.data).toBeDefined(); + }); + //testing genric chart attribute type are followed by Google Charts + it("testing the Genric Chart Model attributr type", function() { + expect(myChart.viewModel).toBeDefined(); + expect(myChart.viewModel instanceof Object).toBe(true); + expect(myChart.type).toBe('Line'); + expect(myChart.data instanceof Object).toBe(true); + }); + }); + describe("Operations", function() { + it("testing setChartType", function() { + //changing the mockchart type + myChart.setChartType('Bar'); + expect(myChart.type).toBe('Bar'); + }); + }); + describe("view model", function() { + it("testing for attributes", function() { + expect(myChart.viewModel.options).toBeDefined(); + //to-Do more Testing + }); + }); +}); \ No newline at end of file diff --git a/test/spec/chart-factory/high-chart-factory.js b/test/spec/chart-factory/high-chart-factory.js new file mode 100644 index 0000000..e914be9 --- /dev/null +++ b/test/spec/chart-factory/high-chart-factory.js @@ -0,0 +1,47 @@ +'use strict'; +describe("apacheZeppelinGsocApp HighChartFactory", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var myChart; + beforeEach(inject(function(HighChartFactory) { + //making mockchart called mychart from HighChartFactory + myChart = HighChartFactory; + //mock mychart is highChart + myChart.setChartType('Line'); + })); + //testing for google chart factory + describe("Building a Chart", function() { + it(" to be define", function() { + expect(myChart).toBeDefined(); + }); + }); + describe("Model", function() { + //testing high chart is built in Genric chart model + it("must extend the Genric Chart Model from ChartFactory", function() { + expect(myChart.libname).toBeDefined(); + expect(myChart.model).toBeDefined(); + expect(myChart.viewModel).toBeDefined(); + expect(myChart.type).toBeDefined(); + expect(myChart.data).toBeDefined(); + }); + //testing genric chart attribute type are followed by high Charts + it("testing the Genric Chart Model attributr type", function() { + expect(myChart.viewModel).toBeDefined(); + expect(myChart.viewModel instanceof Object).toBe(true); + expect(myChart.type).toBe('Line'); + expect(myChart.data instanceof Object).toBe(true); + }); + }); + describe("Operations", function() { + it("testing setChartType", function() { + //changing the mockchart type + myChart.setChartType('Bar'); + expect(myChart.type).toBe('Bar'); + }); + }); + describe("view model", function() { + it("testing for attributes", function() { + expect(myChart.viewModel).toBeDefined(); + //to-Do more Testing + }); + }); +}); \ No newline at end of file diff --git a/test/spec/chart-factory/nvd3-chart-factory.js b/test/spec/chart-factory/nvd3-chart-factory.js new file mode 100644 index 0000000..6b97b0a --- /dev/null +++ b/test/spec/chart-factory/nvd3-chart-factory.js @@ -0,0 +1,47 @@ +'use strict'; +describe("apacheZeppelinGsocApp NVD3ChartFactory", function() { + beforeEach(module("apacheZeppelinGsocApp")); + var myChart; + beforeEach(inject(function(NVD3ChartFactory) { + //making mockchart called mychart from NVD3ChartFactory + myChart = NVD3ChartFactory; + //mock mychart is NVD3Chart + myChart.setChartType('Line'); + })); + //testing for google chart factory + describe("Building a Chart", function() { + it(" to be define", function() { + expect(myChart).toBeDefined(); + }); + }); + describe("Model", function() { + //testing NVD3 chart is built in Genric chart model + it("must extend the Genric Chart Model from ChartFactory", function() { + expect(myChart.libname).toBeDefined(); + expect(myChart.model).toBeDefined(); + expect(myChart.viewModel).toBeDefined(); + expect(myChart.type).toBeDefined(); + expect(myChart.data).toBeDefined(); + }); + //testing genric chart attribute type are followed by NVD3 Charts + it("testing the Genric Chart Model attributr type", function() { + expect(myChart.viewModel).toBeDefined(); + expect(myChart.viewModel instanceof Object).toBe(true); + expect(myChart.type).toBe('Line'); + expect(myChart.data instanceof Object).toBe(true); + }); + }); + describe("Operations", function() { + it("testing setChartType", function() { + //changing the mockchart type + myChart.setChartType('Bar'); + expect(myChart.type).toBe('Bar'); + }); + }); + describe("view model", function() { + it("testing for attributes", function() { + expect(myChart.viewModel).toBeDefined(); + //to-Do more Testing + }); + }); +}); \ No newline at end of file diff --git a/test/spec/services/switch-chart.js b/test/spec/services/switch-chart.js index 8a24b02..c1d19da 100644 --- a/test/spec/services/switch-chart.js +++ b/test/spec/services/switch-chart.js @@ -6,7 +6,11 @@ describe("apacheZeppelinGsocApp chartService", function() { chartService = ChartService; })); describe("Google Chart", function() { - it("Google Chart Type Switching", function() { + var googleChart; + beforeEach(function() { + googleChart = chartService.getGoogleChart('Bar'); + }); + it("switching chart type ", function() { expect(chartService).toBeDefined(); expect(chartService.getHighChart()).toBeDefined(); expect(chartService.getGoogleChart('Bar').libname).toBe( @@ -15,17 +19,15 @@ describe("apacheZeppelinGsocApp chartService", function() { 'BarChart'); expect(chartService.getGoogleChart('Line').viewModel.type).toBe( 'LineChart'); - expect(chartService.getGoogleChart('Bar').viewModel.type).toBe( - 'BarChart'); }); - it("testing the Google Chart View.Model", function() { - expect(chartService.getGoogleChart('Line').viewModel.data instanceof Object) + it("testing Chart view model", function() { + expect(googleChart.viewModel.data instanceof Object) .toBe(true); - expect(chartService.getGoogleChart('Line').viewModel.cssStyle) + expect(googleChart.viewModel.cssStyle) .toBe('height:400px; width:500px;'); - expect(chartService.getGoogleChart('Line').viewModel.options instanceof Object) + expect(googleChart.viewModel.options instanceof Object) .toBe(true); - expect(chartService.getGoogleChart('Line').viewModel.options.displayExactValues) + expect(googleChart.viewModel.options.displayExactValues) .toBe(true); }); }); @@ -36,7 +38,7 @@ describe("apacheZeppelinGsocApp chartService", function() { myHighChart = chartService.getHighChart('Line'); myHighChart.viewModel.xAxis.categories = categories; }); - it("High Chart Type Switching", function() { + it("Switching chart type", function() { expect(chartService.getHighChart('Line').libname).toBe( 'highxChart'); expect(myHighChart.viewModel.options.chart.type).toBe( @@ -52,7 +54,7 @@ describe("apacheZeppelinGsocApp chartService", function() { expect(chartService.getHighChart('Bar').type).toBe( 'Bar'); }); - it("testing the High Chart View.Model", function() { + it("testing the chart view model", function() { expect(chartService.getHighChart('Line').viewModel.data instanceof Object) .toBe(false); expect(chartService.getHighChart('Line').viewModel.size instanceof Object) @@ -62,7 +64,7 @@ describe("apacheZeppelinGsocApp chartService", function() { expect(chartService.getHighChart('Line').viewModel.size.height) .toBe(300); }); - it("testing the High Chart changing the xAxis.categories", function() { + it("testing the Chart changing the xAxis.categories", function() { expect(myHighChart.viewModel.xAxis.categories instanceof Array) .toBe(true); expect(myHighChart.viewModel.xAxis.categories).toEqual( @@ -78,7 +80,7 @@ describe("apacheZeppelinGsocApp chartService", function() { myNVD3Chart = chartService.getNVD3Chart('Line'); myNVD3Chart.viewModel.data = [1, 2]; }); - it("Testing NVD3Chart Data Transform", function() { + it("testing transforming data ", function() { expect(chartService.getNVD3Chart('Bar').libname).toBe( 'NVD3Chart'); expect(myNVD3Chart.type).toBe('Bar'); @@ -86,7 +88,7 @@ describe("apacheZeppelinGsocApp chartService", function() { myNVD3Chart.viewModel.data = data; expect(myNVD3Chart.viewModel.data).toEqual(data); }); - it("Testing NVD3Chart Chart Type Transform", function() { + it("transforming chart tType", function() { expect(chartService.getNVD3Chart('Line').viewModel.options.chart .type).toBe( 'lineChart');