Skip to content

test(cli): read Avatar initials from generated-content attribute - #10934

Merged
astracat-bot[bot] merged 1 commit into
mainfrom
codebunny/fix/test-cli-read-avatar-initials-from-generated-content-attribute-8a7599
Nov 10, 2026
Merged

astracat-bot[bot] merged 1 commit into
mainfrom
codebunny/fix/test-cli-read-avatar-initials-from-generated-content-attribute-8a7599

Conversation

@astracat-bot

@astracat-bot astracat-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

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.md FR3 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-initials attribute, 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

  • Before: the unchanged test failed 2/2 runs at bf13b02 and 2/2 runs at current main 957d934, always with nine empty strings.
  • After: all 128 tests in the render suite pass. The focused suite also passes both tests, including the exact ordinary-name, accent-mark, joined-emoji, and flag expectations on both Segmenter paths.
  • Existing packages/core/src/Avatar/Avatar.test.tsx covers 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, and git diff --check completed; pre-review reports no findings.

Scope

Components: Avatar (render test only)

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no private operational context.

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

@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 10, 2026 2:01am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 10, 2026, 2:00 AM UTC

@astracat-bot
astracat-bot Bot merged commit 706fc03 into main Nov 10, 2026
63 checks passed
@github-actions
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

1 active deployment
Preview — af70f8fe Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants