Repository navigation
test(cli): read Avatar initials from generated-content attribute - #10934
Merged
astracat-bot[bot] merged 1 commit intoNov 10, 2026
Conversation
astracat-bot
Bot
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
November 10, 2026 01:50
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
AI review status for this pull request.
|
4 tasks done
github-actions
Bot
deleted the
codebunny/fix/test-cli-read-avatar-initials-from-generated-content-attribute-8a7599
branch
November 10, 2026 06:04
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
validation: ran pnpm test:node packages/cli/api/render/render.test.mjs: all 128 tests passed; pnpm test:node packages/cli/api/render/render.test.mjs -t 'Avatar initials without Intl.Segmenter': both tests passed.
Maintainer impact
The Avatar initials render test fails after bf13b02 (#10816). Avatar now draws decorative initials through generated content backed by
data-initials, but the test strips HTML tags and reads text nodes, producing nine empty strings. This blocks the node suite without detecting an initials calculation defect.Intended invariant
Avatar's current contract,
docs/specs/components/Avatar/Avatar.spec.mdFR3 and AR1, preserves initials derived from the name while keeping them decorative. The render test must still compare all nine exact expected values, both with and without Intl.Segmenter.Change
Read each avatar's
data-initialsattribute, which supplies its generated content, instead of its text nodes. Keep the existing per-name grouping and both equality assertions unchanged. A missing attribute still yields an empty string and fails the assertion.No behavior change. Only the test helper changes; no component, renderer, fixture, expectation, skip, or timeout changes.
Evidence
packages/core/src/Avatar/Avatar.test.tsxcovers generated-content CSS and decorative initials; this change does not replace that evidence with a pixels claim.pnpm specs:for packages/cli/api/render/render.test.mjs,pnpm specs:for --diff origin/main,pnpm review:pre, andgit diff --checkcompleted; pre-review reports no findings.Scope
Components: Avatar (render test only)
Failing test fixed
027b84f419d0262cbfce9180af67aa579964681101a9519a1b2c81752c1135d6 — packages/cli/api/render/render.test.mjs › render(): Avatar initials without Intl.Segmenter › match for ordinary names and differ only for joined emoji, flags and separate accent marks