Skip to content

[Refactor] Reuse shared webview render helpers in chat tests - #1196

Merged
edelauna merged 1 commit into
mainfrom
feature/webview-chat-test-utils-2w3qy41ptgzxv
Aug 8, 2026
Merged

[Refactor] Reuse shared webview render helpers in chat tests#1196
edelauna merged 1 commit into
mainfrom
feature/webview-chat-test-utils-2w3qy41ptgzxv

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Created by Roomote. View the task or mention @roomote for follow-up asks.

Related GitHub Issue

N/A: Phase 3 webview test-utils refactor batch.

Description

Reuses the shared renderWithExtensionState helper across four focused ChatRow specs instead of assembling extension-state and React Query providers in each file. Scenario-specific component mocks, message fixtures, callbacks, and assertions remain local and unchanged.

This is a test-only refactor with no intended runtime or user-facing behavior change.

Test Procedure

  • pnpm exec vitest run src/components/chat/__tests__/ChatRow.run-slash-command.spec.tsx src/components/chat/__tests__/ChatRow.rate-limit-wait.spec.tsx src/components/chat/__tests__/ChatRow.diff-actions.spec.tsx src/components/chat/__tests__/ChatRow.command-denied.spec.tsx from webview-ui (4 files, 16 tests passed)
  • pnpm test (444 files passed, 4 skipped; 7,351 tests passed, 39 skipped)
  • pnpm lint
  • pnpm check-types

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Visual Snapshot (UI changes only): Not applicable; this is a test-only refactor with no rendered UI change.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Visual Snapshots

Not applicable; no product UI changed.

Videos (interaction / animation only)

Not applicable; no product interaction changed.

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates are required.

Additional Notes

No changesets were added. Author self-review found no behavior or scope regressions.

Get in Touch

Mention @roomote on this PR for follow-up requests.

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna
edelauna marked this pull request as ready for review August 8, 2026 17:35
@edelauna
edelauna enabled auto-merge August 8, 2026 17:35
@edelauna
edelauna added this pull request to the merge queue Aug 8, 2026
Merged via the queue into main with commit 84e54cf Aug 8, 2026
25 checks passed
@edelauna
edelauna deleted the feature/webview-chat-test-utils-2w3qy41ptgzxv branch August 8, 2026 17:46
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.

2 participants