diff --git a/test/jasmine/karma.conf.js b/test/jasmine/karma.conf.js index c44111b421e..c52e76048a0 100644 --- a/test/jasmine/karma.conf.js +++ b/test/jasmine/karma.conf.js @@ -218,7 +218,10 @@ func.defaultConfig = { singleRun: argv.nowatch, // how long will Karma wait for a message from a browser before disconnecting (30 ms) - browserNoActivityTimeout: 30000, + browserNoActivityTimeout: 60000, + + // how long does Karma wait for a browser to reconnect (in ms). + browserDisconnectTimeout: 60000, // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher diff --git a/test/jasmine/tests/parcoords_test.js b/test/jasmine/tests/parcoords_test.js index db11d7caf3f..ed0eed4c48c 100644 --- a/test/jasmine/tests/parcoords_test.js +++ b/test/jasmine/tests/parcoords_test.js @@ -58,14 +58,6 @@ function mostOfDrag(x1, y1, x2, y2) { mouseEvent('mousemove', x2, y2); } -function purgeGraphDiv(done) { - var gd = d3Select('.js-plotly-plot').node(); - if(gd) Plotly.purge(gd); - destroyGraphDiv(); - - return delay(50)().then(done); -} - function getAvgPixelByChannel(id) { var canvas = d3Select(id).node(); @@ -371,12 +363,12 @@ describe('parcoords initialization tests', function() { describe('parcoords edge cases', function() { var gd; beforeEach(function() { - jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + afterEach(destroyGraphDiv); it('@gl Works fine with one panel only', function(done) { var mockCopy = Lib.extendDeep({}, mock2); @@ -644,8 +636,11 @@ describe('parcoords edge cases', function() { describe('parcoords Lifecycle methods', function() { var gd; - beforeEach(function() { gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; + gd = createGraphDiv(); + }); + afterEach(destroyGraphDiv); it('Plotly.deleteTraces with one trace removes the plot', function(done) { var mockCopy = Lib.extendDeep({}, mock); @@ -904,7 +899,7 @@ describe('parcoords basic use', function() { var gd; beforeEach(function() { - jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; mockCopy = Lib.extendDeep({}, mock); mockCopy.data[0].domain = { @@ -915,7 +910,7 @@ describe('parcoords basic use', function() { gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + afterEach(destroyGraphDiv); it('@gl should create three WebGL contexts per graph', function(done) { Plotly.react(gd, mockCopy) @@ -1220,10 +1215,11 @@ describe('parcoords react more attributes', function() { var gd; beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + afterEach(destroyGraphDiv); it('@gl should change various axis parameters', function(done) { Plotly.react(gd, mock3) @@ -1365,22 +1361,21 @@ describe('parcoords constraint interactions - without defined axis ranges', func var snapDelay = 100; var noSnapDelay = 20; beforeAll(function() { - jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; - initialSnapDuration = PC.bar.snapDuration; PC.bar.snapDuration = shortenedSnapDuration; }); afterAll(function() { - purgeGraphDiv(); + destroyGraphDiv(); PC.bar.snapDuration = initialSnapDuration; }); beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + afterEach(destroyGraphDiv); function getDashArray(index) { var highlight = document.querySelectorAll('.highlight')[index]; @@ -1651,22 +1646,21 @@ describe('parcoords constraint interactions - with defined axis ranges', functio var shortenedSnapDuration = 20; var noSnapDelay = 20; beforeAll(function() { - jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; - initialSnapDuration = PC.bar.snapDuration; PC.bar.snapDuration = shortenedSnapDuration; }); afterAll(function() { - purgeGraphDiv(); + destroyGraphDiv(); PC.bar.snapDuration = initialSnapDuration; }); beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + afterEach(destroyGraphDiv); it('@gl updates constraints above and below axis ranges', function(done) { var x = 295; @@ -1740,15 +1734,16 @@ describe('parcoords constraint click interactions - with pre-defined constraint }); afterAll(function() { - purgeGraphDiv(); + destroyGraphDiv(); PC.bar.snapDuration = initialSnapDuration; }); beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; gd = createGraphDiv(); }); - afterEach(purgeGraphDiv); + afterEach(destroyGraphDiv); it('@gl should not drop constraintrange on click', function(done) { Plotly.react(gd, initialFigure())