Skip to content
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

POC of using Happo for visual diff testing #1229

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

agjohnson
Copy link
Collaborator

We talked about setting up Happo for visual diff testing, this was a manual test
that I did to demo the service. I'm happy with the output so far, it does about
what I expected. This is using the most basic version of setting up the diff,
which is just using a full page screenshot to produce the diff.

It's not clear how useful the diff will be as differences accumulate -- for
example can we disregard known differences between html4 and html5 and those
differences will be disregarded in future diffs too? The nature of the full page
diff might not allow this.

Next steps are to testing out Happo against at least the RTD PR build. It would
be most correct to test against our various test cases, but pretty soon that
will be limited to Sphinx 3-4, docutils latest, and HTML 5 anyways.

An example diff is here:
https://happo.io/a/728/p/957/compare/dev-75690771cac0c0aece71/dev-69c311fa8d5cc9ccaabf?

@agjohnson agjohnson requested a review from a team as a code owner September 9, 2021 17:23
@agjohnson agjohnson marked this pull request as draft September 9, 2021 17:24
@agjohnson
Copy link
Collaborator Author

image

@agjohnson agjohnson added the Needed: design decision A core team decision is required label Sep 9, 2021
@nienn
Copy link
Contributor

nienn commented Sep 10, 2021

@agjohnson

can we disregard known differences between html4 and html5 and those
differences will be disregarded in future diffs too?

This requires further consideration on how will the process be with our specific setup, but I believe we can: https://docs.happo.io/docs/ignoring-diffs

Edit: I'm not sure how that will work thought. If you ignore an element because it's rendered differently between html4 and html5 will that element then never be checked again for other new differences?

@agjohnson
Copy link
Collaborator Author

will that element then never be checked again for other new differences

Yeah, this is certainly the big question for me. I suppose we'll find out! I think we'll put a basic CI test of this on my next sprint, while we're still in demo mode on happo

@@ -17,7 +18,9 @@
"url": "https://github.com/readthedocs/sphinx_rtd_theme/issues"
},
"homepage": "https://github.com/readthedocs/sphinx_rtd_theme",
"dependencies": {},
"dependencies": {
"happo.io": "^6.7.0"
Copy link
Member

Choose a reason for hiding this comment

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

whats the reason this is a dependency and not a devDependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants