Skip to content

Commit

Permalink
chore: separate integration tests in example app (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerttu authored Dec 17, 2024
1 parent f611a43 commit b24ae1a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@ Build the tests using detox-cli in the example folder:

iOS:
```bash
detox build --configuration ios.sim.release
yarn run example detox:build:ios-release
```

Android:
```bash
detox build --configuration android.emu.release
yarn run example detox:build:android-release
```

Google Maps React Native Navigation SDK integration tests can be run with the following command:

iOS
```bash
yarn run example test:ios-release
yarn run example detox:test:ios-release
```

Android:
Expand Down
7 changes: 6 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ const HomeScreen = () => {
const isFocused = useIsFocused();

return (
<View style={[styles.container]}>
<View style={styles.container}>
{/* Spacer */}
<View style={styles.container} />
<View style={styles.buttonContainer}>
<Button
title="Navigation"
Expand All @@ -60,8 +62,11 @@ const HomeScreen = () => {
onPress={() => isFocused && navigate('Multiple maps')}
/>
</View>
{/* Spacer */}
<View style={styles.container} />
<View style={styles.buttonContainer}>
<Button
color="grey"
title="Integration Tests"
testID="integration_tests_button"
onPress={() => isFocused && navigate('Integration tests')}
Expand Down
5 changes: 3 additions & 2 deletions example/src/screens/IntegrationTestsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ const IntegrationTestsScreen = () => {
}, [testStatus, detoxStepNumber]);

return (
<View style={[styles.container]}>
<View style={{ flex: 3, margin: 5 }}>
<View style={styles.container}>
<Text>See CONTRIBUTING.md to see how to run integration tests.</Text>
<View style={{ flex: 6, margin: 5 }}>
<NavigationView
mapViewCallbacks={mapViewCallbacks}
onMapViewControllerCreated={setMapViewController}
Expand Down
2 changes: 1 addition & 1 deletion example/src/screens/MultipleMapsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ const MultipleMapsScreen = () => {
};

return arePermissionsApproved ? (
<View style={[styles.container]}>
<View style={styles.container}>
<NavigationView
androidStylingOptions={{
primaryDayModeThemeColor: '#34eba8',
Expand Down
2 changes: 1 addition & 1 deletion example/src/screens/NavigationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ const NavigationScreen = () => {
};

return arePermissionsApproved ? (
<View style={[styles.container]}>
<View style={styles.container}>
<NavigationView
style={[
{
Expand Down

0 comments on commit b24ae1a

Please sign in to comment.