Skip to content

Commit 6ce9a21

Browse files
authored
Change the View wrapper testID (#2513)
* Change the View wrapper testID * pass containerProps with testID to ShimmerPlaceholder * ShimmerPlaceholder testID fix
1 parent 68565cf commit 6ce9a21

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/skeletonView/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ class SkeletonView extends Component<SkeletonViewProps, SkeletonState> {
324324
};
325325

326326
renderAdvanced = () => {
327-
const {children, renderContent, showContent, style, ...others} = this.props;
327+
const {children, renderContent, showContent, style, testID, ...others} = this.props;
328328
const data = showContent && _.isFunction(renderContent) ? renderContent(this.props) : children;
329329

330330
return (
331-
<View style={style} {...this.contentAccessibilityProps} {...others}>
332-
<ShimmerPlaceholder {...this.getDefaultSkeletonProps()} {...others}>
331+
<View style={style} {...this.contentAccessibilityProps} testID={testID} {...others}>
332+
<ShimmerPlaceholder {...this.getDefaultSkeletonProps()} testID={`${testID}.shimmer`} {...others}>
333333
{showContent && data}
334334
</ShimmerPlaceholder>
335335
</View>

0 commit comments

Comments
 (0)