Skip to content

Commit b24ae1a

Browse files
authored
chore: separate integration tests in example app (#380)
1 parent f611a43 commit b24ae1a

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@ Build the tests using detox-cli in the example folder:
124124

125125
iOS:
126126
```bash
127-
detox build --configuration ios.sim.release
127+
yarn run example detox:build:ios-release
128128
```
129129

130130
Android:
131131
```bash
132-
detox build --configuration android.emu.release
132+
yarn run example detox:build:android-release
133133
```
134134

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

137137
iOS
138138
```bash
139-
yarn run example test:ios-release
139+
yarn run example detox:test:ios-release
140140
```
141141

142142
Android:

example/src/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ const HomeScreen = () => {
4747
const isFocused = useIsFocused();
4848

4949
return (
50-
<View style={[styles.container]}>
50+
<View style={styles.container}>
51+
{/* Spacer */}
52+
<View style={styles.container} />
5153
<View style={styles.buttonContainer}>
5254
<Button
5355
title="Navigation"
@@ -60,8 +62,11 @@ const HomeScreen = () => {
6062
onPress={() => isFocused && navigate('Multiple maps')}
6163
/>
6264
</View>
65+
{/* Spacer */}
66+
<View style={styles.container} />
6367
<View style={styles.buttonContainer}>
6468
<Button
69+
color="grey"
6570
title="Integration Tests"
6671
testID="integration_tests_button"
6772
onPress={() => isFocused && navigate('Integration tests')}

example/src/screens/IntegrationTestsScreen.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,9 @@ const IntegrationTestsScreen = () => {
220220
}, [testStatus, detoxStepNumber]);
221221

222222
return (
223-
<View style={[styles.container]}>
224-
<View style={{ flex: 3, margin: 5 }}>
223+
<View style={styles.container}>
224+
<Text>See CONTRIBUTING.md to see how to run integration tests.</Text>
225+
<View style={{ flex: 6, margin: 5 }}>
225226
<NavigationView
226227
mapViewCallbacks={mapViewCallbacks}
227228
onMapViewControllerCreated={setMapViewController}

example/src/screens/MultipleMapsScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ const MultipleMapsScreen = () => {
325325
};
326326

327327
return arePermissionsApproved ? (
328-
<View style={[styles.container]}>
328+
<View style={styles.container}>
329329
<NavigationView
330330
androidStylingOptions={{
331331
primaryDayModeThemeColor: '#34eba8',

example/src/screens/NavigationScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ const NavigationScreen = () => {
342342
};
343343

344344
return arePermissionsApproved ? (
345-
<View style={[styles.container]}>
345+
<View style={styles.container}>
346346
<NavigationView
347347
style={[
348348
{

0 commit comments

Comments
 (0)