fix(abacus-react): add data-testid attributes back to beads for testing

After the refactor to shared SVG rendering, data-testid attributes were
removed from beads, causing controlled-input tests to fail. Added them
back to both AbacusAnimatedBead and AbacusStaticBead for test compatibility.

Test IDs follow pattern: bead-place-{placeValue}-{type}[-pos-{position}]
Examples: bead-place-0-heaven, bead-place-0-earth-pos-0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-11-04 13:23:42 -06:00
parent e852afddc5
commit 23ae1b0c6f
2 changed files with 2 additions and 0 deletions

View File

@@ -293,6 +293,7 @@ export function AbacusAnimatedBead({
<>
<GElement
className={`abacus-bead ${bead.active ? 'active' : 'inactive'} ${hideInactiveBeads && !bead.active ? 'hidden-inactive' : ''}`}
data-testid={`bead-place-${bead.placeValue}-${bead.type}${bead.type === 'earth' ? `-pos-${bead.position}` : ''}`}
style={beadStyle}
{...bind()}
onClick={handleClick}

View File

@@ -91,6 +91,7 @@ export function AbacusStaticBead({
return (
<g
className={`abacus-bead ${bead.active ? 'active' : 'inactive'} ${hideInactiveBeads && !bead.active ? 'hidden-inactive' : ''}`}
data-testid={`bead-place-${bead.placeValue}-${bead.type}${bead.type === 'earth' ? `-pos-${bead.position}` : ''}`}
transform={transform}
style={{ transition: 'opacity 0.2s ease-in-out' }}
>