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

Fix flaky VCollectionHeader snapshot tests #4559

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

sarayourfriend
Copy link
Collaborator

Fixes

Fixes #4558 by @sarayourfriend

Description

Copied from the issue, where I discovered the underlying problem:

I have a hunch, just hit me that the change is small enough that it could be flying under the default tolerance we've set. I'll try lowering it for those tests and see. This would especially make sense because only the smallest breakpoint is failing, where the text takes up a larger percentage of the screen!

That turned out to be it, exactly. I manually updated these ones by setting maxPixelDiffRatio to 0 for the VCollectionHeader tests. I will open an issue after finishing this PR description to dig into smarter ways of configuring maxPixelDiffRatio that are aware of things like our varying screen sizes and the effect that might have on things.

It might mainly affect only the storybook visual regression tests because they are so much smaller overall? Anyway, something to think about in the other issue, not here. For now, I just want to fix the flaky test by updating these snapshots to have the correct text.

Testing Instructions

CI must pass. Confirm the updated screenshots use the correct text and look right otherwise.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • [N/A] I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • [N/A] I ran the DAG documentation generator (./ov just catalog/generate-docs for catalog
    PRs) or the media properties generator (./ov just catalog/generate-docs media-props
    for the catalog or ./ov just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@sarayourfriend sarayourfriend added 🟥 priority: critical Must be addressed ASAP 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository 🧱 stack: frontend Related to the Nuxt frontend labels Jun 26, 2024
@sarayourfriend sarayourfriend requested a review from a team as a code owner June 26, 2024 05:32
@sarayourfriend
Copy link
Collaborator Author

Actually, this is blocking all merges to main and causing CI to regularly fail on main, so I'm going to go ahead and include it in #4497. I don't think updating the snapshots is controversial in this case as a fix for the flaky tests.

@sarayourfriend sarayourfriend deleted the fix/v-collection-header-snapshots branch June 26, 2024 05:37
@obulat obulat restored the fix/v-collection-header-snapshots branch June 26, 2024 08:42
@obulat obulat reopened this Jun 26, 2024
Why did this not work???
The text was such a small portion of the screen that it would only fail _sometimes_ on the default maxPixelDiffRatio but only for the smallest screens, where the text takes up comparatively more of the pixels. On larger screens, it seems to never fail. I will create a follow up issue for this.
@obulat obulat force-pushed the fix/v-collection-header-snapshots branch from 1cad628 to f1b4b29 Compare June 26, 2024 08:43
@obulat
Copy link
Contributor

obulat commented Jun 26, 2024

Merging this with one approval to fix the CI failure on main.

@obulat obulat merged commit 27184c1 into main Jun 26, 2024
45 checks passed
@obulat obulat deleted the fix/v-collection-header-snapshots branch June 26, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟥 priority: critical Must be addressed ASAP 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

vcollectionheader storybook visual regression test broken
2 participants