Comments (6)
@Norfeldt as far as I know, there aren't very good resources right now. I really don't like the current set of workarounds and hacks involved with getting Detox working so I'm not comfortable documenting them at the moment. Here is a pseudo example of using prebuild + detox in a monorepo, it's currently broken.
Somethings we're working on to fix this:
- You need to install
expo-cli
(npm i -g expo-cli
) to runexpo prebuild
(ref). The global CLI takes a while to install and the global node modules aren't cached. To fix this, we're movingexpo prebuild
into theexpo
package so it's always versioned, cached, and fast to download. - After we have a CLI interface in the
expo
package, we'll create a bundle and start command to override thenpx react-native bundle
andnpx react-native start
commands. This will enable us to resolve the main entry file using Node.js module resolution (i.e. respect themain
field in thepackage.json
), this will reduce the chance of error in monorepos and managed projects which tend to usenode_modules/expo/AppEntry.js
as the entry file. - After all is working in some capacity, we can write up a step to cache the native build cache files which should introduce some nice time savings.
- We should add a feature to detox to automatically choose the first available simulator and emulator, right now it's unclear which devices are available and you end up having to log from the environment.
Really there are too many steps involved. E2E testing, auto screenshots, etc. would benefit a lot from some type of managed CI service.
If you manage to get an example repo working I'd love to hear your findings.
from config-plugins.
@EvanBacon thank you for taking the time to clarify the current situation. Now I understand that it's not just my googling on 'react native e2e' that is bad, but it's because it's a struggle to get a stable setup (all the examples I have found has been broken).
Yes, a managed CI service would be fantastic ๐๐ and I'm crossing my fingers for Expo coming to the rescue regarding E2E testing and auto screenshots. Been looking into Appcenter from MS but not much good resources are to find on that either (but the phone farm looks cool).
Expo has been knocking down roadblock in RN land:
- ๐ข run on physical device ๐ฅ Expo fixed that ๐ฅ
- ๐ข deploy to stores ๐ฅ Expo fixed that ๐ฅ
- ๐ข accept payments ๐ฅ Expo fixed that ๐ฅ
- ๐ข bring the 3rd platform (web) to RN ๐งจ Expo will fix that* ๐งจ
- ๐ข End to end testing ๐งจ Expo will fix that ๐งจ
*tried the expo web
in the hope of doing test with cypress, but I seem to beak it quickly with even simple components (don't know if it was the hot reloading or something else).
from config-plugins.
@Norfeldt I think this should be useful to you
"scripts": {
"e2e:ios": "npm run build:ios && npm run test:ios"
}
source: package.json
from config-plugins.
Oh, I thought I could use the plugin in a managed app with the expo go client.
I use a macBook but really enjoy not having to compile locally (or do anything in xcode)
from config-plugins.
@Norfeldt sorry for the misunderstanding. On the bright side, E2E tests generally run in CI environments.
from config-plugins.
@EvanBacon No need to be sorry about anything. You have been pushing RN with expo in the right direction for years now and I admire the work you do. I'm just having a really hard time finding some good videos/tutorials/guides on how to do detox testing in a managed app (and have a CI with it).
Do you have any good reference materials on how to get started or is there any chance that you could drop a quick YT video of you showing off a very very simple detox with expo?
from config-plugins.
Related Issues (20)
- apk built, but not installable (on android 8.0.0) after the insertion of @config-plugins/react-native-webrtc HOT 1
- ExpoSDK49 peer dependency issue HOT 2
- expo:utils:scheme ios application Info.plist path: null +0ms
- @config-plugins/detox pre-install-hook failure: Permission denied HOT 5
- Firestore Promises never complete when running with detox on Android
- Intercom config plugin needed, the current one not maintained anymore! HOT 4
- Anyone managed to create config plugins for Adobe Mobile SDK HOT 2
- Add Expo SDK 50 support HOT 3
- @config-plugins/react-native-branch Support for Expo SDK 50 HOT 25
- uses-feature configration in android manifest file
- Expo Go Won't Run After Plug-in Install
- "@config-plugins/react-native-webrtc" facing issue in expo 50 HOT 1
- @config-plugins/react-native-branch retrieve Android AD_ID HOT 2
- android.enableDexingArtifactTransform.desugaring is deprecated HOT 1
- addResourceFileToGroup Is not being set for a target UUID that is different than the application native target
- @config-plugins/react-native-branch android build error (Task :config-plugins-react-native-branch:compileReleaseKotlin FAILED) HOT 4
- Branch plugin doesn't work with "test" API keys HOT 3
- Removal of react-native-google-cast
- Error when trying to open a link to a nonexistent page (expo sdk 50) HOT 1
- Error on building with EAS on config-plugins-react-native-branch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config-plugins.