Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with Expo? #147

Closed
elie222 opened this issue May 31, 2017 · 13 comments
Closed

Does this work with Expo? #147

elie222 opened this issue May 31, 2017 · 13 comments

Comments

@elie222
Copy link

elie222 commented May 31, 2017

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

@rotemmiz
Copy link
Member

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

@elie222 elie222 closed this as completed May 31, 2017
@DanielMSchmidt
Copy link
Contributor

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

@elie222
Copy link
Author

elie222 commented Jun 1, 2017 via email

@hewrin
Copy link

hewrin commented Jun 1, 2017

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?

@rotemmiz
Copy link
Member

rotemmiz commented Jun 1, 2017

@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 ?

@brentvatne
Copy link
Contributor

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

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

@xcarpentier
Copy link
Contributor

xcarpentier commented Jun 27, 2017

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

@brentvatne
Copy link
Contributor

@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

@elie222
Copy link
Author

elie222 commented Jul 24, 2017

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

@xcarpentier
Copy link
Contributor

xcarpentier commented Jul 25, 2017

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).

@isnifer
Copy link
Contributor

isnifer commented Jul 26, 2017

@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?

@brentvatne
Copy link
Contributor

let's move discussions about expo/detox here, so we don't spam detox people: expo/expo#424

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

@xcarpentier
Copy link
Contributor

@brentvatne yes, stop intox detox please 😂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants