Skip to content

Commit

Permalink
make parcoords + uirevision test pass on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Jun 25, 2019
1 parent c8dedcb commit f15c622
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/jasmine/tests/plot_api_react_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var supplyAllDefaults = require('../assets/supply_defaults');
var mockLists = require('../assets/mock_lists');
var mouseEvent = require('../assets/mouse_event');
var drag = require('../assets/drag');
var delay = require('../assets/delay');

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

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

afterEach(destroyGraphDiv);
afterEach(function() {
Plotly.purge(gd);
destroyGraphDiv();
});

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

it('@noCI @gl preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision', function(done) {
it('@gl preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision', function(done) {
function fig(mainRev, traceRev) {
return {
data: [{
Expand Down Expand Up @@ -1805,16 +1809,18 @@ describe('Plotly.react and uirevision attributes', function() {
.then(function() {
return drag({node: axisDragNode(0), dpos: [0, 50], noCover: true});
})
.then(delay(100))
.then(function() {
return drag({node: axisDragNode(0), dpos: [0, -50], noCover: true});
})
.then(delay(100))
.then(function() {
return drag({node: axisDragNode(1), dpos: [0, -50], noCover: true});
});
}

_run(fig, editTrace, checkState([attrs(true)]), checkState([attrs()])).then(done);
});
}, 5 * jasmine.DEFAULT_TIMEOUT_INTERVAL);

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

0 comments on commit f15c622

Please sign in to comment.