Unit testing (#32)
* add testing lib * remove coverage folder from git * finished basic test setup * fix tests typescript and import paths * add first snapshot * testing utils * rename test files; update script flags; ++tests * testing utils functions * testing downloadAndResize wip * remove download test * specify unwanted coverage paths; remove update snapshots flag * fix strings tests * testing downloadAndResize method * increasing testing * fixing snapshots wip * fixed shell mobile snapshot * adding snapshots for the screens * fix onboard snapshot * fix typescript issues * fix TabsSelector snapshot * Account for testing device's locale in ago() tests * Remove platform detection on regex Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
parent
4913a07e33
commit
7517b65dcd
60 changed files with 10409 additions and 34 deletions
205
__tests__/view/screens/__snapshots__/Contacts.test.tsx.snap
Normal file
205
__tests__/view/screens/__snapshots__/Contacts.test.tsx.snap
Normal file
|
@ -0,0 +1,205 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Contacts renders correctly 1`] = `
|
||||
<View>
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"backgroundColor": "#ffffff",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
Array [
|
||||
Object {
|
||||
"color": "#000000",
|
||||
},
|
||||
Object {
|
||||
"fontSize": 30,
|
||||
"fontWeight": "bold",
|
||||
"paddingHorizontal": 12,
|
||||
"paddingVertical": 6,
|
||||
},
|
||||
]
|
||||
}
|
||||
>
|
||||
Contacts
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"backgroundColor": "#ffffff",
|
||||
}
|
||||
}
|
||||
>
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"backgroundColor": "#f8f3f3",
|
||||
"borderRadius": 4,
|
||||
"flexDirection": "row",
|
||||
"marginBottom": 6,
|
||||
"marginHorizontal": 10,
|
||||
"paddingHorizontal": 8,
|
||||
"paddingVertical": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<
|
||||
icon="magnifying-glass"
|
||||
size={16}
|
||||
style={
|
||||
Object {
|
||||
"color": "#645454",
|
||||
"marginRight": 8,
|
||||
}
|
||||
}
|
||||
/>
|
||||
<TextInput
|
||||
onChangeText={[Function]}
|
||||
placeholder="Search"
|
||||
placeholderTextColor="#968d8d"
|
||||
style={
|
||||
Object {
|
||||
"color": "#000000",
|
||||
"flex": 1,
|
||||
}
|
||||
}
|
||||
value=""
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<View
|
||||
onLayout={[Function]}
|
||||
style={
|
||||
Array [
|
||||
Object {
|
||||
"backgroundColor": "#ffffff",
|
||||
"flexDirection": "row",
|
||||
"paddingBottom": 12,
|
||||
"paddingHorizontal": 14,
|
||||
"paddingTop": 8,
|
||||
},
|
||||
]
|
||||
}
|
||||
>
|
||||
<View
|
||||
collapsable={false}
|
||||
style={
|
||||
Object {
|
||||
"backgroundColor": "#000000",
|
||||
"bottom": 0,
|
||||
"height": 4,
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"width": 0,
|
||||
}
|
||||
}
|
||||
/>
|
||||
<View
|
||||
accessible={true}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"marginRight": 14,
|
||||
"paddingHorizontal": 10,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
Array [
|
||||
Object {
|
||||
"color": "#000000",
|
||||
},
|
||||
Object {
|
||||
"color": "#000000",
|
||||
"fontSize": 16,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
]
|
||||
}
|
||||
>
|
||||
All
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
accessible={true}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"marginRight": 14,
|
||||
"paddingHorizontal": 10,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
Array [
|
||||
Object {
|
||||
"color": "#000000",
|
||||
},
|
||||
Object {
|
||||
"color": "#645454",
|
||||
"fontSize": 16,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
]
|
||||
}
|
||||
>
|
||||
Following
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
accessible={true}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"marginRight": 14,
|
||||
"paddingHorizontal": 10,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
Array [
|
||||
Object {
|
||||
"color": "#000000",
|
||||
},
|
||||
Object {
|
||||
"color": "#645454",
|
||||
"fontSize": 16,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
]
|
||||
}
|
||||
>
|
||||
Scenes
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue