dify
dify copied to clipboard
Add unit tests for Avatar component
The Avatar component in web/app/components/base/avatar doesn't have any test coverage yet.
Since it's a widely used base component, having tests would help us refactor with more confidence.
Planning to cover:
- Basic rendering (image vs fallback initial)
- Props handling (size, className, textClassName)
- Image error fallback behavior
- Edge cases (empty name, CJK characters, unusual sizes)