Skip to content

Commit e0e3ee1

Browse files
authored
Merge pull request #2406 from plotly/grid-ci-test
Plotly.purge in parcoords_test
2 parents 77c218a + ec69aa6 commit e0e3ee1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/jasmine/tests/parcoords_test.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var Parcoords = require('@src/traces/parcoords');
66
var attributes = require('@src/traces/parcoords/attributes');
77

88
var createGraphDiv = require('../assets/create_graph_div');
9+
var delay = require('../assets/delay');
910
var destroyGraphDiv = require('../assets/destroy_graph_div');
1011
var fail = require('../assets/fail_test');
1112
var mouseEvent = require('../assets/mouse_event');
@@ -239,15 +240,20 @@ describe('parcoords initialization tests', function() {
239240
});
240241

241242
describe('@gl parcoords', function() {
242-
243243
beforeAll(function() {
244244
mock.data[0].dimensions.forEach(function(d) {
245245
d.values = d.values.slice(lineStart, lineStart + lineCount);
246246
});
247247
mock.data[0].line.color = mock.data[0].line.color.slice(lineStart, lineStart + lineCount);
248248
});
249249

250-
afterEach(destroyGraphDiv);
250+
afterEach(function(done) {
251+
var gd = d3.select('.js-plotly-plot').node();
252+
if(gd) Plotly.purge(gd);
253+
destroyGraphDiv();
254+
255+
return delay(50)().then(done);
256+
});
251257

252258
describe('edge cases', function() {
253259

@@ -496,7 +502,7 @@ describe('@gl parcoords', function() {
496502
.then(done);
497503
});
498504

499-
it('@flaky Skip dimensions which are not plain objects or whose `values` is not an array', function(done) {
505+
it('Skip dimensions which are not plain objects or whose `values` is not an array', function(done) {
500506

501507
var mockCopy = Lib.extendDeep({}, mock1);
502508
var newDimension, i, j;

0 commit comments

Comments
 (0)