Skip to content

percy tests #1758

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 20 commits into from
Sep 11, 2019
Merged

percy tests #1758

merged 20 commits into from
Sep 11, 2019

Conversation

emmanuelle
Copy link
Contributor

No description provided.

@emmanuelle
Copy link
Contributor Author

This PR is ready for review. The percy snapshots are on https://percy.io/plotly/plotly.py/builds/2538608. The 3d and mapbox snapshots don't look good, I still have to investigate this.

@nicolaskruchten
Copy link
Contributor

Nice! So the 3d and mapbox stuff basically won't work at all because Percy snapshots the DOM and the 3d stuff is in a canvas3d/webgl context whereas the mapbox stuff makes external requests for images which probably aren't done or aren't available at snapshot-time. This is already a big step forward in terms of locking down regressions though!

In order to move forward I think we should add Percy to the Github checks and ensure that Jon has access to Percy (heads-up @bpostlethwaite!)

@emmanuelle
Copy link
Contributor Author

OK thanks, I'll remove the 3d and mapbox stuff for now then.

@nicolaskruchten
Copy link
Contributor

Oh actually I would leave them in! It proves that they don't error out, and we do get some benefit from knowing that the legends etc render as expected IMO

@emmanuelle
Copy link
Contributor Author

I think adding Percy to the Github checks needs to be done by someone with admin rights on Percy, cc @bpostlethwaite

@nicolaskruchten
Copy link
Contributor

@emmanuelle can you rebase onto master please? I think I've wired up percy correctly

@emmanuelle
Copy link
Contributor Author

Interestingly, in the case of animations the snapshot seems to be at a random position, hence the visual diff here.

@emmanuelle
Copy link
Contributor Author

Should we avoid animations in the visual test suite? Or is there a way to freeze the animation at a given frame?

@nicolaskruchten
Copy link
Contributor

Hehe yeah. Are the animations in auto-play mode? that won't work, as Percy isn't quite that consistent about timing :) either that or we need to use animations with a single frame or something

@nicolaskruchten
Copy link
Contributor

but in general: hurray, it's working!

@emmanuelle
Copy link
Contributor Author

yes, it is auto-play. It's pretty cool that we could detect this with percy :-)

@emmanuelle
Copy link
Contributor Author

I was thinking maybe of having a very large duration between frames so that always the same frame is captured...

@emmanuelle
Copy link
Contributor Author

so fig.write_html can set auto_play to False, this is probably the solution

@nicolaskruchten
Copy link
Contributor

💃

@emmanuelle emmanuelle merged commit 074408f into master Sep 11, 2019
@emmanuelle emmanuelle deleted the percy branch September 11, 2019 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants