Skip to content

feat(chat): add branch-coverage tests for chat-view.tsx - #575

Merged
d-oit merged 1 commit into
mainfrom
feat/chat-view-branch-coverage
Jul 31, 2026
Merged

feat(chat): add branch-coverage tests for chat-view.tsx#575
d-oit merged 1 commit into
mainfrom
feat/chat-view-branch-coverage

Conversation

@d-oit

@d-oit d-oit commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Branch Coverage: chat-view.tsx (56.94% -> ~75% branches)

What

16 targeted tests covering key branches in the chat-view.tsx component.

Coverage Areas

Area Tests
Send guards empty input, whitespace-only, chatLoading
Keyboard Enter sends, Shift+Enter does not
Clear guard early return when chat empty
Citations section render, singular/plural count, expand/collapse toggle, entity open via selectEntity + setView
Char counter clay color at 2000 chars
Suggestions bar visible with 1 message, chip calls sendMessage

Notes

  • Uses vi.hoisted() for the store mock (avoids Vitest TDZ on hoisted vi.mock references)
  • Citation collapse test clicks once per act with waitFor between clicks to avoid stale closures

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
do-knowledge-studio Ready Ready Preview, v0 Jul 31, 2026 9:21am

@github-actions github-actions Bot added config tests Related to automated/manual tests labels Jul 31, 2026
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@d-oit
d-oit merged commit be18f02 into main Jul 31, 2026
23 checks passed
@d-oit
d-oit deleted the feat/chat-view-branch-coverage branch July 31, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config tests Related to automated/manual tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant