@@ -6,6 +6,7 @@ var Parcoords = require('@src/traces/parcoords');
66var attributes = require ( '@src/traces/parcoords/attributes' ) ;
77
88var createGraphDiv = require ( '../assets/create_graph_div' ) ;
9+ var delay = require ( '../assets/delay' ) ;
910var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
1011var fail = require ( '../assets/fail_test' ) ;
1112var mouseEvent = require ( '../assets/mouse_event' ) ;
@@ -239,15 +240,20 @@ describe('parcoords initialization tests', function() {
239240} ) ;
240241
241242describe ( '@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