X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Fresize.js;h=6230ffb941750cc7da47064b94fde89d6feb8dfc;hb=d97bf726ccc5645e60171f86b134fb29ac31b846;hp=9a8cffe650070456d9ec0132e4f061f12f7c4e2f;hpb=3123ca57f71d145bb5bcc4a2f754d3dff3225346;p=dygraphs.git diff --git a/auto_tests/tests/resize.js b/auto_tests/tests/resize.js index 9a8cffe..6230ffb 100644 --- a/auto_tests/tests/resize.js +++ b/auto_tests/tests/resize.js @@ -3,8 +3,16 @@ * * @author konigsberg@google.com (Robert Konigsberg) */ + +import Dygraph from '../../src/dygraph'; + +import DygraphOps from './DygraphOps'; +import Util from './Util'; + describe("resize", function() { +cleanupAfterEach(); + var data = "X,Y\n" + "1,100\n" + @@ -14,18 +22,9 @@ var data = "5,300\n" + "6,100\n"; -beforeEach(function() { - document.body.innerHTML = "
"; -}); - -afterEach(function() { -}); - it('testResizeMaintainsMouseOperations', function() { - document.body.innerHTML = - '
' + - ''; - var graph = document.getElementById("graph"); + var graph = document.getElementById('graph'); + graph.setAttribute('style', 'width: 640px; height: 480px;'); var callbackCount = 0; var callback = function() { @@ -46,7 +45,7 @@ it('testResizeMaintainsMouseOperations', function() { strum(g, 300, 640); assert.equal(6, callbackCount); - document.getElementById("graph").style.width = "500px"; + graph.style.width = "500px"; g.resize(); callbackCount = 0;