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

Group Percy snapshots by test case name #5299

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

jmuzina
Copy link
Member

@jmuzina jmuzina commented Aug 13, 2024

Done

Groups Percy snapshots by example test case name. The example's path relative to repo root (ignoring standalone/ and query parameters) is used as a test case name.

So, for example, given snapshots of docs/examples/patterns/suru/combined?theme=light and docs/examples/standalone/patterns/suru/combined?theme=paper, both snapshots are grouped under docs/examples/patterns/suru/combined

This means we can expect each base & pattern test case to have 6 snapshots (3 per color theme in non-standalone, and another 3 in standalone), and all other test cases will have 3 snapshots.

Read Percy blog for more information on this feature.

Fixes WD-13805

QA

  • Review test build with test-case grouping enabled. Ensure that snapshots are grouped as expected. Open the build info and make sure the expected number of screenshots was taken. The only change should be snapshot grouping - there are no changes to breakpoints, snapshot names, themes, etc.

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix release (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

Screenshots

image

@webteam-app
Copy link

@jmuzina jmuzina force-pushed the percy-group-by-test-case-name branch from 3afc47a to b5f643a Compare September 4, 2024 12:24
@jmuzina
Copy link
Member Author

jmuzina commented Sep 4, 2024

Browserstack has deployed a fix for our problem with the test case attribute - I've run a test build locally and things look as expected.

@jmuzina jmuzina marked this pull request as ready for review September 4, 2024 12:26
@jmuzina jmuzina added Review: Percy needed This PR needs a review of Percy for visual regressions Review: Percy +1 and removed Review: Percy needed This PR needs a review of Percy for visual regressions labels Sep 4, 2024
@jmuzina jmuzina merged commit 7ff9e82 into canonical:main Sep 4, 2024
10 checks passed
@jmuzina jmuzina deleted the percy-group-by-test-case-name branch September 4, 2024 19:37
jmuzina added a commit to jmuzina/vanilla-framework that referenced this pull request Sep 4, 2024
jmuzina added a commit that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants