X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fper_axis.js;fp=auto_tests%2Ftests%2Fper_axis.js;h=d7f1a494d1eaaf69ebb71cd10a4fef7091489d9b;hb=e8c70e4e0f4c124a2c68eb43d6ec4e781d1bf810;hp=4ae620884fcc296083aad2189c980726725b7690;hpb=6ecc073934b76e5076f917112a24ff7094857730;p=dygraphs.git diff --git a/auto_tests/tests/per_axis.js b/auto_tests/tests/per_axis.js index 4ae6208..d7f1a49 100644 --- a/auto_tests/tests/per_axis.js +++ b/auto_tests/tests/per_axis.js @@ -3,9 +3,18 @@ * * @author konigsberg@google.com (Robert Konigsberg) */ + +import Dygraph from '../../src/dygraph'; +import * as utils from '../../src/dygraph-utils'; + +import Util from './Util'; +import CanvasAssertions from './CanvasAssertions'; +import Proxy from './Proxy'; + describe("per-axis", function() { -var _origGetContext = Dygraph.getContext; +cleanupAfterEach(); +useProxyCanvas(utils, Proxy); var xAxisLineColor = "#00ffff"; var yAxisLineColor = "#ffff00"; @@ -13,11 +22,6 @@ var yAxisLineColor = "#ffff00"; var g, graph; beforeEach(function() { - document.body.innerHTML = "
"; - Dygraph.getContext = function(canvas) { - return new Proxy(_origGetContext(canvas)); - } - var opts = { axes : { x : { @@ -42,10 +46,6 @@ beforeEach(function() { g = new Dygraph(graph, data, opts); }); -afterEach(function() { - Dygraph.getContext = _origGetContext; -}); - it('testDrawXAxis', function() { g.updateOptions({ axes : { x : { drawAxis: true }} }); assert.isTrue(graph.getElementsByClassName('dygraph-axis-label-x').length > 0);