File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,13 @@ import {
1010} from 'react-native' ;
1111
1212export const StyledButton = ( {
13+ testID,
1314 onPress,
1415 title,
1516 style,
1617 isLoading,
1718} : {
19+ testID ?: string ;
1820 style ?: {
1921 default ?: ViewStyle ;
2022 pressed ?: ViewStyle ;
@@ -56,6 +58,7 @@ export const StyledButton = ({
5658 const InnerContent = isLoading ? InnerLoader : InnerText ;
5759 return (
5860 < Pressable
61+ testID = { testID }
5962 onPress = { onPress }
6063 style = { pressableStyle }
6164 onPressIn = { ( ) => setIsPressed ( true ) }
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export const StyledProductCard = (props: {
4747 </ View >
4848 < View style = { styles . cardDetailAction } >
4949 < StyledButton
50+ testID = { `add-to-cart-button-${ props . id } ` }
5051 title = "Add to cart"
5152 onPress = { onAddToCartPressed }
5253 style = { {
You can’t perform that action at this time.
0 commit comments