Skip to content

Commit

Permalink
adding few usecase test for chart type switch with chart library
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhuka committed Jul 4, 2015
1 parent 83ec652 commit 8fd51be
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/spec/controllers/use-case-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,27 @@ describe("apacheZeppelinGsocApp UseCase Testing", function() {
newchart = nvd3chart;
expect(newchart.libname).toBe('NVD3Chart');
});
it("HighChart Bar to Google Line chart", function() {
var newchart = highChart;
expect(newchart.viewModel.options.chart.type).toBe('bar');
newchart = myChart;
newchart.setChartType('Line');
expect(newchart.viewModel.type).toBe('LineChart');
});
it("HighChart Line to Google Bar chart", function() {
var newchart = highChart;
newchart.setChartType('Line');
expect(newchart.viewModel.options.chart.type).toBe('line');
newchart = myChart;
newchart.setChartType('Bar');
expect(newchart.viewModel.type).toBe('BarChart');
});
it("NVD3 Bar to Google Line chart", function() {
var newchart = nvd3chart;
expect(newchart.viewModel.options.chart.type).toBe('multiBarHorizontalChart');
newchart = myChart;
newchart.setChartType('Line');
expect(newchart.viewModel.type).toBe('LineChart');
});
});
});

0 comments on commit 8fd51be

Please sign in to comment.