X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Frange_selector.js;h=584e054a7dad55d42f78558162907c4c8ec231e5;hb=17bdb194d3ff6ecc02224038b3070024a5949e97;hp=a8b9459ec77d909dfff81bb8ae0ce12005ac4294;hpb=77a1405a7dea7e9de770583598a50e5907e6b1a1;p=dygraphs.git diff --git a/auto_tests/tests/range_selector.js b/auto_tests/tests/range_selector.js index a8b9459..584e054 100644 --- a/auto_tests/tests/range_selector.js +++ b/auto_tests/tests/range_selector.js @@ -6,11 +6,15 @@ */ describe("range-selector", function() { +var restoreConsole; +var logs = {}; beforeEach(function() { document.body.innerHTML = "
"; + restoreConsole = Util.captureConsole(logs); }); afterEach(function() { + restoreConsole(); }); it('testRangeSelector', function() { @@ -216,6 +220,10 @@ it('testRangeSelectorWithAnimatedZoomsOption', function() { var g = new Dygraph(graph, data, opts); assertGraphExistence(g, graph); assert.isFalse(g.getOption('animatedZooms')); + assert.deepEqual(logs, { + log: [], error: [], + warn: ["Animated zooms and range selector are not compatible; disabling animatedZooms."] + }); }); it('testRangeSelectorWithAnimatedZoomsOption2', function() { @@ -241,6 +249,10 @@ it('testRangeSelectorWithAnimatedZoomsOption2', function() { g.updateOptions({showRangeSelector: true}); assertGraphExistence(g, graph); assert.isFalse(g.getOption('animatedZooms')); + assert.deepEqual(logs, { + log: [], error: [], + warn: ["Animated zooms and range selector are not compatible; disabling animatedZooms."] + }); }); it('testRangeSelectorInteraction', function() {