Skip to content

Add 'Test in browser' affordance on endpoints#332

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Baskarayelu:issue-290
Jun 29, 2026
Merged

Add 'Test in browser' affordance on endpoints#332
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Baskarayelu:issue-290

Conversation

@Baskarayelu

Copy link
Copy Markdown
Contributor

Closes #290

Summary

  • Add TestInBrowser component that renders an inline test runner on each endpoint card
  • One-click "Test in browser" button expands a panel with parameter inputs and a Run button
  • Fires a live fetch request and displays the HTTP status + formatted response body inline
  • Accessible: aria-expanded, labelled role="region", per-input aria-label (WCAG 2.1 AA)
  • 4 focused tests cover: default collapsed state, open/close toggle, network error handling, and success response display

Test plan

  • npm test -- --run src/components/TestInBrowser.test.tsx — 4/4 tests pass
  • Open an API detail page, click Documentation tab, expand an endpoint, click "Test in browser", fill params, click Run
  • Verify response body is shown with correct HTTP status badge
  • Verify keyboard navigation and screen reader announcements

🤖 Generated with Claude Code

Adds a new TestInBrowser component that renders a one-click inline test
runner on each endpoint card in the Documentation tab. Users can fill in
query/body parameters and fire a live request directly from the page,
with the HTTP status and formatted response body shown inline.

Accessibility: trigger button carries aria-expanded, the panel is a
labelled region, and all inputs have aria-label attributes (WCAG 2.1 AA).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@greatest0fallt1me greatest0fallt1me merged commit 5f0fc96 into CalloraOrg:main Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'Test in browser' affordance on endpoints

2 participants