Skip to content

Commit

Permalink
Usage with Expo instructions (wix#630)
Browse files Browse the repository at this point in the history
* expo 25 instructions

* Update Guide.Expo.md

* Update Guide.Expo.md

* Update Guide.Expo.md

* Update Guide.Expo.md

* Update Guide.Expo.md

* Update Guide.Expo.md

* Update Guide.Expo.md
  • Loading branch information
peterpme authored and rotemmiz committed Jun 21, 2018
1 parent e0f4614 commit 84c9aef
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Gray box end-to-end testing and automation library for mobile apps.
- [About](#about)
- [Getting Started](/docs/Introduction.GettingStarted.md)
- [Documentation](/docs/README.md)
- [Usage with Expo](/docs/Guide.Expo.md)

<img src="http://i.imgur.com/eoaDEYp.gif">

Expand Down
43 changes: 43 additions & 0 deletions docs/Guide.Expo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
id: Guide.Expo
title: Expo
---

## Usage with Expo (iOS)

- Install `detox` and `detox-expo-helpers` (yarn or npm)
- Add `detox` configuration to [package.json](https://github.com/expo/with-detox-tests/blob/master/package.json#L21-L29):

```es6
"detox": {
"configurations": {
"ios.sim": {
"binaryPath": "bin/Exponent.app",
"type": "ios.simulator",
"name": "iPhone 7"
}
}
}
```

- Download the Expo app from [Expo.io/tools](https://expo.io/tools).
- Unzip the iOS IPA and **rename the folder** to `Exponent.app`. It'll have a file icon but will still be a folder.
- Create `bin` folder and put `Exponent.app` inside so it matches the binaryPath set above.
- Create an `e2e` and copy over the settings from [the example app](https://github.com/expo/with-detox-tests/tree/master/e2e)

The most important piece of this the `reloadApp` from `detox-expo-helpers`. Don't forget this.

```es6
const { reloadApp } = require('detox-expo-helpers');
// ...
beforeEach(async () => {
await reloadApp();
});
```

## Usage with Expo (Android)

- Usage with Android is currently TBD.

### Example App
[expo/with-detox-tests](https://github.com/expo/with-detox-tests)

0 comments on commit 84c9aef

Please sign in to comment.