Commit Graph
6721 Commits
Author SHA1 Message Date
Bob QiuandClaude Sonnet 5.5 03e462ef92 chore: move insomnia-test README to test/refactor_e2e_tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 12:27:42 +08:00
Bob QiuandClaude Sonnet 5.5 912cf2678f chore: move write-insomnia-test skill to test/refactor_e2e_tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 12:11:35 +08:00
Bob Qiu e3316dc79f fix: limit response delay to maximum threshold in delayResponse function 2026-11-04 12:09:25 +08:00
Bob Qiu 95c916a735 refactor: reorganize FlowContext imports and introduce SessionContext for shared state management 2026-11-04 11:05:57 +08:00
Bob QiuandClaude Sonnet 5.5 abbf159e30 test(insomnia-test): drop non-HTTP request models and unions unused by e2e-1 specs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:57:08 +08:00
Bob QiuandClaude Sonnet 5.5 37f5ac47bd test(insomnia-test): drop page registry entries, pages and members not used by e2e-1 specs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:55:01 +08:00
Bob QiuandClaude Sonnet 5.5 61c4458a94 test(insomnia-test): move cloud-sync and document specs out of e2e-1 and prune unused code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:42:19 +08:00
Bob QiuandClaude Sonnet 5.5 98a87ac77d test(insomnia-test): drop empty flow/page classes and tidy blank lines
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:38:17 +08:00
Bob QiuandClaude Sonnet 5.5 983f95eac0 test(insomnia-test): keep only members referenced by e1 tests in components/enums/flows/models/pages
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:35:28 +08:00
Bob QiuandClaude Sonnet 5.5 461c0972bf test(insomnia-test): move unused page objects, components and models to e2e-2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:29:35 +08:00
Bob Qiu a3a6e4691a feat(tests): enhance spectral lint error tests with project node verification 2026-11-04 10:04:53 +08:00
Bob Qiu 154f046011 feat(tests): add E2E tests for spectral lint error handling in JSON and YAML specs 2026-11-04 09:55:05 +08:00
Bob Qiu efdad69414 feat(tests): add various E2E tests for cloud sync and workspace functionalities 2026-11-04 09:51:50 +08:00
Bob Qiu 71c13b2baa Merge branch 'develop' into test/e2e-1-framework 2026-11-04 09:42:28 +08:00
Bob QiuandClaude Sonnet 5.5 5b08e6a78e feat: add stable test ids to UI for the E2E framework (#10695)
* 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>
2026-11-04 09:39:53 +08:00
Bob Qiu 654897312d Merge branch 'develop' into test/e2e-1-framework 2026-11-03 17:18:31 +08:00
Bob Qiu 0f0878bfab refactor(insomnia-test): update timeout handling and constants for improved stability and resource management 2026-11-03 17:17:19 +08:00
Bingbing b0325204c8 fix(tabs): keep autofocus and route sync from clobbering tab state (#10690)
## 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.
2026-11-03 09:10:07 +00:00
Bob Qiu 9ed7da8adc refactor(insomnia-test): update parallel-test job description for clarity on shard usage 2026-11-03 16:41:11 +08:00
Bob Qiu 39beb719a5 refactor(insomnia-test): update shard calculation to cap at MAX_SHARDS for better resource management 2026-11-03 16:34:51 +08:00
Bob Qiu 4d64058641 refactor(insomnia-test): enhance editable name handling with retry logic for stability 2026-11-03 16:19:21 +08:00
Bob QiuandClaude Sonnet 5.5 5bd867c4be fix(insomnia-test): fix lint errors and warnings in page objects
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>
2026-11-03 15:54:45 +08:00
Bob Qiu 6588910591 refactor(insomnia-test): update locators to use Locator type and improve dialog handling 2026-11-03 11:14:41 +08:00
Bob QiuandClaude Sonnet 5.5 23fd048e90 refactor(insomnia-test): move cloud-sync-mock helper into misc
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>
2026-11-03 10:51:25 +08:00
Bob QiuandClaude Sonnet 5.5 26cd70adb4 feat(insomnia-test): add resolving-proxy-server mock facility
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>
2026-11-03 10:22:15 +08:00
Bob Qiu ac5c66139e refactor(insomnia-test): update timeout handling in Tree class to use LONG_TIMEOUT for better reliability 2026-11-03 09:54:42 +08:00
Bob Qiu 44e39cf3ec refactor(insomnia-test): enhance listbox locator in SelectComponent and improve textarea selection in VariableSourcePage 2026-11-03 09:39:50 +08:00
Bob Qiu ce02d27674 refactor(insomnia-test): update SKILL.md for improved clarity and consistency in framework facts 2026-11-03 09:12:37 +08:00
Bob Qiu 1826e2e2d9 refactor(insomnia-test): replace hardcoded IDs with constants in mock-api 2026-11-03 09:07:25 +08:00
Bob Qiu bfddff9390 Merge branch 'test/add-test-ids' into test/e2e-1-framework 2026-11-03 09:03:20 +08:00
Bob QiuandClaude Sonnet 5.5 8e8af0e045 style(insomnia-test): sort imports after switching to @package alias
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 18:21:54 +08:00
Bob QiuandClaude Sonnet 5.5 c54693906f refactor(insomnia-test): use @package alias for cross-directory imports
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 18:12:58 +08:00
Bob QiuandClaude Sonnet 5.5 ae0dddcc29 refactor(insomnia-test): organise ResponseView by response pane areas
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>
2026-11-02 17:53:59 +08:00
Bob Qiu da44b22359 refactor: replace createSubEnvironment with addAndRenameSubEnvironment for improved clarity and functionality 2026-11-02 17:44:27 +08:00
Bob QiuandClaude Sonnet 5.5 7fbaf67e62 ci(insomnia-test): print playwright --list output when test count cannot be determined
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 17:34:42 +08:00
Bob Qiu 1fcf4a779b refactor: simplify Playwright test execution and enhance coverage report handling 2026-11-02 17:19:01 +08:00
Bob Qiu 3d9be3e33c refactor: enhance GitHub Actions permissions and add artifact cleanup step 2026-11-02 17:04:16 +08:00
Bob Qiu a0987e73d7 Merge branch 'develop' into test/add-test-ids 2026-11-02 16:34:20 +08:00
Bob Qiu 838c78757a refactor: streamline file dialog stubbing across components and flows 2026-11-02 16:34:00 +08:00
Bob Qiu 33ed1cf0d3 refactor: update import paths for constants and fixtures in happy-path.spec.ts 2026-11-02 16:34:00 +08:00
Bob Qiu e47e61c951 docs: add README for insomnia-test with E2E testing details 2026-11-02 16:34:00 +08:00
Bob Qiu 3f8e6a683c refactor: update import paths to use absolute imports from @package
- 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.
2026-11-02 16:34:00 +08:00
Bob Qiu 819e796bb1 refactor: replace NeDB file access with database queries for improved reliability 2026-11-02 16:34:00 +08:00
Bob Qiu 1e8d768e52 refactor: update selection logic to use data-selected attribute for diff view and primitive selection 2026-11-02 16:34:00 +08:00
Bob QiuandClaude Sonnet 5.5 93836a85aa refactor: drop pinned-request special case when rebuilding sidebar tree
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 16:34:00 +08:00
Bob QiuandClaude Sonnet 5.5 cfc8f2a1c1 fix: use unique test ids for graphql explorer root types
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 16:34:00 +08:00
Bob QiuandClaude Sonnet 5.5 167ff2953f refactor: read graphql root types via unique test ids
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 16:34:00 +08:00
Bob Qiu 2c293f82f0 feat: refactor flow management to use SessionContext for improved state handling 2026-11-02 16:34:00 +08:00
Bob Qiu 61be22f1f5 feat: refactor data handling and polling mechanisms for improved stability and performance 2026-11-02 16:34:00 +08:00
Bob Qiu 4066f8604a feat: implement flow and page registries for improved lazy loading of instances 2026-11-02 16:34:00 +08:00