* feat: enhance accessibility and testing capabilities across UI components
- Added data-testid attributes to various components for improved testing.
- Updated mock-url-bar to include test IDs for method and path.
- Enhanced generate-code-modal with test IDs for dropdowns.
- Included test IDs in git-branches-modal and git-project-branches-modal for error messages.
- Added test IDs to import-modal header and input-vault-key-modal for error display.
- Enhanced new-workspace-modal with test IDs for mock server type options.
- Included test IDs in select-modal for the select element.
- Added test IDs in sync-merge-modal for merge conflict items.
- Enhanced visual-diff components with test IDs for better test coverage.
- Included test IDs in workspace-certificates-modal for CA certificate section.
- Enhanced workspace-environments-edit-modal with test IDs for environment icons.
- Added test IDs in pane-header for breadcrumbs.
- Included test IDs in request-result-card for runner results.
- Enhanced request-test-result-pane with test IDs for test result rows.
- Added test IDs in project-create-form for unknown fields warning.
- Enhanced AI settings with test IDs for toggle switches.
- Included test IDs in boolean-setting for settings labels.
- Enhanced scripting-settings with test IDs for rule toggles.
- Added test IDs in sidebar components for search fields and nodes.
- Enhanced spec-view with test IDs for method buttons.
- Included test IDs in tab components for tab titles.
- Enhanced tags with test IDs for size, time, and URL tags.
- Added test IDs in tag-editor for tag arguments.
- Enhanced toast-notification with test IDs for toast body and content.
- Included test IDs in response-headers-viewer for header rows and values.
- Enhanced event-log-view with test IDs for event rows and cells.
* feat: add remaining test ids for folder pane, staging button, drop indicator and test results
- folder-pane on the request group Tabs
- stage-this-file / unstage-this-file on the git staging preview button
- drop-indicator-folder-name and data-valid on the sidebar drop indicator
- test-result-case / test-result-error inside the test result name
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* feat: add data-selected attributes for improved testing and UI state indication
* fix: use unique test ids for graphql explorer root types
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix: make sidebar data-parent-id return the parent row id
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(sidebar): make pinned header's data-parent-id point to its workspace
The Pinned header row had no parent id, so rebuilding the sidebar tree
from data-parent-id turned the whole pinned section into a separate root
instead of part of its collection.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test: add data-testid to variable editor custom template input
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* refactor(sidebar): remove unused sidebar utility functions and simplify pinned header ID generation
* fix(pinned-header): remove unused workspaceId from PinnedHeaderFlatItem interface
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## Background
The `insomnia-tab` smoke test flaked on `develop`. Repro:
1. Create a request collection, then create an HTTP request from the collection dropdown.
2. Immediately double-click the new request row in the sidebar to rename it.
3. The inline rename sometimes closes mid-typing (focus jumps to the request URL bar) and the rename is never applied.
A rarer variant: close a tab right after opening it, and the tab row sometimes reappears without being selected.
Both come from acting on stale async results. The URL bar's `autoFocus` (set by `focusUrlBarOnNextRequest`) called `cm.focus()` unconditionally and stole focus from the inline rename input, whose blur handler then committed and unmounted it. The tab sync effect decided from a tab-list snapshot taken before its awaits and applied the result unconditionally, re-creating a temporary tab for a route the user had already left.
## Changes
- `OneLineEditor`: skip taking focus when the user is already typing in another field. The caller's one-shot `onAutoFocus` flag is still consumed, so it cannot fire on a later remount. Its doc comment and the mirror in `key-value-editor` now say so.
- `useInsomniaTab`: cancel the route-to-tab sync on cleanup, read the tab list after the awaits, and drop results once the live location (pathname + search) no longer matches the route the effect started on. A drop is safe because `routeInfo` is derived from the same location, so every location change re-runs the effect for the settled route.
## Testing
- `insomnia-tab.test.ts` repeated 80+ times after the change: no failures (about 35% of first attempts failed before it).
- `focus-and-keyboard.test.ts` autofocus cases (URL bar on new request, Add row, KV blank row): passed.
- `vitest` `insomnia-tab-context` and `use-sidebar-drag-and-drop`: 86 passed.
- `eslint` and `tsc --noEmit`: clean.
Add a CommonJS override for plugin fixtures, drop force clicks and waitForTimeout from page objects, and avoid expect().catch().
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
It wraps mock-api admin endpoints like the other shared helpers in misc/,
and tests/ should only hold specs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Forward proxy on :4095 that maps insomnia.test to 127.0.0.1 (http directly,
https via CONNECT). Lets specs reach the local mock servers without using
`localhost`, which Insomnia treats as a secure context for Secure cookies.
Started automatically through playwright.config.ts webServer.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace the AppResponse-derived fields with statusBar, preview, headers,
console, events and tests so assertions map to what the user sees.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Changed import statements across multiple files to use absolute paths from the @package alias instead of relative paths.
- This improves code readability and maintainability by standardizing the import structure.