Skip to content

Commit

Permalink
Adding Google chart Facotry View model Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhuka committed Jun 26, 2015
1 parent 1f30f80 commit dca562c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scripts/chart-factory/google-chart-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ angular.module('apacheZeppelinGsocApp').factory('GoogleChartFactory', function(
options: {
'isStacked': 'true',
'fill': 20,
'height': 300,
'height': 400,
'displayExactValues': true,
'vAxis': {
'gridlines': {
Expand Down
9 changes: 8 additions & 1 deletion test/spec/chart-factory/google-chart-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,19 @@ describe("apacheZeppelinGsocApp GoogleChartFactory", function() {
//changing the mockchart type
myChart.setChartType('Bar');
expect(myChart.type).toBe('Bar');
expect(myChart.viewModel.type).toBe('BarChart');
});
});
describe("view model", function() {
it("testing for attributes", function() {
expect(myChart.viewModel.options).toBeDefined();
//to-Do more Testing
expect(myChart.viewModel.type).toBeDefined();
expect(myChart.viewModel.cssStyle).toBeDefined();
expect(myChart.viewModel.data).toBeDefined();
expect(myChart.viewModel.formatters).toBeDefined();
});
it("testing for deafults vales of attributes", function() {
expect(myChart.viewModel.options.height).toBe(300);
});
});
});

0 comments on commit dca562c

Please sign in to comment.