[Refactor] Reuse shared webview render helpers in chat tests - #1196
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
edelauna
approved these changes
Aug 8, 2026
edelauna
marked this pull request as ready for review
August 8, 2026 17:35
edelauna
requested review from
JamesRobert20,
hannesrudolph,
navedmerchant and
taltas
as code owners
August 8, 2026 17:35
edelauna
enabled auto-merge
August 8, 2026 17:35
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
N/A: Phase 3 webview test-utils refactor batch.
Description
Reuses the shared
renderWithExtensionStatehelper 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.tsxfromwebview-ui(4 files, 16 tests passed)pnpm test(444 files passed, 4 skipped; 7,351 tests passed, 39 skipped)pnpm lintpnpm check-typesPre-Submission Checklist
Visual Snapshots
Not applicable; no product UI changed.
Videos (interaction / animation only)
Not applicable; no product interaction changed.
Documentation Updates
Additional Notes
No changesets were added. Author self-review found no behavior or scope regressions.
Get in Touch
Mention
@roomoteon this PR for follow-up requests.