Skip to content

Commit 2228339

Browse files
etpinardarchmoj
authored andcommitted
make parcoords + uirevision test pass on CI
1 parent c8dedcb commit 2228339

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/jasmine/tests/plot_api_react_test.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var supplyAllDefaults = require('../assets/supply_defaults');
1515
var mockLists = require('../assets/mock_lists');
1616
var mouseEvent = require('../assets/mouse_event');
1717
var drag = require('../assets/drag');
18+
var delay = require('../assets/delay');
1819

1920
var MAPBOX_ACCESS_TOKEN = require('@build/credentials.json').MAPBOX_ACCESS_TOKEN;
2021

@@ -944,7 +945,10 @@ describe('Plotly.react and uirevision attributes', function() {
944945
gd = createGraphDiv();
945946
});
946947

947-
afterEach(destroyGraphDiv);
948+
afterEach(function() {
949+
Plotly.purge(gd);
950+
destroyGraphDiv();
951+
});
948952

949953
function checkCloseIfArray(val1, val2, msg) {
950954
if(Array.isArray(val1) && Array.isArray(val2)) {
@@ -1762,7 +1766,7 @@ describe('Plotly.react and uirevision attributes', function() {
17621766
_run(fig, editEditable, checkAttrs(true), checkAttrs).then(done);
17631767
});
17641768

1765-
it('@noCI @gl preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision', function(done) {
1769+
it('@gl preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision', function(done) {
17661770
function fig(mainRev, traceRev) {
17671771
return {
17681772
data: [{
@@ -1805,16 +1809,18 @@ describe('Plotly.react and uirevision attributes', function() {
18051809
.then(function() {
18061810
return drag({node: axisDragNode(0), dpos: [0, 50], noCover: true});
18071811
})
1812+
.then(delay(100))
18081813
.then(function() {
18091814
return drag({node: axisDragNode(0), dpos: [0, -50], noCover: true});
18101815
})
1816+
.then(delay(100))
18111817
.then(function() {
18121818
return drag({node: axisDragNode(1), dpos: [0, -50], noCover: true});
18131819
});
18141820
}
18151821

18161822
_run(fig, editTrace, checkState([attrs(true)]), checkState([attrs()])).then(done);
1817-
});
1823+
}, 5 * jasmine.DEFAULT_TIMEOUT_INTERVAL);
18181824

18191825
it('preserves editable: true axis titles using the axis uirevisions', function(done) {
18201826
function fig(mainRev, axRev) {

0 commit comments

Comments
 (0)