diff --git a/tdrive/frontend/src/app/atoms/avatar/index.tsx b/tdrive/frontend/src/app/atoms/avatar/index.tsx index 961370e9..a6b554fc 100644 --- a/tdrive/frontend/src/app/atoms/avatar/index.tsx +++ b/tdrive/frontend/src/app/atoms/avatar/index.tsx @@ -40,7 +40,8 @@ export default function Avatar(props: AvatarProps) { const fontSize = fontSizes[props.size || 'md']; const addedClassName = props.className || ''; const avatarTitle = props.title || ''; - const restProps = _.omit(props, 'size', 'type', 'avatar', 'title', 'className', 'icon'); + const testClassId = props.testClassId; + const restProps = _.omit(props, 'size', 'type', 'avatar', 'title', 'className', 'icon', 'testClassId'); let className = `w-${avatarSize} h-${avatarSize} ${ avatarType === 'circle' ? 'rounded-full' : 'rounded-sm' @@ -65,17 +66,19 @@ export default function Avatar(props: AvatarProps) { ? {} : { backgroundImage: `url('${getGradient(props.title || '')}')` }; + const testId = testClassId ? `testid:${testClassId}` : '' + if (props.icon) { className += ' '; return (