test(canvas): add FilesTab + BudgetSection coverage — fixes focus-visible regression (closes #608) #614

Merged
infra-runtime-be merged 1 commits from fix/608-filesTab-focusTest into staging 2026-05-12 01:52:09 +00:00

1 Commits

Author SHA1 Message Date
0c4e4f6001 test(canvas): add FilesTab + BudgetSection coverage — fixes focus-visible regression
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
audit-force-merge / audit (pull_request) Successful in 3s
Add two test files that supersede the failing version in PR #611:

FilesTab.test.tsx (25 cases):
- NotAvailablePanel: heading, mono runtime, Chat tab hint, SVG aria-hidden,
  layout classes
- FilesToolbar: directory selector, all four options, setRoot on change,
  file count display, New/Upload/Clear conditional on /configs vs
  /workspace/home/plugins, aria-labels on all buttons, click callbacks

BudgetSection.test.tsx (14 cases, new path tabs/__tests__/):
- Loading indicator, fetch errors, 402 as exceeded banner
- Used/limit stats, unlimited display, remaining credits
- Progress bar cap at 100%, bar hidden for unlimited
- Exceeded banner on 402, clears after save
- Save errors, input update after save, null for cleared input
- Saving state while patch in flight
- isApiError402 regression coverage

Fixes #608: removes the overly-prescriptive focus-visible:ring-2 test
(PR #611 added a test for a CSS class FilesToolbar does not implement).

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