This repository has been archived by the owner on Aug 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simulating instance test been done with https://github.com/airbnb/enzyme/issues/944\#issuecomment-362103255.
- Loading branch information
Showing
5 changed files
with
134 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
204 changes: 106 additions & 98 deletions
204
src/components/shared/__tests__/__snapshots__/Button.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,146 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Button component test renders as expected 1`] = ` | ||
<TouchableOpacity | ||
activeOpacity={0.5} | ||
> | ||
<View | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": 52, | ||
"justifyContent": "center", | ||
"width": 320, | ||
} | ||
} | ||
<View> | ||
<TouchableOpacity | ||
activeOpacity={0.5} | ||
> | ||
<Text | ||
<View | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": "100%", | ||
"justifyContent": "center", | ||
"width": "100%", | ||
} | ||
} | ||
/> | ||
</View> | ||
</TouchableOpacity> | ||
> | ||
<Text | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
} | ||
} | ||
/> | ||
</View> | ||
</TouchableOpacity> | ||
</View> | ||
`; | ||
|
||
exports[`Button component test renders as expected 2`] = ` | ||
<TouchableOpacity | ||
activeOpacity={0.5} | ||
> | ||
<View | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": 52, | ||
"justifyContent": "center", | ||
"width": 320, | ||
} | ||
} | ||
<View> | ||
<TouchableOpacity | ||
activeOpacity={0.5} | ||
> | ||
<Text | ||
<View | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": "100%", | ||
"justifyContent": "center", | ||
"width": "100%", | ||
} | ||
} | ||
/> | ||
</View> | ||
</TouchableOpacity> | ||
> | ||
<Text | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
} | ||
} | ||
/> | ||
</View> | ||
</TouchableOpacity> | ||
</View> | ||
`; | ||
|
||
exports[`Button component test simulate onPress 1`] = ` | ||
<TouchableOpacity | ||
activeOpacity={0.5} | ||
onPress={[Function]} | ||
> | ||
<View | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": 52, | ||
"justifyContent": "center", | ||
"width": 320, | ||
} | ||
} | ||
<View> | ||
<TouchableOpacity | ||
activeOpacity={0.5} | ||
onPress={[Function]} | ||
> | ||
<Text | ||
<View | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": "100%", | ||
"justifyContent": "center", | ||
"width": "100%", | ||
} | ||
} | ||
/> | ||
</View> | ||
</TouchableOpacity> | ||
> | ||
<Text | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
} | ||
} | ||
/> | ||
</View> | ||
</TouchableOpacity> | ||
</View> | ||
`; | ||
|
||
exports[`Button renders without crashing 1`] = ` | ||
<View | ||
accessible={true} | ||
isTVSelectable={true} | ||
onResponderGrant={[Function]} | ||
onResponderMove={[Function]} | ||
onResponderRelease={[Function]} | ||
onResponderTerminate={[Function]} | ||
onResponderTerminationRequest={[Function]} | ||
onStartShouldSetResponder={[Function]} | ||
style={ | ||
Object { | ||
"opacity": 1, | ||
} | ||
} | ||
> | ||
<View> | ||
<View | ||
accessible={true} | ||
isTVSelectable={true} | ||
onResponderGrant={[Function]} | ||
onResponderMove={[Function]} | ||
onResponderRelease={[Function]} | ||
onResponderTerminate={[Function]} | ||
onResponderTerminationRequest={[Function]} | ||
onStartShouldSetResponder={[Function]} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": 52, | ||
"justifyContent": "center", | ||
"width": 320, | ||
"opacity": 1, | ||
} | ||
} | ||
> | ||
<Text | ||
<View | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "transparent", | ||
"borderColor": "white", | ||
"borderRadius": 4, | ||
"borderWidth": 2, | ||
"height": "100%", | ||
"justifyContent": "center", | ||
"width": "100%", | ||
} | ||
} | ||
/> | ||
> | ||
<Text | ||
style={ | ||
Object { | ||
"color": "white", | ||
"fontSize": 14, | ||
} | ||
} | ||
/> | ||
</View> | ||
</View> | ||
</View> | ||
`; |