test(canvas/chat): add AttachmentLightbox coverage (13 cases) #598

Closed
core-uiux wants to merge 3 commits from test/attachment-lightbox-coverage into main

3 Commits

Author SHA1 Message Date
ddff3d282a test(canvas/chat): add AttachmentAudio coverage (9 cases)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 20s
CI / Detect changes (pull_request) Successful in 26s
Harness Replays / detect-changes (pull_request) Successful in 21s
E2E API Smoke Test / detect-changes (pull_request) Successful in 45s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 44s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 44s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 18s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 33s
gate-check-v3 / gate-check (pull_request) Failing after 39s
qa-review / approved (pull_request) Successful in 22s
security-review / approved (pull_request) Successful in 22s
sop-tier-check / tier-check (pull_request) Successful in 29s
CI / Python Lint & Test (pull_request) Successful in 9s
audit-force-merge / audit (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Successful in 10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 11s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 9s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m40s
CI / Canvas (Next.js) (pull_request) Successful in 12m30s
CI / all-required (pull_request) Successful in 7s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Same state machine as AttachmentVideo: idle → loading → ready/error.
Loading skeleton with aria-label, tone-based border colors,
filename label, AttachmentChip fallback on error, blob URL cleanup,
external URI direct href without fetch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 00:22:51 +00:00
6c27ed934c test(canvas/chat): add AttachmentLightbox coverage (13 cases)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 20s
CI / Detect changes (pull_request) Successful in 46s
E2E API Smoke Test / detect-changes (pull_request) Successful in 35s
Harness Replays / detect-changes (pull_request) Successful in 22s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 48s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 49s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 20s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 38s
qa-review / approved (pull_request) Failing after 21s
security-review / approved (pull_request) Failing after 20s
gate-check-v3 / gate-check (pull_request) Failing after 32s
sop-tier-check / tier-check (pull_request) Successful in 24s
CI / Platform (Go) (pull_request) Successful in 14s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m36s
CI / Canvas (Next.js) (pull_request) Successful in 12m34s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 7s
+ AttachmentLightbox.test.tsx: 13 cases across render states,
  interaction, and focus management for the shared fullscreen modal.

Per RFC #2991 Phase 2, AttachmentLightbox owns: backdrop + centered
viewport, Esc to close, click-outside to close, focus trap (focus
enters close button on open, restores on close), reduced-motion respect.

Coverage:
  - open=false → renders nothing
  - role=dialog + aria-modal + aria-label
  - Close button aria-label="Close preview"
  - Click backdrop → onClose (e.target === e.currentTarget)
  - Click content → onClose NOT called (stopPropagation)
  - Escape key → onClose
  - Focus moves to close button on open
  - Focus restores to previous element on close
  - motion-reduce class on backdrop

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 00:20:30 +00:00
e6dff50ca5 test(canvas): add form-inputs coverage (35 cases) + Section accessibility fix
+ form-inputs.test.tsx: 35 cases across TextInput, NumberInput, Toggle,
  TagList, and Section — pure presentational components in the Config tab.
  Uses vi.hoisted() patterns from established suite; no jest-dom matchers.

+ form-inputs.tsx (Section): add aria-expanded + aria-controls to the
  collapsible toggle button for WCAG 2.1 AA compliance. The content div
  gets a stable id derived from the title; aria-controls links button to
  region. Indicator span gains aria-hidden="true" (decorative only).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 00:20:30 +00:00