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

Add visual regression test to Blockquote to check that quote styles render correctly #1796

Merged
merged 11 commits into from
Apr 2, 2020

Conversation

sghoweri
Copy link
Contributor

@sghoweri sghoweri commented Mar 26, 2020

Jira

Follow-up to http://vjira2:8080/browse/BDS-2074

Summary

Adds a new Jest visual regression test to Blockquote that checks that the web component's quotes show up correctly when initially rendered via Twig.

FWIW, I already tested to confirm that this test should be sensitive enough to catch quotes being removed or added... for example, missing just one of the two double quotes is about a 25 to 27 pixel difference:
image

How to test

Confirm CI tests pass.

@sghoweri sghoweri added the patch label Mar 26, 2020
@sghoweri sghoweri added this to the v2.21.0 milestone Mar 26, 2020
@sghoweri
Copy link
Contributor Author

Note: only one reviewer should be needed here, whoever can get to this first 🙂

Copy link
Collaborator

@adamszalapski adamszalapski left a comment

Choose a reason for hiding this comment

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

I think we must update configuration because on my end test were failing because was 5 pixels difference.
image
Great job but if we add 0.02% or 0.01 difference will be ok and the test will be not failing.

The same situation is no Travis, test are failing because too big difference between diffs.

@sghoweri
Copy link
Contributor Author

sghoweri commented Mar 31, 2020

I think we must update configuration because on my end test were failing because was 5 pixels difference.
image
Great job but if we add 0.02% or 0.01 difference will be ok and the test will be not failing.

The same situation is no Travis, test are failing because too big difference between diffs.

@adamszalapski yeah I'm trying out an update that allows for up to 20 pixels to be different which, for what it's worth, is just barely the # pixel difference if one of the two sets of double quotes aren't showing up.

@sghoweri
Copy link
Contributor Author

OK - with quite a bit of trial and error, I think I have a VRT solution for Blockquote that should more consistently catch rendering issues (ex. missing Blockquote quotes) on MacOS and on Linux: https://github.com/boltdesignsystem/bolt/pull/1796/files#diff-372cba9a19220ba9e14566ff8b83f1b8R471

Copy link
Collaborator

@danielamorse danielamorse left a comment

Choose a reason for hiding this comment

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

Very nice. Tested locally and it passes. It fails when I cause the quotes to disappear.

@danielamorse danielamorse merged commit 4aa6f47 into master Apr 2, 2020
@danielamorse danielamorse deleted the feature/add-blockquote-quote-vrt-test branch April 2, 2020 18:39
@sghoweri
Copy link
Contributor Author

sghoweri commented Apr 8, 2020

PR was released with v2.21.0

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.

3 participants