Skip to content

chore(icon): add vrt test coverage - #6636

Open
cdransf wants to merge 1 commit into
mainfrom
cdransf/icons-vrt-coverage
Open

chore(icon): add vrt test coverage#6636
cdransf wants to merge 1 commit into
mainfrom
cdransf/icons-vrt-coverage

Conversation

@cdransf

@cdransf cdransf commented Aug 18, 2026

Copy link
Copy Markdown
Member

Description

Adds icon.vrt.ts and icon-custom-properties.vrt.ts under components/icon/test/vrt/, covering sizes, labeled/decorative (aria-hidden) usage, forced-colors, and the three --swc-icon-* custom properties.

Motivation and context

Icon had no dedicated VRT suite; this follows the VRT foundation pattern established for button.

Related issue(s)

  • SWC-2400

Screenshots (if appropriate)

N/A

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed the Accessibility Practices for this feature, see: Aria Practices.
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Storybook VRT stories render correctly
    1. Go to Storybook, Icon/Icon VRT
    2. Open Permutations, Forced colors, and Custom properties
    3. Expect sizes, labeled/decorative icons, and custom-property overrides to render as described

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Accessibility testing checklist

  • Keyboard: <swc-icon> has no focusable parts; confirm no focus stops occur when tabbing through the Icon/Icon VRT → Permutations story.
  • Screen reader: 1. Open Icon/Icon VRT → Permutations. 2. Confirm the labeled icon is announced as an image with its label (e.g. "Search"). 3. Confirm the decorative icon is not announced (aria-hidden).

@cdransf cdransf self-assigned this Aug 18, 2026
@cdransf
cdransf requested a review from a team as a code owner August 18, 2026 20:30
@cdransf cdransf added Status:Ready for review PR ready for review or re-review. Spectrum 2 Issues related to Spectrum 2 run_vrt Triggers the Chromatic VRT run for 2nd-gen labels Aug 18, 2026
@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 69f8f03

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 Gen1 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-6636

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@cdransf
cdransf force-pushed the cdransf/icons-vrt-coverage branch from 8cbbd39 to 69f8f03 Compare August 18, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run_vrt Triggers the Chromatic VRT run for 2nd-gen Spectrum 2 Issues related to Spectrum 2 Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant