test(web): cover slot-actions and progress-block logic - #1080
Merged
Conversation
…ock math - slot-actions.test.tsx: main-action selection (primary promotion, non-destructive fallback, order-independence), menu-needed thresholds, confirm-dialog open/cancel/confirm wiring, action payload fields, readOnly/durable-state locking, authored-disabled aria wiring. - progress-block.test.tsx: percent calculation, value/max clamping, non-positive max guard, round-vs-floor, label/title precedence, ARIA label fallback chain, tone class, detail markdown gating. Both files went through a manual mutation battery (24 mutants total, all observable ones killed). One confirmed-unobservable redundant guard found in slot-actions.tsx's handleClick (already fully covered by ActionRefButton's own disabled/authoredDisabled click guard) — not a test gap, recorded in the test-enforcer backlog. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
selfcontained
deleted the
agt_6c534803317a/job-test-enforcer-d14bc5b7
branch
September 11, 2026 02:44
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.
Summary
Routine test-enforcer maintenance run. Local suite was already green (42nd+ consecutive) with no failures, no flakes, and no unrelated CI issues — so this run added coverage per the carried-forward
next_focus(agent-surfaces block components).Changes
slot-actions.test.tsx(13 tests):SlotActions' main-action selection algorithm (primary promotion, non-destructive fallback, order-independence of authored position), the menu-needed threshold logic (including thesome-vs-everyempty-array edge case), the confirm-dialog open/cancel/confirm wiring and payload (blockId/actionId/baseRevision), readOnly/durable-interaction locking, and authored-disabledaria-disabledwiring.progress-block.test.tsx(10 tests):ProgressBlockView's percent calculation, value/max clamping (both directions), the non-positive-max divide-by-zero guard, round-vs-floor rounding, label/title precedence for the heading vs. the progress line, the three-way ARIA-label fallback chain, tone-driven fill class, and detail-markdown gating.Both files were built against pre-existing, unmodified source (
slot-actions.tsx,progress-block.tsx) — no product code changed.Verification
handleClick's ownaction.disabled || readOnlyguard) is confirmed unobservable — already fully covered byActionRefButton's own click-blocking when disabled/authored-disabled, verified against the whole 217-testagent-surfacessuite. Recorded as a code-cleanup note in the test-enforcer backlog, not treated as a test gap.pnpm run checktype errors (an invalidtone: "danger"value forProgressBlock, which deliberately excludesdanger; and astring[]return type that should have toleratednullfromgetAttribute) and 2 duplicate tests with no unique mutation-kill value. All four fixed; mutation kill for the affected assertion re-verified after the fix.pnpm run check,pnpm run format,pnpm run test(server 186f/3279t, web 130f/1911t, ext 9f/60t),pnpm run finalize:web,pnpm run test:e2e(198 passed/12 skipped), andpnpm run test:e2e:live(11/11, zero leaked tmux sessions) all green.Deliberately not tested: Radix
DropdownMenu's open-menu contents (item ordering, destructive separator, busy spinner in the trigger) — no precedent exists elsewhere in this repo'sapps/websuite for opening a Radix dropdown in jsdom (likely missingPointerEvent/hasPointerCapturepolyfills), so this is an intentionally-deferred gap, not an oversight.🤖 Generated with Claude Code