react-native-macos/scripts
Riccardo Cipolleschi 4eed12b7df Fix RNTestProject testing on Android (#41172)
Summary:
While releasing RN 0.73.0-RC3, we relaized that the e2e test script was bugged for Android when used to test RNTestProject with the `-c` option.

There  were 2 problems:
- The downloaded maven-local was not actually used because it doesn't work with a zip. (We were always downloading a version from Maven)
- The versions of React Native between maven-local and the locally packaged React Native were different.

This change fixes the script by:
- Downloading maven-local
- Unzipping maven-local and passing the new folder to the Android app
- Downloading the React Native version that has been packaged in CI

By unzipping maven-local and using the unzipped folder, we make sure that Android is actually using the local repository.
By downloading both the packaged react native and the maven-local from the same CI workflow, we ensure that the versions are aligned.

This also speeds-up further the Android testing.

While running this change, we also moved the `pod install` step inside the `if (iOS)` branch, so we do not install Cocoapods if we need to test
Android.

## Changelog:
[Internal] - Fix Android E2E test script when downloading artefacts from CI

Pull Request resolved: https://github.com/facebook/react-native/pull/41172

Test Plan: Tested locally on both main and 0.73-stable, on both Android and iOS

Reviewed By: cortinico

Differential Revision: D50651448

Pulled By: cipolleschi

fbshipit-source-id: 70a9ed19072119d19c5388e8a4309d7333a08e13
2023-10-27 07:25:02 -07:00
..
__tests__ Connect the flag removal script (#40782) 2023-10-11 10:09:57 -07:00
build Revert D49370200: Migrate codegen to shared build setup, remove package build pre-step from RNTester 2023-10-23 12:00:54 -07:00
circleci Disable unstable E2E tests (#41153) 2023-10-23 07:15:00 -07:00
debugger-frontend Update source repo URL for debugger-frontend, require branch arg (#41118) 2023-10-20 12:34:29 -07:00
e2e Unify `test-e2e` command in `rn-tester-e2e` pacakge (#38701) 2023-08-02 03:38:08 -07:00
monorepo Generalize get-and-update-nightlies (#40786) 2023-10-11 10:09:57 -07:00
releases Flow strictify xplat/js/react-native-github where possible (#41051) 2023-10-18 05:36:33 -07:00
template Skip publishing of normalize-colors (#40977) 2023-10-14 13:12:46 -07:00
versiontemplates Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
.tests.env Bump AGP to 8.1.0 (#38638) 2023-07-26 11:02:05 -07:00
android-e2e-test.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
android-setup.sh RN: Make `retry3` Portable in CI Scripts 2022-09-28 10:57:07 -07:00
circle-ci-artifacts-utils.js Fix RNTestProject testing on Android (#41172) 2023-10-27 07:25:02 -07:00
lint-java.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
npm-utils.js Compute the right version (#40780) 2023-10-11 10:09:57 -07:00
objc-test.sh Remove deprecated Snapshot tests (#39720) 2023-10-03 04:33:53 -07:00
prepare-package-for-release.js Bypass tag check in dry run (#35428) (#35470) 2022-11-25 10:53:14 -08:00
process-podspecs.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
publish-npm.js Connect the flag removal script (#40782) 2023-10-11 10:09:57 -07:00
release-utils.js Update publishing to Sonatype for double publishing (#40781) 2023-10-11 10:09:57 -07:00
run-android-ci-instrumentation-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-emulator.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
run-android-local-integration-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-local-unit-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-ci-e2e-tests.js Integrate dev-middleware into start command (#39059) 2023-08-22 08:08:15 -07:00
run-ci-javascript-tests.js Revert D49370200: Migrate codegen to shared build setup, remove package build pre-step from RNTester 2023-10-23 12:00:54 -07:00
run-instrumentation-tests-via-adb-shell.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
scm-utils.js Publish nightly monorepo packages (#37556) 2023-06-02 17:40:52 -07:00
set-rn-version.js Add double publishing support to set-rn-version (#40784) 2023-10-11 10:09:57 -07:00
setup-verdaccio.js save registry auth token before bootstrapping verdaccio (#35991) 2023-01-27 11:01:45 -08:00
sync-css-layout.sh | RN Monorepo | Migrate to package (#36434) 2023-03-17 05:03:25 -07:00
test-e2e-local-clean.js Download artifacts from CI to speed up testing (#37971) 2023-07-21 07:15:53 -07:00
test-e2e-local.js Fix RNTestProject testing on Android (#41172) 2023-10-27 07:25:02 -07:00
testing-utils.js Fix RNTestProject testing on Android (#41172) 2023-10-27 07:25:02 -07:00
trigger-react-native-release.js fix(releases): re-add the file for RN release versioning (#38887) 2023-08-09 10:15:18 -07:00
try-n-times.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
update-template-package.js Re-sync with internal repository (#37831) 2023-06-12 17:34:52 -04:00
update_podfile_lock.sh Update Gemfile to require Cocoapods 1.12.0 (#36321) 2023-02-28 07:14:02 -08:00
validate-android-device-env.sh Update CONTRIBUTING.md, replace wiki links (#34035) 2022-06-21 19:30:23 -07:00
validate-android-sdk.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-android-test-env.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-ios-test-env.sh bump Node references from 12/14 to 14/16 (#32980) 2022-01-28 05:07:18 -08:00
version-utils.js Update version-utils to accept new versions (#40783) 2023-10-11 10:09:57 -07:00