Repository navigation
test(Avatar): cover CSS size override regression - #8560
liuliu-dev wants to merge 3 commits into
Conversation
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>
|
There was a problem hiding this comment.
🟡 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.
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>

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
Changed
Removed
Rollout strategy
Testing & Reviewing
npm run build— passedSTORYBOOK_URL=http://localhost:6006 npx playwright test e2e/components/Avatar.test.ts --grep 'CSS Size Override Regression' --update-snapshots— 9 passed16px, received20px.