Skip to content

Commit f5da75b

Browse files
illuminati1911jokerttu
authored andcommitted
docs: add integration test documentation
1 parent 8ceb609 commit f5da75b

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,39 @@ Please peruse the
109109
[Typescript style guide](https://google.github.io/styleguide/tsguide.html), [Java style guide](https://google.github.io/styleguide/javaguide.html), and [Objective-C style guide](https://google.github.io/styleguide/objcguide.html) before
110110
working on anything non-trivial. These guidelines are intended to
111111
keep the code consistent and avoid common pitfalls.
112+
113+
## 6. Running tests
114+
115+
Google Maps React Native Navigation package has integration tests.
116+
117+
### Integration tests
118+
119+
Integration tests are responsible for ensuring that the plugin works against the native Navigation SDK for both Android and iOS platforms. Detox along with example application is used for the integration tests. "Integration tests must accompany the implementation of all new features.
120+
To run the test you must first install and setup detox. Please follow the guide here:
121+
https://wix.github.io/Detox/docs/introduction/environment-setup
122+
123+
Build the tests using detox-cli:
124+
125+
iOS:
126+
```bash
127+
detox build --configuration ios.sim.debug
128+
```
129+
130+
Android:
131+
```bash
132+
detox build --configuration android.emu.debug
133+
```
134+
135+
Google Maps React Native Navigation SDK integration tests can be run with the following command:
136+
137+
iOS
138+
```bash
139+
yarn run example test:ios
140+
```
141+
142+
Android:
143+
```bash
144+
yarn run example test:android
145+
```
146+
147+
When adding new tests, you need to first add the detox part in the [e2e folder](./example/e2e) and then the actual logical part of the test in the [integration tests page](./example/src/screens/IntegrationTestsScreen.tsx) of the example app.

lefthook.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ pre-commit:
3030
types:
3131
glob: '*.{js,ts, jsx, tsx}'
3232
run: npx tsc --noEmit
33-
test:
34-
run: yarn run example test:ios
3533
commit-msg:
3634
parallel: true
3735
commands:

0 commit comments

Comments
 (0)