From: Jukka Kurkela Date: Tue, 21 Jan 2020 20:43:41 +0000 (+0200) Subject: Clean up after test (#6976) X-Git-Tag: v3.0.0-alpha~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b05699eec5b2650e1e5836a66ba853c1cad113b3;p=thirdparty%2FChart.js.git Clean up after test (#6976) * Clean up * Make sure the event is inside chart are --- diff --git a/test/specs/core.controller.tests.js b/test/specs/core.controller.tests.js index aa4784fe0..30968a2bf 100644 --- a/test/specs/core.controller.tests.js +++ b/test/specs/core.controller.tests.js @@ -728,6 +728,8 @@ describe('Chart', function() { } }); + var wrapper = chart.canvas.parentNode; + waitForResize(chart, function() { var canvas = chart.canvas; expect(chart).toBeChartOfSize({ @@ -749,6 +751,8 @@ describe('Chart', function() { rw: 455, rh: 455, }); + chart.destroy(); + window.document.body.removeChild(wrapper); done(); }); canvas.parentNode.style.width = '455px'; diff --git a/test/specs/plugin.tooltip.tests.js b/test/specs/plugin.tooltip.tests.js index b890922e4..b352b1a98 100644 --- a/test/specs/plugin.tooltip.tests.js +++ b/test/specs/plugin.tooltip.tests.js @@ -148,7 +148,7 @@ describe('Core.Tooltip', function() { done(); }); - jasmine.triggerMouseEvent(chart, 'mousemove', {x: point.x, y: chart.chartArea.top}); + jasmine.triggerMouseEvent(chart, 'mousemove', {x: point.x, y: chart.chartArea.top + 10}); }); it('Should only display if intersecting if intersect is set', function(done) {