From: Dan Vanderkam Date: Sun, 29 Mar 2015 22:11:45 +0000 (-0400) Subject: test range selector creation/deletion X-Git-Tag: v2.0.0~64^2~2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=44310217eccf34939b40cf0309b5a9b4e03df784;p=dygraphs.git test range selector creation/deletion --- diff --git a/auto_tests/tests/range_selector.js b/auto_tests/tests/range_selector.js index 933cacf..a8b9459 100644 --- a/auto_tests/tests/range_selector.js +++ b/auto_tests/tests/range_selector.js @@ -183,8 +183,13 @@ it('testRangeSelectorEnablingAfterCreation', function() { ]; var graph = document.getElementById("graph"); var g = new Dygraph(graph, data, opts); + var initialChartHeight = g.getArea().h; g.updateOptions({showRangeSelector: true}); assertGraphExistence(g, graph); + assert(g.getArea().h < initialChartHeight); // range selector shown + + g.updateOptions({showRangeSelector: false}); + assert.equal(g.getArea().h, initialChartHeight); // range selector hidden }); // The animatedZooms option does not work with the range selector. Make sure it gets turned off. @@ -389,7 +394,6 @@ it('testMiniPlotDrawn', function() { var origFunc = Dygraph.getContext; var miniHtx; Dygraph.getContext = function(canvas) { - console.log(canvas.className); if (canvas.className != 'dygraph-rangesel-bgcanvas') { return origFunc(canvas); }