Detox: Does this work with Expo?

Created on 31 May 2017  Â·  13Comments  Â·  Source: wix/Detox

Sorry if this has been posted. Not sure how I can search issues on my mobile and haven't seen it while scrolling through.

questiostack overflow

Most helpful comment

sure thing, I'll make an example project and share it.

@hewrin - you need to use the .app and .apk from the ~/.expo directory.

All 13 comments

It should, @brentvatne tried it already and approved :)

@rotemmiz Should we name this explicitly in the docs maybe? It is a feature compared to other tools, AFAIK

Yes I would list this in the react native docs. Expo is fairly widely used.

On 1 Jun 2017 09:22, "Daniel Schmidt" notifications@github.com wrote:

@rotemmiz https://github.com/rotemmiz Should we name this explicitly in
the docs maybe? It is a feature compared to other tools, AFAIK

—
You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
https://github.com/wix/detox/issues/147#issuecomment-305400103, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC8oX36IHGh4shF7AtFf-30e7g1prpHuks5r_li3gaJpZM4NsGNK
.

Sorry, how do we use this with Expo? Since expo doesn't have the ios folder. What do we put in the binaryPath in the configuration?
Do we make a build manually using Expo and point our binaryPath to where the build file is located?

@brentvatne , can you please elaborate about your experience with Detox on Expo, do you have an example project that we can take a look on maybe ?

sure thing, I'll make an example project and share it.

@hewrin - you need to use the .app and .apk from the ~/.expo directory.

Hello @brentvatne,
I did some e2e initials tests of Detox with expo. But I'm blocked on something and enter into the timeout (ie. try to close Welcome message first but nothing happen... ):

// into package.json
"detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "e2e/Exponent-1.16.2.app",
        "build": "",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }
  }

// The e2e test
describe('e2e', () => {
  before(async () => {
    await device.relaunchApp({ url: 'exp://localhost:19000' })
  })
  it('should have login screen', async () => {
    // await device.reloadReactNative()
    await expect(element(by.label('Got it'))).toBeVisible()
    await element(by.label('Got it')).tap()
    await expect(element(by.id('login'))).toBeVisible() // testID="login" in landing page
  })
})

Are you getting things working on your side?
Thanks

simulator screen shot 27 jun 2017 12 02 50

@xcarpentier - you can skip this if you set EXKernelDisableNuxDefaultsKey to true on NSUserDefaults, which I believe can be added under launchArgs option, eg: https://github.com/wix/detox/blob/90406c3ea774e3eb069926fdafa78d172b0dd574/detox/src/devices/Device.js#L65 is added to NSUserDefaults

Would be great if someone could to the example repo. Going to test this out too soon

Thank you!

@brentvatne @elie222 I found a way to not showing this screen: detox test --cleanup --reuse

I can see the first screen of my app, but the new issue I have is that I have a webview for the login (using keycloak).

@xcarpentier I thought this screen is visible only in developer mode, isn't it? If yes, you just need to build the Release build for iPhone Simulator and test the application without problems.
Did you try it?

let's move discussions about expo/detox here, so we don't spam detox people: https://github.com/expo/expo/issues/424

if we run into any bugs we can file specific issues for that outside of this issue.

@brentvatne yes, stop intox detox please 😂

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rengarima picture rengarima  Â·  4Comments

raphkr picture raphkr  Â·  4Comments

jrobber picture jrobber  Â·  3Comments

JB-CHAUVIN picture JB-CHAUVIN  Â·  3Comments

brunobar79 picture brunobar79  Â·  4Comments