react-native/packages/rn-tester
Riccardo Cipolleschi 0b7a0092db Disable flaky flatList test (#47718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47718

We have a test in the OSS E2E CI pipeline that is a bit flaky and fails often on Android.

I don't have time to investigate that properly right now, so I'm disabling it to improve the situation on the main branch for the time being.

We are planning to invest more resources in H1 2025 to improve the E2E testing in OSS, so I'll get back to it soon.

## Changelog
[Internal] - Disabling part of the FlatList E2E test in Maestro

Reviewed By: javache

Differential Revision: D66169183

fbshipit-source-id: 5b2b0c45e124a642b626b014b91fa61d17226f9b
2024-11-19 09:23:20 -08:00
..
.maestro Disable flaky flatList test (#47718) 2024-11-19 09:23:20 -08:00
android/app
IntegrationTests
js feat: add disabledButtonTintColor prop in ActionSheetIOS (#46883) 2024-11-18 05:26:38 -08:00
NativeComponentExample
NativeCxxModuleExample
NativeModuleExample
RCTTest
RNTester Pass the RCTAppDependencyProvider to the RCTAppDelegate (#47651) 2024-11-18 08:06:13 -08:00
RNTesterIntegrationTests
RNTesterPods.xcodeproj Fixes rn-tester bundled images examples (#44482) 2024-11-12 04:18:17 -08:00
RNTesterPods.xcworkspace
RNTesterUnitTests fix(iOS): small test fix for RCTViewTests (#47314) 2024-10-31 16:24:41 -07:00
scripts
.babelrc
.eslintrc
.gitignore
.xcode.env
Gemfile Pin Xcodeproj to < 1.26.0 (#47237) 2024-10-28 04:20:31 -07:00
metro.config.js
package.json Let lib maintainer be explicit with componentProvider mapping (#47520) 2024-11-12 07:38:03 -08:00
Podfile
Podfile.lock Pass the RCTAppDependencyProvider to the RCTAppDelegate (#47651) 2024-11-18 08:06:13 -08:00
PrivacyInfo.xcprivacy
react-native.config.js
README.md docs(rn-tester): adding extra instructions to disable fabric (#47127) 2024-10-21 09:18:25 -07:00

RNTester

The RNTester showcases React Native views and modules.

Running this app

Before running the app, make sure you ran:

git clone https://github.com/facebook/react-native.git
cd react-native
yarn install

Running on iOS

If you are testing non-fabric component, search for and modify the fabric_enabled flag in RNTester's Podfile.

fabric_enabled = false

Also, if you previously built RNTester with fabric enabled, you might need to clean up the build files and Pods.

# Clean the generated files and folders to clean install RNTester
cd packages/rn-tester
yarn clean-ios

If you are still having a problem after doing the clean up (which can happen if you have built RNTester with older React Native versions where files were generated inside the react-native folder.), the best way might be to clean-install react-native (e.g. remove node_modules and yarn install). If after cleaning up, you are still having issues, you might also want to try RCT_NEW_ARCH_ENABLED=0 bundle exec pod install to disable the new architecture as it might be conflicting.

Both macOS and Xcode are required.

  1. cd packages/rn-tester
  2. Install Bundler: gem install bundler. We use bundler to install the right version of CocoaPods locally.
  3. Install Bundler and CocoaPods dependencies: bundle install && bundle exec pod install or yarn setup-ios-hermes. In order to use JSC instead of Hermes engine, run: USE_HERMES=0 bundle exec pod install or yarn setup-ios-jsc instead.
  4. Open the generated RNTesterPods.xcworkspace. This is not checked in, as it is generated by CocoaPods. Do not open RNTesterPods.xcodeproj directly.

Note for Apple Silicon users

If you own a Mac laptop with Apple Silicon, you need to run some different commands to install and run cocoapods.

  • sudo arch -x86_64 gem install ffi: this installs the ffi package to load dynamically-linked libraries.
  • arch -x86_64 pod install: this run pod install with the right architecture.

Running on Android

You'll need to have all the prerequisites (SDK, NDK) for Building React Native installed.

You can build and run RN-Tester by using this command from the root of the repo:

yarn android

If you wish to use JSC instead you should invoke:

cd packages/rn-tester
yarn install-android-jsc
yarn start

Note

Building for the first time can take a while.

If you're using a physical device, run adb reverse tcp:8081 tcp:8081 to make sure the device can access Metro.

See Running on Device for additional instructions on using a physical device.

Building from source

Building the app on both iOS and Android means building the React Native framework from source. This way you're running the latest native and JS code the way you see it in your clone of the github repo.

This is different from apps created using react-native init which have a dependency on a specific version of React Native JS and native code, declared in a package.json file (and build.gradle for Android apps).