Skip to content

test: unit tests for useAnnotations note CRUD + updateAnnotation#348

Merged
leotrs merged 1 commit intomainfrom
std-x6fe
Mar 27, 2026
Merged

test: unit tests for useAnnotations note CRUD + updateAnnotation#348
leotrs merged 1 commit intomainfrom
std-x6fe

Conversation

@leotrs
Copy link
Copy Markdown
Collaborator

@leotrs leotrs commented Mar 27, 2026

Summary

  • Added 16 unit tests for previously untested addNote, updateNote, deleteNote, and updateAnnotation methods in useAnnotations composable
  • Tests cover reactive state manipulation (nested messages arrays, Object.assign), edge cases (missing annotations/messages), and Y.js version bump verification
  • Addresses QA Expert findings 6-7: message CRUD manipulates nested reactive state with zero coverage

Test plan

  • All 24 useAnnotations tests pass locally (was 8, now 24)
  • No merge conflicts with main
  • CI validates full suite

🤖 Generated with Claude Code

…ation

These four composable methods manipulated nested reactive state (messages
arrays, Object.assign across annotations) with zero test coverage.
Added 16 tests covering:
- addNote: append to messages, create array when absent, missing annotation
- updateNote: in-place Object.assign, cross-annotation lookup, missing message
- deleteNote: filter from annotation, filter across all annotations, skip missing
- updateAnnotation: replace in local state, handle non-existent id
- Y.js version bump verification for all four methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for rsm-studio-frontend ready!

Name Link
🔨 Latest commit 98f5fbd
🔍 Latest deploy log https://app.netlify.com/projects/rsm-studio-frontend/deploys/69c641596ca51c0008b7281a
😎 Deploy Preview https://deploy-preview-348--rsm-studio-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for rsm-studio-site failed.

Name Link
🔨 Latest commit 98f5fbd
🔍 Latest deploy log https://app.netlify.com/projects/rsm-studio-site/deploys/69c6415937a5e8000877a4cf

@leotrs leotrs merged commit dbd6388 into main Mar 27, 2026
14 of 18 checks passed
@leotrs leotrs deleted the std-x6fe branch March 27, 2026 10:53
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