dify icon indicating copy to clipboard operation
dify copied to clipboard

Add unit tests for Avatar component

Open SherlockShemol opened this issue 2 weeks ago • 0 comments

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)

SherlockShemol avatar Dec 26 '25 07:12 SherlockShemol