-
Notifications
You must be signed in to change notification settings - Fork 462
Add annotation label unit tests #4930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive unit tests for the AnnotationLabels
component and includes a defensive code change to handle labels without names.
- Adds 8 test cases covering rendering, interactions, and edge cases
- Adds null-safety check for label names in width calculation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
annotation-labels.component.tsx | Adds conditional check to prevent calculating width when label.name is undefined/null |
annotation-labels.component.test.tsx | New test file with comprehensive coverage including empty labels, single/multiple labels, interactions, zoom scaling, and positioning |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
application/ui/src/features/annotator/annotations/annotation-labels.component.test.tsx
Show resolved
Hide resolved
Docker Image Sizes
|
📊 Test coverage report
|
Summary
How to test
Checklist