Skip to content

[side-quest/integration-test-utilities-and-cleanup] Integration test utilities and copy-pasta cleanup#618

Open
couimet wants to merge 1 commit into
mainfrom
improve/integration-test-utilities-and-cleanup
Open

[side-quest/integration-test-utilities-and-cleanup] Integration test utilities and copy-pasta cleanup#618
couimet wants to merge 1 commit into
mainfrom
improve/integration-test-utilities-and-cleanup

Conversation

@couimet
Copy link
Copy Markdown
Owner

@couimet couimet commented Jun 3, 2026

Summary

Adds reusable assertion helpers (withClipboardSentinel, withClipboardChanged, withClipboardRestored, assertClipboardEqualsGeneratedLink, assertTerminalBufferEqualsGeneratedLink, assertTerminalBufferContainsGeneratedLink, assertClipboardPreservedAndTerminalLink, assertLogContains) and converts all call sites across test suite files to use them.

Changes

  • New assertion helpers in clipboardHelpers.ts, capturingPtyHelpers.ts, logBasedUiAssertions.ts, and logHelpers.ts eliminate repeated clipboard/terminal/log assertion boilerplate
  • Converted integration test suites to use the new helpers, reducing copy-pasta and making test intent more readable
  • Fixed broken tests and smart padding issues uncovered during the conversion campaign
  • Updated CLAUDE.md with shell-quoting gotcha and :with-extensions --grep documentation
  • Removed expectContextKeys calls from test suites — those belong to the ContextKeyService extraction (PR Unify jest.config.js files to explicitly call-out some configs #3) and would fail without that infrastructure

Test Plan

  • All 1982 unit tests pass
  • Integration tests pass: pnpm test:release:automated
  • Integration tests pass with extensions: pnpm test:release:with-extensions

…utilities and copy-pasta cleanup

Adds reusable assertion helpers (`withClipboardSentinel`, `withClipboardChanged`, `withClipboardRestored`, `assertClipboardEqualsGeneratedLink`, `assertTerminalBufferEqualsGeneratedLink`, `assertTerminalBufferContainsGeneratedLink`, `assertClipboardPreservedAndTerminalLink`, `assertLogContains`) and converts all call sites across test suite files to use them.

## Changes

- New assertion helpers in `clipboardHelpers.ts`, `capturingPtyHelpers.ts`, `logBasedUiAssertions.ts`, and `logHelpers.ts` eliminate repeated clipboard/terminal/log assertion boilerplate
- Converted integration test suites to use the new helpers, reducing copy-pasta and making test intent more readable
- Fixed broken tests and smart padding issues uncovered during the conversion campaign
- Updated CLAUDE.md with shell-quoting gotcha and `:with-extensions --grep` documentation
- Removed `expectContextKeys` calls from test suites — those belong to the ContextKeyService extraction (PR #3) and would fail without that infrastructure

## Test Plan

- [ ] All 1982 unit tests pass
- [ ] Integration tests pass: `pnpm test:release:automated`
- [ ] Integration tests pass with extensions: `pnpm test:release:with-extensions`
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

@couimet, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 50 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9dca5b1f-3bbc-452e-81b1-ea510423d61c

📥 Commits

Reviewing files that changed from the base of the PR and between f81c098 and 20dbcc3.

📒 Files selected for processing (21)
  • CLAUDE.md
  • packages/rangelink-vscode-extension/qa/qa-test-cases-unreleased.yaml
  • packages/rangelink-vscode-extension/src/__integration-tests__/helpers/capturingPtyHelpers.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/helpers/clipboardHelpers.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/helpers/logBasedUiAssertions.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/helpers/logHelpers.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/bindToDestination.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/builtInAiAssistants.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/clipboardPreservation.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/contextMenuEditorContent.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/contextMenuEditorTab.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/contextMenuExplorer.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/contextMenuTerminal.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/coreSendCommands.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/dirtyBufferWarning.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/linkGeneration.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/sendFilePath.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/smartPadding.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/textEditorDestination.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/unbind.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve/integration-test-utilities-and-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

QA Coverage OK

The PR modifies a test case in the QA YAML to automate a previously manual verification of clipboard content and toast appearance, which is a user-visible change.


Generated by QA Gap Check (GPT-4o-mini via GitHub Models)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

✅ CI / Integration Tests (with overrides) — run summary

Duration: 1m 3s

QA TC IDs: 2 exercised across 1 features

Report: View run & artifacts

Reproduce locally: ./scripts/run-integration-tests.sh --label needs-override --exclude-label cursor --exclude-assisted

Feature breakdown
Feature TCs IDs
custom-ai-assistants 2 custom-ai-assistant-018, custom-ai-assistant-019

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

❌ CI / Integration Tests (automated) — run summary

Duration: 10m 53s

QA TC IDs: 156 exercised across 0 features

Report: View run & artifacts

Reproduce locally: ./scripts/run-integration-tests.sh --exclude-label requires-extensions --exclude-label cursor --automated

Feature breakdown
Feature TCs IDs

To re-run failed tests:

./scripts/run-integration-tests.sh --exclude-label "requires-extensions" --exclude-label "cursor" --automated --grep "clipboard-preservation-017|text-editor-destination-001"

++RESULTS_JSON_START++
{
"passing": 155,
"failing": 2,
"total": 157,
"failed_ids": [
  "clipboard-preservation-017",
  "text-editor-destination-001"
],
"report_complete_at": "2026-06-03T17:17:33Z"
}
++RESULTS_JSON_END++
/home/runner/work/rangeLink/rangeLink/packages/rangelink-vscode-extension:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  rangelink-vscode-extension@1.0.0 test:release:automated: `./scripts/run-integration-tests.sh --automated --exclude-label requires-extensions --exclude-label cursor`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

❌ CI / Integration Tests (with extensions) — run summary

Duration: 11m 10s

Unit tests: Ran in separate Test & Validate job

\342\232\240\357\270\217 Integration test report missing: Runner may have crashed

QA TC IDs: 188 exercised across 25 features

Report: View run & artifacts

Reproduce locally: ./scripts/run-integration-tests.sh --exclude-label cursor --exclude-label needs-override --exclude-assisted

Feature breakdown
Feature TCs IDs
bind-to-destination 9 bind-to-destination-004, bind-to-destination-005, bind-to-destination-006, bind-to-destination-007, bind-to-destination-010, bind-to-destination-011, bind-to-destination-013, bind-to-destination-014, bind-to-destination-015
built-in-ai-assistants 7 claude-code-001, claude-code-006, claude-code-007, gemini-code-assist-001, gemini-code-assist-005, gemini-code-assist-006, github-copilot-chat-001
clickable-file-paths 12 clickable-file-paths-001, clickable-file-paths-002, clickable-file-paths-003, clickable-file-paths-004, clickable-file-paths-005, clickable-file-paths-006, clickable-file-paths-007, clickable-file-paths-008, clickable-file-paths-009, clickable-file-paths-010, clickable-file-paths-011, clickable-file-paths-012
clipboard-preservation 19 clipboard-preservation-001, clipboard-preservation-002, clipboard-preservation-003, clipboard-preservation-004, clipboard-preservation-005, clipboard-preservation-006, clipboard-preservation-007, clipboard-preservation-008, clipboard-preservation-009, clipboard-preservation-010, clipboard-preservation-011, clipboard-preservation-012, clipboard-preservation-015, clipboard-preservation-016, clipboard-preservation-017, clipboard-preservation-019, clipboard-preservation-020, clipboard-preservation-021, clipboard-preservation-022
context-menus 3 context-menus-editor-content-012, context-menus-editor-content-013, context-menus-editor-content-014
core-send-commands 9 core-send-commands-r-c-001, core-send-commands-r-c-002, core-send-commands-r-l-001, core-send-commands-r-l-002, core-send-commands-r-l-003, core-send-commands-r-l-004, core-send-commands-r-l-005, core-send-commands-r-p-001, core-send-commands-r-v-001
custom-ai-assistants 17 custom-ai-assistant-001, custom-ai-assistant-002, custom-ai-assistant-003, custom-ai-assistant-004, custom-ai-assistant-005, custom-ai-assistant-006, custom-ai-assistant-007, custom-ai-assistant-008, custom-ai-assistant-009, custom-ai-assistant-010, custom-ai-assistant-011, custom-ai-assistant-012, custom-ai-assistant-013, custom-ai-assistant-014, custom-ai-assistant-015, custom-ai-assistant-016, custom-ai-assistant-017
dirty-buffer-warning 4 dirty-buffer-warning-004, dirty-buffer-warning-006, dirty-buffer-warning-007, dirty-buffer-warning-019
editor-binding-validation 1 editor-binding-validation-004
file-picker 8 file-picker-001, file-picker-002, file-picker-003, file-picker-004, file-picker-005, file-picker-009, file-picker-011, file-picker-012
filename-only-navigation-fallback 4 filename-fallback-navigation-001, filename-fallback-navigation-002, filename-fallback-navigation-003, filename-fallback-navigation-004
go-to-link 5 go-to-link-001, go-to-link-005, go-to-link-006, go-to-link-008, go-to-link-009
link-generation 2 full-line-link-generation-001, full-line-selection-validation-001
link-navigation 10 char-navigation-001, char-navigation-002, full-line-navigation-001, full-line-navigation-002, markdown-link-navigation-001, url-exclusion-001, wrapped-link-navigation-001, wrapped-link-navigation-002, wrapped-link-navigation-003, wrapped-link-navigation-004
navigation-clamping-feedback 4 navigation-clamping-001, navigation-clamping-002, navigation-clamping-003, navigation-clamping-004
navigation-toast-settings 3 navigation-toast-settings-001, navigation-toast-settings-002, navigation-toast-settings-003
release-notifier 2 release-notifier-001, release-notifier-002
send-file-path 14 send-file-path-001, send-file-path-002, send-file-path-003, send-file-path-004, send-file-path-005, send-file-path-006, send-file-path-007, send-file-path-008, send-file-path-009, send-file-path-010, send-file-path-011, send-file-path-012, send-file-path-013, send-file-path-014, send-file-path-015
send-terminal-selection 3 send-terminal-selection-002, send-terminal-selection-003, send-terminal-selection-006, send-terminal-selection-007
smart-padding 8 smart-padding-001, smart-padding-003, smart-padding-005, smart-padding-006, smart-padding-007, smart-padding-008, smart-padding-009, smart-padding-011
status-bar-menu 7 status-bar-appearance-001, status-bar-appearance-002, status-bar-menu-002, status-bar-menu-003, status-bar-menu-004, status-bar-menu-005, status-bar-menu-006, status-bar-menu-007
terminal-picker 13 terminal-picker-001, terminal-picker-002, terminal-picker-003, terminal-picker-004, terminal-picker-005, terminal-picker-007, terminal-picker-008, terminal-picker-011, terminal-picker-012, terminal-picker-013, terminal-picker-014, terminal-picker-015, terminal-picker-016
text-editor-destination 11 duplicate-tab-group-001, duplicate-tab-group-002, duplicate-tab-group-003, duplicate-tab-group-004, hidden-tab-paste-001, hidden-tab-paste-002, langswitch-binding-001, langswitch-binding-002, stale-viewcolumn-001, text-editor-destination-001, text-editor-destination-002
unbind 3 unbind-001, unbind-002, unbind-003, unbind-004
untitled-file-navigation 6 untitled-navigation-001, untitled-navigation-002, untitled-navigation-003, untitled-navigation-004, untitled-navigation-005, untitled-navigation-006

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.

1 participant