Skip to content

Enable restyle to redraw parcoords #3101 #3125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
7 changes: 4 additions & 3 deletions test/jasmine/tests/config_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var click = require('../assets/click');
var mouseEvent = require('../assets/mouse_event');
var failTest = require('../assets/fail_test');
var delay = require('../assets/delay');
var RESIZE_DELAY = 300;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @antoinerg - bad day for circleci it seems, we were getting repeated test failures here so I encouraged @archmoj to try increasing this delay. At some point we may want to change this so we're waiting on some event (listen for plotly_afterplot perhaps?) rather than a fixed delay, that should be more robust (and usually faster!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antoinerg What value you suggest we use here for RESIZE_DELAY now that the CI is back to normal?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't bother reducing it (if the goal is essentially to save time) - just leave it until we get around to exploring an event-based delay, rather than time-based.


describe('config argument', function() {

Expand Down Expand Up @@ -585,7 +586,7 @@ describe('config argument', function() {
viewport.set(width / 2, height / 2);

return Promise.resolve()
.then(delay(200))
.then(delay(RESIZE_DELAY))
.then(function() {
checkLayoutSize(elWidth / 2, elHeight / 2);
})
Expand Down Expand Up @@ -639,7 +640,7 @@ describe('config argument', function() {
Plotly.plot(gd, data, {}, {responsive: true})
.then(function() {return Plotly.restyle(gd, 'y[0]', data[0].y[0] + 2);})
.then(function() {viewport.set(width / 2, width / 2);})
.then(delay(200))
.then(delay(RESIZE_DELAY))
// .then(function() {viewport.set(newWidth, 2 * newHeight);}).then(delay(200))
.then(function() {
expect(cntWindowResize).toBe(1);
Expand Down Expand Up @@ -667,7 +668,7 @@ describe('config argument', function() {
// Resize viewport
.then(function() {viewport.set(width / 2, height / 2);})
// Wait for resize to happen (Plotly.resize has an internal timeout)
.then(delay(200))
.then(delay(RESIZE_DELAY))
// Check that final figure's size hasn't changed
.then(function() {checkLayoutSize(width, height);})
.catch(failTest)
Expand Down