Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Misc perf improvements #1772

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

Merged
merged 14 commits into from
Jun 11, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
robustify cartesian_interact_test doubleclicker
  • Loading branch information
alexcjohnson committed Jun 10, 2017
commit dc4fc32ec45e4222ddaa0c886c2881909c1cee3a
5 changes: 4 additions & 1 deletion 5 test/jasmine/tests/cartesian_interact_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ describe('axis zoom/pan and main plot zoom', function() {
}

function doDblClick(subplot, directions) {
return function() { return doubleClick(getDragger(subplot, directions)); };
return function() {
gd._mouseDownTime = 0; // ensure independence from any previous clicks
return doubleClick(getDragger(subplot, directions));
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Man, this one was brutal - the key was that (locally, in chrome, when running multiple tests) it was seeing a previous click (from the same test, despite the fact that it still cared whether another test had been run before this one) too close to the first click of the doubleclick, and ended up responding as if there were two doubleclicks - which I still don't quite understand, I didn't think a triple-click would look like two doubles, but anyway this works and we can use this in the future (similar to your trick with gd._lastHoverTime @etpinard ) to cut down on unnecessary delays in the test suite.

For future reference @etpinard since we talked about potentially doing this, I went off on a dead end for a while when I noticed that calling Plotly.purge(gd) during destroyGraphDiv caused all sorts of problems... That turns out to be unrelated, that sometimes there are some things still waiting to happen on the plot after tests have finished (like rehover) which will fail (and confusingly attribute the failure to the next test that's run, since it's happening async) if we've purged the plot of attributes like emit but they still complete without failure if all we've done is remove the gd from the DOM.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for writing down the details.

Copy link
Contributor

Choose a reason for hiding this comment

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

image

🎉 nice work

}

function checkRanges(newRanges, msg) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.