From 60040c7a7b9cecd13f8b5153d7488813146a2088 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Wed, 25 Oct 2023 14:53:26 +0200 Subject: [PATCH] [Mobile] Update E2E Simulators (#55589) * Use iPhone 14 as the Simulator for `react-native-editor` E2E tests * Update device capabilities to use the iPhone 14 and the iPad (10th generation) simulators * Update documentation * Update iOS runner --------- Co-authored-by: Gio Lodi --- .github/workflows/rnmobile-ios-runner.yml | 2 +- packages/react-native-editor/__device-tests__/README.md | 4 ++-- .../react-native-editor/__device-tests__/helpers/caps.js | 6 +++--- packages/react-native-editor/bin/build_e2e_ios_app | 2 +- packages/react-native-editor/package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 50c3782ccad059..8f32a9ee9d9dc9 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: xcode: ['14.2'] - device: ['iPhone 13'] + device: ['iPhone 14'] native-test-name: [gutenberg-editor-rendering] steps: diff --git a/packages/react-native-editor/__device-tests__/README.md b/packages/react-native-editor/__device-tests__/README.md index a49b30d6f9f0d1..394e413156d7f4 100644 --- a/packages/react-native-editor/__device-tests__/README.md +++ b/packages/react-native-editor/__device-tests__/README.md @@ -14,8 +14,8 @@ Before setting up Appium, the required iOS and Android dependencies must be inst - Complete the [React Native Getting Started](https://reactnative.dev/docs/environment-setup) guide, which covers installing and setting up Xcode. - Open [Xcode settings](https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes#Install-and-manage-Simulator-runtimes-in-settings) to install the iOS 16.2 simulator runtime. - Create the required simulators by running the follow scripts in your shell: - - `xcrun simctl create "iPhone 13" "iPhone 13" "com.apple.CoreSimulator.SimRuntime.iOS-16-2"` - - `xcrun simctl create "iPad Pro (9.7-inch)" "iPad Pro (9.7-inch)" "com.apple.CoreSimulator.SimRuntime.iOS-16-2"` + - `xcrun simctl create "iPhone 14" "iPhone 14" "com.apple.CoreSimulator.SimRuntime.iOS-16-2"` + - `xcrun simctl create "iPad (10th generation)" "iPad (10th generation)" "com.apple.CoreSimulator.SimRuntime.iOS-16-2"` ### Android diff --git a/packages/react-native-editor/__device-tests__/helpers/caps.js b/packages/react-native-editor/__device-tests__/helpers/caps.js index 4ac431fb239e55..30cdb5d8d4601c 100644 --- a/packages/react-native-editor/__device-tests__/helpers/caps.js +++ b/packages/react-native-editor/__device-tests__/helpers/caps.js @@ -10,7 +10,7 @@ const ios = { exports.iosLocal = ( { iPadDevice = false } ) => ( { ...ios, - deviceName: ! iPadDevice ? 'iPhone 13' : 'iPad Pro (9.7-inch)', + deviceName: ! iPadDevice ? 'iPhone 14' : 'iPad (10th generation)', pixelRatio: ! iPadDevice ? 3 : 2, usePrebuiltWDA: true, } ); @@ -18,8 +18,8 @@ exports.iosLocal = ( { iPadDevice = false } ) => ( { exports.iosServer = ( { iPadDevice = false } ) => ( { ...ios, deviceName: ! iPadDevice - ? 'iPhone 13 Simulator' - : 'iPad Pro (9.7 inch) Simulator', + ? 'iPhone 14 Simulator' + : 'iPad (10th generation) Simulator', pixelRatio: ! iPadDevice ? 3 : 2, } ); diff --git a/packages/react-native-editor/bin/build_e2e_ios_app b/packages/react-native-editor/bin/build_e2e_ios_app index 71d2cfd471bec3..6a5a57d5a69ebe 100755 --- a/packages/react-native-editor/bin/build_e2e_ios_app +++ b/packages/react-native-editor/bin/build_e2e_ios_app @@ -2,7 +2,7 @@ set -o pipefail -DEFAULT_DESTINATION='platform=iOS Simulator,name=iPhone 13' +DEFAULT_DESTINATION='platform=iOS Simulator,name=iPhone 14' if [[ -z "${RN_EDITOR_E2E_IOS_DESTINATION-}" ]]; then DESTINATION="$DEFAULT_DESTINATION" else diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index 14601cd572c37b..ea7ddf9e1bcf48 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -115,7 +115,7 @@ "test:e2e:android:local": "npm run test:e2e:bundle:android && npm run test:e2e:build-app:android && TEST_RN_PLATFORM=android npm run device-tests:local", "test:e2e:bundle:ios": "mkdir -p ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app && npm run bundle:ios && cp bundle/ios/App.js ./ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle && cp -r bundle/ios/assets ./ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/", "test:e2e:build-app:ios": "npm run preios && ./bin/build_e2e_ios_app", - "test:e2e:build-wda": "xcodebuild -project ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'platform=iOS Simulator,name=iPhone 13' -derivedDataPath ios/build/WDA", + "test:e2e:build-wda": "xcodebuild -project ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ios/build/WDA", "test:e2e:ios:local": "npm run test:e2e:bundle:ios && npm run test:e2e:build-app:ios && npm run test:e2e:build-wda && TEST_RN_PLATFORM=ios npm run device-tests:local", "build:gutenberg": "cd gutenberg && npm ci && npm run build", "clean": "npm run clean:build-artifacts; npm run clean:aztec; npm run clean:haste; npm run clean:metro; npm run clean:watchman",