X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Fper_axis.js;h=279765e89c8f5e112ba975c105e17ea57c243638;hb=bfb3e0a44ba7eb76704389cd1515db9995944d41;hp=add852d038349304416b99eebe35bafef26bc40e;hpb=07270a6d3c41dbff993fa891d7d48ec03ad94641;p=dygraphs.git diff --git a/auto_tests/tests/per_axis.js b/auto_tests/tests/per_axis.js index add852d..279765e 100644 --- a/auto_tests/tests/per_axis.js +++ b/auto_tests/tests/per_axis.js @@ -45,50 +45,25 @@ perAxisTestCase.prototype.tearDown = function() { }; perAxisTestCase.prototype.testDrawXAxis = function() { - this.g.updateOptions({ drawXAxis : true }); + this.g.updateOptions({ axes : { x : { drawAxis: true }} }); assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-x').length > 0); assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-y').length == 0); } perAxisTestCase.prototype.testDrawYAxis = function() { - this.g.updateOptions({ drawYAxis : true }); + this.g.updateOptions({ axes : { y : { drawAxis: true }} }); assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-x').length ==0); assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-y').length > 0); } -perAxisTestCase.prototype.testDrawAxisX = function() { - this.g.updateOptions({ axes : { x : { drawAxis : true }}}); - assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-x').length > 0); - assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-y').length == 0); -} - -perAxisTestCase.prototype.testDrawAxisY = function() { - this.g.updateOptions({ axes : { y : { drawAxis : true }}}); - assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-x').length ==0); - assertTrue(this.graph.getElementsByClassName('dygraph-axis-label-y').length > 0); -} perAxisTestCase.prototype.testDrawXGrid = function() { - this.g.updateOptions({ drawXGrid : true }); - var htx = this.g.hidden_ctx_; - assertTrue(CanvasAssertions.numLinesDrawn(htx, this.xAxisLineColor) > 0); - assertTrue(CanvasAssertions.numLinesDrawn(htx, this.yAxisLineColor) == 0); -} - -perAxisTestCase.prototype.testDrawYGrid = function() { - this.g.updateOptions({ drawYGrid : true }); - var htx = this.g.hidden_ctx_; - assertTrue(CanvasAssertions.numLinesDrawn(htx, this.xAxisLineColor) == 0); - assertTrue(CanvasAssertions.numLinesDrawn(htx, this.yAxisLineColor) > 0); -} - -perAxisTestCase.prototype.testDrawGridX = function() { this.g.updateOptions({ axes : { x : { drawGrid : true }}}); var htx = this.g.hidden_ctx_; assertTrue(CanvasAssertions.numLinesDrawn(htx, this.xAxisLineColor) > 0); assertTrue(CanvasAssertions.numLinesDrawn(htx, this.yAxisLineColor) == 0); } -perAxisTestCase.prototype.testDrawGridY = function() { +perAxisTestCase.prototype.testDrawYGrid = function() { this.g.updateOptions({ axes : { y : { drawGrid : true }}}); var htx = this.g.hidden_ctx_; assertTrue(CanvasAssertions.numLinesDrawn(htx, this.xAxisLineColor) == 0);