Fakultas Ilmu Komputer UI

Commit d6482b44 authored by Zafir Rasyidi Taufik's avatar Zafir Rasyidi Taufik
Browse files

[CHORES] Fix error in jest when running test with RNGoogleSignin

parent b1fa5502
import { NativeModules } from 'react-native'
NativeModules.RNGoogleSignin = {
SIGN_IN_CANCELLED: '0',
IN_PROGRESS: '1',
PLAY_SERVICES_NOT_AVAILABLE: '2',
SIGN_IN_REQUIRED: '3',
BUTTON_SIZE_ICON: 0,
BUTTON_SIZE_STANDARD: 0,
BUTTON_SIZE_WIDE: 0,
BUTTON_COLOR_AUTO: 0,
BUTTON_COLOR_LIGHT: 0,
BUTTON_COLOR_DARK: 0,
configure: jest.fn(),
}
export { NativeModules }
\ No newline at end of file
......@@ -67,7 +67,8 @@
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.ts"
},
"setupFiles": [
"./node_modules/react-native-gesture-handler/jestSetup.js"
"./node_modules/react-native-gesture-handler/jestSetup.js",
"./__mocks__/react-native-modules.ts"
],
"transformIgnorePatterns": [
"node_modules/(?!react-native|react-navigation)/"
......
......@@ -163,7 +163,7 @@ exports[`DatePicker tests renders correctly 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......
......@@ -991,6 +991,74 @@ exports[`insert invalid username and password 1`] = `
</Text>
</View>
</View>
<View
paddingBottom={12}
paddingLeft={0}
paddingRight={0}
paddingTop={12}
style={
Array [
Object {
"flexBasis": "auto",
"flexGrow": 0,
"flexShrink": 0,
"paddingBottom": 12,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 12,
},
]
}
/>
<View
mainAxis="center"
style={
Array [
Object {
"alignItems": "flex-start",
"backgroundColor": "transparent",
"borderBottomColor": "black",
"borderBottomWidth": 0,
"borderLeftColor": "black",
"borderLeftWidth": 0,
"borderRadius": 0,
"borderRightColor": "black",
"borderRightWidth": 0,
"borderTopColor": "black",
"borderTopWidth": 0,
"flexDirection": "row",
"flexGrow": 0,
"flexShrink": 0,
"flexWrap": "nowrap",
"height": "auto",
"justifyContent": "center",
"paddingBottom": 0,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 0,
"width": "auto",
},
]
}
>
<RNGoogleSigninButton
color={0}
onPress={[Function]}
size={0}
style={
Array [
Object {
"height": 48,
"width": 48,
},
Object {
"height": 48,
"width": 192,
},
]
}
/>
</View>
</View>
</View>
</View>
......@@ -2015,6 +2083,74 @@ exports[`insert username and password correctly 1`] = `
</Text>
</View>
</View>
<View
paddingBottom={12}
paddingLeft={0}
paddingRight={0}
paddingTop={12}
style={
Array [
Object {
"flexBasis": "auto",
"flexGrow": 0,
"flexShrink": 0,
"paddingBottom": 12,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 12,
},
]
}
/>
<View
mainAxis="center"
style={
Array [
Object {
"alignItems": "flex-start",
"backgroundColor": "transparent",
"borderBottomColor": "black",
"borderBottomWidth": 0,
"borderLeftColor": "black",
"borderLeftWidth": 0,
"borderRadius": 0,
"borderRightColor": "black",
"borderRightWidth": 0,
"borderTopColor": "black",
"borderTopWidth": 0,
"flexDirection": "row",
"flexGrow": 0,
"flexShrink": 0,
"flexWrap": "nowrap",
"height": "auto",
"justifyContent": "center",
"paddingBottom": 0,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 0,
"width": "auto",
},
]
}
>
<RNGoogleSigninButton
color={0}
onPress={[Function]}
size={0}
style={
Array [
Object {
"height": 48,
"width": 48,
},
Object {
"height": 48,
"width": 192,
},
]
}
/>
</View>
</View>
</View>
</View>
......@@ -3039,6 +3175,74 @@ exports[`inserts invalid (length<8) password 1`] = `
</Text>
</View>
</View>
<View
paddingBottom={12}
paddingLeft={0}
paddingRight={0}
paddingTop={12}
style={
Array [
Object {
"flexBasis": "auto",
"flexGrow": 0,
"flexShrink": 0,
"paddingBottom": 12,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 12,
},
]
}
/>
<View
mainAxis="center"
style={
Array [
Object {
"alignItems": "flex-start",
"backgroundColor": "transparent",
"borderBottomColor": "black",
"borderBottomWidth": 0,
"borderLeftColor": "black",
"borderLeftWidth": 0,
"borderRadius": 0,
"borderRightColor": "black",
"borderRightWidth": 0,
"borderTopColor": "black",
"borderTopWidth": 0,
"flexDirection": "row",
"flexGrow": 0,
"flexShrink": 0,
"flexWrap": "nowrap",
"height": "auto",
"justifyContent": "center",
"paddingBottom": 0,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 0,
"width": "auto",
},
]
}
>
<RNGoogleSigninButton
color={0}
onPress={[Function]}
size={0}
style={
Array [
Object {
"height": 48,
"width": 48,
},
Object {
"height": 48,
"width": 192,
},
]
}
/>
</View>
</View>
</View>
</View>
......@@ -4063,6 +4267,74 @@ exports[`press signup button 1`] = `
</Text>
</View>
</View>
<View
paddingBottom={12}
paddingLeft={0}
paddingRight={0}
paddingTop={12}
style={
Array [
Object {
"flexBasis": "auto",
"flexGrow": 0,
"flexShrink": 0,
"paddingBottom": 12,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 12,
},
]
}
/>
<View
mainAxis="center"
style={
Array [
Object {
"alignItems": "flex-start",
"backgroundColor": "transparent",
"borderBottomColor": "black",
"borderBottomWidth": 0,
"borderLeftColor": "black",
"borderLeftWidth": 0,
"borderRadius": 0,
"borderRightColor": "black",
"borderRightWidth": 0,
"borderTopColor": "black",
"borderTopWidth": 0,
"flexDirection": "row",
"flexGrow": 0,
"flexShrink": 0,
"flexWrap": "nowrap",
"height": "auto",
"justifyContent": "center",
"paddingBottom": 0,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 0,
"width": "auto",
},
]
}
>
<RNGoogleSigninButton
color={0}
onPress={[Function]}
size={0}
style={
Array [
Object {
"height": 48,
"width": 48,
},
Object {
"height": 48,
"width": 192,
},
]
}
/>
</View>
</View>
</View>
</View>
......@@ -5087,6 +5359,74 @@ exports[`renders correctly 1`] = `
</Text>
</View>
</View>
<View
paddingBottom={12}
paddingLeft={0}
paddingRight={0}
paddingTop={12}
style={
Array [
Object {
"flexBasis": "auto",
"flexGrow": 0,
"flexShrink": 0,
"paddingBottom": 12,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 12,
},
]
}
/>
<View
mainAxis="center"
style={
Array [
Object {
"alignItems": "flex-start",
"backgroundColor": "transparent",
"borderBottomColor": "black",
"borderBottomWidth": 0,
"borderLeftColor": "black",
"borderLeftWidth": 0,
"borderRadius": 0,
"borderRightColor": "black",
"borderRightWidth": 0,
"borderTopColor": "black",
"borderTopWidth": 0,
"flexDirection": "row",
"flexGrow": 0,
"flexShrink": 0,
"flexWrap": "nowrap",
"height": "auto",
"justifyContent": "center",
"paddingBottom": 0,
"paddingLeft": 0,
"paddingRight": 0,
"paddingTop": 0,
"width": "auto",
},
]
}
>
<RNGoogleSigninButton
color={0}
onPress={[Function]}
size={0}
style={
Array [
Object {
"height": 48,
"width": 48,
},
Object {
"height": 48,
"width": 192,
},
]
}
/>
</View>
</View>
</View>
</View>
......
......@@ -909,7 +909,7 @@ exports[`can press previous button 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -2365,7 +2365,7 @@ exports[`renders correctly 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -3821,7 +3821,7 @@ exports[`renders form with correct fields 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -5277,7 +5277,7 @@ exports[`submit data succesfully 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......
......@@ -663,7 +663,7 @@ exports[`can press previous button 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -881,7 +881,7 @@ exports[`can press previous button 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -2070,7 +2070,7 @@ exports[`renders correctly 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -2288,7 +2288,7 @@ exports[`renders correctly 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -3477,7 +3477,7 @@ exports[`renders form with correct fields 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -3695,7 +3695,7 @@ exports[`renders form with correct fields 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -4884,7 +4884,7 @@ exports[`submit data succesfully 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......@@ -5102,7 +5102,7 @@ exports[`submit data succesfully 1`] = `
]
}
>
10/5/2021
27/5/2021
</Text>
</View>
<View
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment