X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Frange_tests.js;h=c92c48916e6a8f6facb24e70946d420701f51f2e;hb=38dbac3e0b3c24486d3f548ae63dabd6e1d73bc3;hp=561ceeb5a5c0c6f64b6d6ec2e7ff507db6483933;hpb=a12f271c5fc6420d764bae5a5c12ca0785f7fd4c;p=dygraphs.git diff --git a/auto_tests/tests/range_tests.js b/auto_tests/tests/range_tests.js index 561ceeb..c92c489 100644 --- a/auto_tests/tests/range_tests.js +++ b/auto_tests/tests/range_tests.js @@ -70,8 +70,12 @@ RangeTestCase.prototype.testRangeSetOperations = function() { g.updateOptions({ }); assertEquals([12, 18], g.xAxisRange()); assertEquals([10, 40], g.yAxisRange(0)); + + g.updateOptions({valueRange : null, axes: {y:{valueRange : [15, 20]}}}); + assertEquals([12, 18], g.xAxisRange()); + assertEquals([15, 20], g.yAxisRange(0)); - g.updateOptions({ dateWindow : null, valueRange : null }); + g.updateOptions({ dateWindow : null, valueRange : null, axes: null }); assertEquals([10, 20], g.xAxisRange()); assertEquals([0, 55], g.yAxisRange(0)); }; @@ -84,7 +88,6 @@ RangeTestCase.prototype.zoom = function(g, xRange, yRange) { var originalXRange = g.xAxisRange(); var originalYRange = g.yAxisRange(0); - // Editing e.shiftKey post construction doesn't work for Firefox. Damn. DygraphOps.dispatchMouseDown(g, xRange[0], yRange[0]); DygraphOps.dispatchMouseMove(g, xRange[1], yRange[0]); // this is really necessary. DygraphOps.dispatchMouseUp(g, xRange[1], yRange[0]); @@ -115,10 +118,8 @@ RangeTestCase.prototype.testEmptyUpdateOptions_doesntUnzoom = function() { g.updateOptions({}); - // This currently fails. - // See http://code.google.com/p/dygraphs/issues/detail?id=192 assertEqualsDelta([11, 18], g.xAxisRange(), 0.1); - // assertEqualsDelta([35, 40], g.yAxisRange(0), 0.2); + assertEqualsDelta([35, 40], g.yAxisRange(0), 0.2); } /**