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

Detox setup #29296

Closed
wants to merge 78 commits into from
Closed

Detox setup #29296

wants to merge 78 commits into from

Conversation

AnshG714
Copy link
Contributor

@AnshG714 AnshG714 commented Jul 8, 2020

Summary

This PR isn't really meant to be merged in right now. This is more of a call for help, as suggested by @rickhanlonii. I primarily need help with the iOS setup. This is a branch that's being worked on from the MLH react-native repository.

Background

We have migrated the RNTester app to the packages folder (and deleted the old RNTester app). This was meant to separate RNTester from the react-native repository.

How to set up the project to replicate error

After cloning the repo, run yarn link in the root react-native repository. Then, run yarn link react-native in react-native/packages/RNTester. Run yarn install && cd ios && pod install. Open RNTester.xcworkspace in the ios directory. You should see build errors (the error I get when I open it up is related to the XCTest framework not being recognisable.

@AnshG714 AnshG714 requested review from cpojer and hramos as code owners July 8, 2020 07:00
@facebook-github-bot
Copy link
Contributor

Hi @AnshG714!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@pull-bot
Copy link

pull-bot commented Jul 8, 2020

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

Generated by 🚫 dangerJS against 4d37f78

@rickhanlonii
Copy link
Member

@AnshG714 can you post a screenshot of the error you're seeing?

@react-native-bot react-native-bot added the No CLA Authors need to sign the CLA before a PR can be reviewed. label Jul 9, 2020
@AnshG714
Copy link
Contributor Author

AnshG714 commented Jul 9, 2020

@rickhanlonii The error is an Xcode build error: 'XCTest/XCTest.h' file not found. Don't see any more information. This error comes up in every file in RNTesterUnitTests that references XCTest.h.

@rickhanlonii
Copy link
Member

@AnshG714 Can you share the version of Xcode/Node/etc that you're using?

You can run react-native info for everything except the Xcode version.

@rickhanlonii
Copy link
Member

It looks like RCTMultipartStreamReaderTests.m has the wrong target, it should be a test target but I'm not sure how to fix that.

@AnshG714
Copy link
Contributor Author

Hey @rickhanlonii!
My Xcode version is 10.3.
Here are my other version info:

System: OS: macOS 10.14.6 CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz Memory: 26.95 MB / 8.00 GB Shell: 5.0.16 - /usr/local/bin/bash Binaries: Node: 13.12.0 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 29 Build Tools: 29.0.2 System Images: android-29 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 3.5 AI-191.8026.42.35.5977832 Xcode: 10.3/10G8 - /usr/bin/xcodebuild Languages: Java: 1.8.0_202 - /usr/bin/javac Python: 3.6.8 - /Applications/anaconda3/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: ^0.62.2 => 1000.0.0 npmGlobalPackages: *react-native*: Not Found

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 17, 2020
@react-native-bot react-native-bot removed the No CLA Authors need to sign the CLA before a PR can be reviewed. label Jul 17, 2020
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@rickhanlonii
Copy link
Member

rickhanlonii commented Jul 17, 2020

@alloy sorry for the ping, are you familiar with XCTest/XCTest.h file not found? Some searching I've done suggests that this may a related to the pod config, but I'm way out of my element to help here. Is this a quick fix or is there a place we can look deeper?

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@alloy
Copy link
Contributor

alloy commented Jul 20, 2020

@rickhanlonii Don’t know offhand, but I’ll take a look-see 👍

@alloy
Copy link
Contributor

alloy commented Jul 20, 2020

The XCTest/XCTest.h file not found build failure is caused because all the test files are added to the normal app target, which is not a test target and so the XCTest framework will not be available. Removing all those test files from the normal app target should solve that issue.

Screenshot 2020-07-20 at 15 45 04

@rickhanlonii
Copy link
Member

Wow thanks @alloy, that fixed it 💛

@nitint007
Copy link

Hi All,

I understand this would not be the right stage for my question but I think the techies involved here can answer and possible solutions.

Does DETOX work for a web app developed using react.js for UI testing automation?
We are planning to use DETOX for web (as mentioned above) app and react native apps for test automation.

Looking forward for your valuable inputs.

@rickhanlonii
Copy link
Member

Hey @nitint007, not sure, I would ask in https://github.com/wix/Detox

@rickhanlonii
Copy link
Member

Going to close this in favor of #29567 (review)

@AnshG714 AnshG714 deleted the detox-setup branch August 20, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants