Skip to content

Commit f117a34

Browse files
committed
Adding testID to Avatar's label
1 parent 77e9de3 commit f117a34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/avatar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class Avatar extends PureComponent<AvatarPropTypes> {
224224

225225
getBadgeSize = () => {
226226
const badgeSize = _.get(this.props, 'badgeProps.size', DEFAULT_BADGE_SIZE);
227-
227+
228228
if (_.isString(badgeSize)) {
229229
return BADGE_SIZES[badgeSize] || BADGE_SIZES[DEFAULT_BADGE_SIZE];
230230
}
@@ -344,7 +344,7 @@ class Avatar extends PureComponent<AvatarPropTypes> {
344344
<View
345345
style={[this.getInitialsContainer(), {backgroundColor}, hasImage && this.styles.initialsContainerWithInset]}
346346
>
347-
{!_.isUndefined(label) && <Text numberOfLines={1} style={[{fontSize}, this.styles.initials, {color}]}>
347+
{!_.isUndefined(label) && <Text numberOfLines={1} style={[{fontSize}, this.styles.initials, {color}]} testID={`${testID}.label`}>
348348
{label}
349349
</Text>}
350350
</View>

0 commit comments

Comments
 (0)