[issues/506] Convert R-D Bind to Destination TCs to assisted mode (9 TCs)#512
Conversation
…TCs) ## Summary Adds 9 assisted integration tests for the R-D Bind to Destination flow — the multi-step pattern where the human opens the picker, selects a destination, and the test asserts toast/status bar messages via log capture. Also removes 3 duplicate TCs (001-003) that were fully covered by existing terminal/file picker tests. ## Changes - New `bindToDestination.test.ts` with 9 `[assisted]` tests covering bind success (terminal, file, AI assistant), smart-bind confirmation dialog (items, Yes/replace, No/keep), escape handling, and AI assistant re-bind/switch scenarios - Deleted TCs 001-003 from QA YAML — "picker opens via trigger X" was already tested by every terminal/file picker assisted test (no renumbering per QA001) - Updated TCs 004-012 from `automated: false` to `automated: assisted` - AI assistant TCs (006, 011, 012) are included as assisted — they require running in an IDE with the relevant extensions installed - TC 012 (switch between AI assistants) includes a setup `waitForHuman` prompting to install a second AI extension; will be fully testable once #500 (custom AI assistants) lands - Fixed smart-bind confirmation tests (007, 009) — removed incorrect "Escape again" step; the confirmation dialog is invoked after `DestinationPicker.pick()` returns (in `commitBind`), so no parent picker reopens ## Test Plan - [x] All 1737 unit tests pass (99 suites) - [x] QA coverage validator passes (38 assisted entries, 59 automated, 98 false) - [x] 9/10 assisted tests pass with human interaction (`pnpm test:release:grep "bind-to-destination"`) - [ ] TC 012 deferred — requires two AI assistant extensions in the test host (blocked on #500) ## Documentation - CHANGELOG: not needed — test infrastructure, not user-facing - README: not needed ## Related - Closes #506 - Parent: #504 - Blocked: TC 012 depends on #500 for testability
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughUpdates QA bind-to-destination test cases from manual to assisted, adds a new assisted-mode integration test suite for bind-to-destination, and introduces/shared test helpers for creating/opening files and terminals; existing integration tests were refactored to use the new helpers. Changes
Sequence Diagram(s)Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The PR modifies existing test cases to change their automation status from false to assisted, indicating that they require manual testing due to UI interactions. This introduces a need for additional test cases to cover the new confirmation dialog behavior and ensure comprehensive testing of the binding functionality. Suggested test cases:
Generated by QA Gap Check (GPT-4o-mini via GitHub Models) |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts (1)
198-202: Consider extractingAI_ASSISTANT_DISPLAY_NAMESto a shared constant.This array is duplicated at lines 400-403. Extracting it to the top of the suite would improve maintainability if AI assistant names need updating.
♻️ Proposed refactor
suite('R-D Bind to Destination', () => { const log = createLogger('bindToDestination'); const terminals: vscode.Terminal[] = []; const tmpFileUris: vscode.Uri[] = []; + const AI_ASSISTANT_DISPLAY_NAMES = [ + 'Claude Code Chat', + 'Cursor AI Assistant', + 'GitHub Copilot Chat', + ];Then reference
AI_ASSISTANT_DISPLAY_NAMESin both TC 006 and TC 011.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts` around lines 198 - 202, The array AI_ASSISTANT_DISPLAY_NAMES is duplicated in the test suite; extract it into a single shared constant at the top of the test file (e.g., above the describe block) and replace the duplicated literals in both test cases (TC 006 and TC 011) with references to that constant to avoid drift and make updates simpler; ensure any imports or scope changes still allow both tests to access AI_ASSISTANT_DISPLAY_NAMES.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts`:
- Around line 198-202: The array AI_ASSISTANT_DISPLAY_NAMES is duplicated in the
test suite; extract it into a single shared constant at the top of the test file
(e.g., above the describe block) and replace the duplicated literals in both
test cases (TC 006 and TC 011) with references to that constant to avoid drift
and make updates simpler; ensure any imports or scope changes still allow both
tests to access AI_ASSISTANT_DISPLAY_NAMES.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 362994b5-d532-4b65-9f0b-3d02a56459e0
📒 Files selected for processing (2)
packages/rangelink-vscode-extension/qa/qa-test-cases-v1.1.0-003.yamlpackages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts (1)
160-185: Consider extracting AI assistant names to a shared constant.The
AI_ASSISTANT_DISPLAY_NAMESarray is duplicated in TC 006 and TC 011. Consider extracting to a suite-level or module-level constant to keep them in sync.♻️ Suggested refactor
suite('R-D Bind to Destination', () => { const log = createLogger('bindToDestination'); const terminals: vscode.Terminal[] = []; const tmpFileUris: vscode.Uri[] = []; + const AI_ASSISTANT_DISPLAY_NAMES = [ + 'Claude Code Chat', + 'Cursor AI Assistant', + 'GitHub Copilot Chat', + ]; // ... in test cases, reference the shared constant🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts` around lines 160 - 185, Extract the duplicated AI_ASSISTANT_DISPLAY_NAMES array into a shared constant and reference it from both tests: define a single exported constant (e.g., AI_ASSISTANT_DISPLAY_NAMES) at the top of this test module or in a test utilities module, then replace the local arrays in the tests "bind-to-destination-006" and "bind-to-destination-011" with that constant; ensure both tests import/use the same symbol so the list stays in sync and update any assertions to reference the shared constant.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts`:
- Around line 160-185: Extract the duplicated AI_ASSISTANT_DISPLAY_NAMES array
into a shared constant and reference it from both tests: define a single
exported constant (e.g., AI_ASSISTANT_DISPLAY_NAMES) at the top of this test
module or in a test utilities module, then replace the local arrays in the tests
"bind-to-destination-006" and "bind-to-destination-011" with that constant;
ensure both tests import/use the same symbol so the list stays in sync and
update any assertions to reference the shared constant.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e2ca9fc4-81da-4a5e-bcbc-597c636e422e
📒 Files selected for processing (6)
packages/rangelink-vscode-extension/src/__integration-tests__/helpers/fileHelpers.tspackages/rangelink-vscode-extension/src/__integration-tests__/helpers/index.tspackages/rangelink-vscode-extension/src/__integration-tests__/helpers/terminalHelpers.tspackages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.tspackages/rangelink-vscode-extension/src/__integration-tests__/suite/filePicker.test.tspackages/rangelink-vscode-extension/src/__integration-tests__/suite/terminalPicker.test.ts
Summary
Adds 9 assisted integration tests for the R-D Bind to Destination flow — the multi-step pattern where the human opens the picker, selects a destination, and the test asserts toast/status bar messages via log capture. Also removes 3 duplicate TCs (001-003) that were fully covered by existing terminal/file picker tests.
Changes
bindToDestination.test.tswith 9[assisted]tests covering bind success (terminal, file, AI assistant), smart-bind confirmation dialog (items, Yes/replace, No/keep), escape handling, and AI assistant re-bind/switch scenariosautomated: falsetoautomated: assistedwaitForHumanprompting to install a second AI extension; will be fully testable once Extend AI assistants via custom settings #500 (custom AI assistants) landsDestinationPicker.pick()returns (incommitBind), so no parent picker reopensTest Plan
pnpm test:release:grep "bind-to-destination")Documentation
Related
automated: falseTCs to assisted mode #504Summary by CodeRabbit