Skip to content

test(Avatar): cover CSS size override regression - #8560

Open
liuliu-dev wants to merge 3 commits into
mainfrom
test/avatar-css-size-regression
Open

liuliu-dev wants to merge 3 commits into
mainfrom
test/avatar-css-size-regression

Conversation

@liuliu-dev

@liuliu-dev liuliu-dev commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Related to #8550

Adds development-only Avatar browser coverage for consumer CSS size overrides. The test asserts the computed width and height before taking VRT screenshots, catching the stretching regression observed when testing #8550 against github-ui.

Changelog

New

  • Avatar regression coverage for CSS size overrides.

Changed

  • None.

Removed

  • None.

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None — Test-only coverage; no rollout is required.

Testing & Reviewing

  • npm run build — passed
  • STORYBOOK_URL=http://localhost:6006 npx playwright test e2e/components/Avatar.test.ts --grep 'CSS Size Override Regression' --update-snapshots — 9 passed
  • With Fix/avatar button leading visual sizing #8550 temporarily applied, the same targeted test produced 9 expected failures: width expected 16px, received 20px.

Add browser coverage that verifies consumer sizing overrides remain square, guarding against the regression exposed by #8550.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 22:16
@liuliu-dev
liuliu-dev requested a review from a team as a code owner October 15, 2026 22:16
@changeset-bot

changeset-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e2aebcf

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

@liuliu-dev liuliu-dev added the skip changeset This change does not need a changelog label Oct 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Nine required screenshot baselines are missing, causing normal visual regression runs to fail.

1 open finding
What changed in this PR

Adds development-only Avatar regression coverage for consumer CSS size overrides, targeting the stretching observed with #8550. No runtime behavior changes.

Changes:

  • Adds an Avatar fixture with 16px CSS width and height.
  • Checks computed dimensions before screenshots across nine themes.
File Description
packages/​react/​src/​Avatar/​Avatar.dev.stories.tsx Adds the CSS size override fixture.
e2e/​components/​Avatar.test.ts Adds dimension assertions and themed screenshot coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/components/Avatar.test.ts
Co-authored-by: liuliu-dev <6688812+liuliu-dev@users.noreply.github.com>
Avoid screenshot baselines for the development-only regression fixture so the test fails only when computed dimensions change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch was successfully deployed

2 active deployments
storybook-preview-8560 — e2aebcff Deployed Oct 15, 2026 by github-actions[bot]
github-pages — e2aebcff Deployed Oct 15, 2026 by liuliu-dev via deploy-preview #33730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants