-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from CaronaBoard/your-ride-offer-fix
Your ride offer fix
- Loading branch information
Showing
38 changed files
with
479 additions
and
351 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { firebaseUserFixture } from '../fixtures/firebase' | ||
|
||
export const mockCreateUser = jest.fn(() => Promise.resolve(firebaseUserFixture)) | ||
export const mockSignInUser = jest.fn(() => Promise.resolve(firebaseUserFixture)) | ||
|
||
export const authMock = { | ||
signInWithEmailAndPassword: mockSignInUser, | ||
createUserWithEmailAndPassword: mockCreateUser, | ||
signOut: jest.fn(), | ||
fetchProvidersForEmail: jest.fn(), | ||
currentUser: { uid: '12345' }, | ||
setPersistence: jest.fn() | ||
} | ||
|
||
export const mockUpdate = jest.fn(() => Promise.resolve()) | ||
export const databaseMock = { | ||
ref: jest.fn(() => ({ | ||
update: mockUpdate, | ||
child: () => ({ | ||
once: () => Promise.resolve({ val: jest.fn() }) | ||
}) | ||
})) | ||
} |
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
218 changes: 101 additions & 117 deletions
218
__tests__/src/modules/rideOffer/components/__snapshots__/RideOffer.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,148 +1,132 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<RideOffer /> Should have a snapshot 1`] = ` | ||
<LoadingSpinnerView | ||
isLoading={false} | ||
<TouchableOpacity | ||
activeOpacity={0.2} | ||
focusedOpacity={0.7} | ||
onPress={[Function]} | ||
> | ||
<TouchableOpacity | ||
activeOpacity={0.2} | ||
focusedOpacity={0.7} | ||
onPress={[Function]} | ||
> | ||
<RkCard> | ||
<RkCard> | ||
<View | ||
rkCardContent={true} | ||
> | ||
<View | ||
rkCardContent={true} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
} | ||
} | ||
> | ||
<View | ||
<Icon | ||
allowFontScaling={false} | ||
name="radio-button-unchecked" | ||
size={12} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
<Icon | ||
allowFontScaling={false} | ||
name="radio-button-unchecked" | ||
size={12} | ||
style={ | ||
Object { | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
PUC | ||
</Text> | ||
</View> | ||
<View | ||
PUC | ||
</Text> | ||
</View> | ||
<View | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
} | ||
} | ||
> | ||
<Icon | ||
allowFontScaling={false} | ||
name="radio-button-unchecked" | ||
size={12} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
<Icon | ||
allowFontScaling={false} | ||
name="radio-button-unchecked" | ||
size={12} | ||
style={ | ||
Object { | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
Bomfim | ||
</Text> | ||
</View> | ||
Bomfim | ||
</Text> | ||
</View> | ||
</View> | ||
<View | ||
rkCardContent={true} | ||
> | ||
<View | ||
rkCardContent={true} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
} | ||
} | ||
> | ||
<View | ||
<Icon | ||
allowFontScaling={false} | ||
name="today" | ||
size={12} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
<Icon | ||
allowFontScaling={false} | ||
name="today" | ||
size={12} | ||
style={ | ||
Object { | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
Seg-Sex | ||
</Text> | ||
</View> | ||
<View | ||
Seg-Sex | ||
</Text> | ||
</View> | ||
<View | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
} | ||
} | ||
> | ||
<Icon | ||
allowFontScaling={false} | ||
name="schedule" | ||
size={12} | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"flexDirection": "row", | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
<Icon | ||
allowFontScaling={false} | ||
name="schedule" | ||
size={12} | ||
style={ | ||
Object { | ||
"fontSize": 15, | ||
"marginRight": 5, | ||
} | ||
} | ||
/> | ||
<Text | ||
accessible={true} | ||
allowFontScaling={true} | ||
ellipsizeMode="tail" | ||
rkCardText={true} | ||
> | ||
19h | ||
</Text> | ||
</View> | ||
19h | ||
</Text> | ||
</View> | ||
<Icon | ||
allowFontScaling={false} | ||
color="#900" | ||
name="delete-forever" | ||
size={30} | ||
style={ | ||
Object { | ||
"alignSelf": "flex-end", | ||
"margin": 10, | ||
} | ||
} | ||
/> | ||
</RkCard> | ||
</TouchableOpacity> | ||
</LoadingSpinnerView> | ||
</View> | ||
</RkCard> | ||
</TouchableOpacity> | ||
`; |
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
28 changes: 13 additions & 15 deletions
28
__tests__/src/modules/rideRequest/containers/__snapshots__/RideList.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,20 +1,18 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<RideList /> Should have a snapshot 1`] = ` | ||
<ListViewMock | ||
dataSource={ | ||
ListViewDataSource { | ||
"items": 1, | ||
<LoadingSpinnerView | ||
isLoading={false} | ||
> | ||
<ListViewMock | ||
dataSource={ | ||
ListViewDataSource { | ||
"items": 1, | ||
} | ||
} | ||
} | ||
enableEmptySections={true} | ||
renderRow={[Function]} | ||
renderScrollComponent={[Function]} | ||
style={ | ||
Object { | ||
"flex": 1, | ||
"paddingTop": 20, | ||
} | ||
} | ||
/> | ||
enableEmptySections={true} | ||
renderRow={[Function]} | ||
renderScrollComponent={[Function]} | ||
/> | ||
</LoadingSpinnerView> | ||
`; |
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
Oops, something went wrong.