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 Tile Group all variants visual regression test after resolving rendering issues on Chromatic's end #8829

Closed
eriklharper opened this issue Feb 23, 2024 · 2 comments
Assignees
Labels
p - high Issue should be addressed in the current milestone, impacts component or core functionality testing Issues related to automated or manual testing.

Comments

@eriklharper
Copy link
Contributor

Test type

visual regression

Which Component(s)

Tile Group

Unstable Tests

Name of the story is allVariants_NoTest.

Test error, if applicable

No response

PR skipped, if applicable

n/a

Additional Info

Waiting for feedback from Chromatic's team on this, since adding test timeouts doesn't resolve the issue. It appears to not be related to a timeout issue, but something else related to the icons not properly rendering for each variant in the Story.

@eriklharper eriklharper added testing Issues related to automated or manual testing. p - high Issue should be addressed in the current milestone, impacts component or core functionality 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Feb 23, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Apr 3, 2024
@geospatialem geospatialem added this to the 2024-08-27 - Aug Release milestone Apr 3, 2024
@eriklharper eriklharper added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. labels May 3, 2024
Copy link
Contributor

github-actions bot commented May 3, 2024

Installed and assigned for verification.

@eriklharper
Copy link
Contributor Author

eriklharper commented May 3, 2024

This is addressed in #8806 . It turns out this isn't an issue with Chromatic, but has to do with how calcite-icon renders SVGs. calcite-icon renders SVGs "lazily" by waiting until the icon comes into the viewport before it renders them. This causes problems with Chromatic snapshots because when there is a very large HTML page that vertically scrolls beyond the default vertical dimension of the viewport, the icons don't show up when Chromatic takes a picture of it. The interesting thing is even though you can specify a viewport height, Chromatic still captures pixels that go beyond that height.

I worked around this issue by refactoring the top of the All Variants story HTML to include all the most recent Tile redesign elements so that the icons show up properly. I removed all variants that require icons to render below the fold and included the new border selection-appearance versions, since those will show up fine in the snapshots.

This is the "above the fold" snapshot that will render the icons correctly in Chromatic:
image

This is a snippet of the "below the fold" snapshot that will still be captured properly by Chromatic because the icons are removed:
image

@geospatialem geospatialem removed the 3 - installed Issues that have been merged to master branch and are ready for final confirmation. label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p - high Issue should be addressed in the current milestone, impacts component or core functionality testing Issues related to automated or manual testing.
Projects
None yet
Development

No branches or pull requests

3 participants