Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:wordpress-mobile/gutenberg-mobile …
Browse files Browse the repository at this point in the history
…into upgrade/react-native-0.71-ios
  • Loading branch information
dcalhoun committed Jun 30, 2023
2 parents e591b82 + 8af9406 commit 327dec3
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 12 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,20 @@ This project is set up to use [jest](https://facebook.github.io/jest/) for tests

This repository uses Appium to run UI tests. The tests live in `__device-tests__` and are written using Appium to run tests against simulators and real devices. To run these you'll need to check off a few things:

### Set up

* When running the tests, you'll need to ensure the Metro bundler (`npm run start`) is not running.
* [Appium CLI](https://appium.io/docs/en/about-appium/getting-started/) installed and available globally. We also recommend using [appium-doctor](https://github.com/appium/appium-doctor) to ensure all of Appium's dependencies are good to go. You don't have to worry about starting the server yourself, the tests handle starting the server on port 4723, just be sure that the port is free or feel free to change the port number in the test file.
* For iOS a simulator should automatically launch but for Android you'll need to have an emulator *with at least platform version 8.0* fired up and running.
* For iOS a simulator should automatically launch but for Android you'll need to have an emulator fired up and running. The emulators must match the devices in Gutenberg's [caps.js](https://github.com/WordPress/gutenberg/blob/trunk/packages/react-native-editor/__device-tests__/helpers/caps.js) file.
* iOS: __iPhone 13, iOS 15.4__
* Android: __Google Pixel 3 XL GoogleAPI Emulator, Android 11__ _(Note: when creating the Pixel 3 XL emulator, ensure that "Enable Device Frame" is unchecked on the Verify Configuration screen.)_


<img width="512" alt="Device Tests" src="https://github.com/wordpress-mobile/gutenberg-mobile/assets/643285/19c223cc-96d6-4c5a-98f1-a463bb98e927">



### Running the tests

Then, to run the UI tests on iOS:

Expand Down
15 changes: 15 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
Unreleased
---
* [*] Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5885]

1.98.1
---
* [*] fix: Display heading level dropdown icons and labels [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5911]

1.98.0
---
* [*] Image block - Fix issue where in some cases the image doesn't display the right aspect ratio [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5869]
* [*] Fix cursor positioning when dictating text on iOS [https://github.com/WordPress/gutenberg/issues/51227]

1.97.1
---
* [**] Fix crash when using the delete key to remove a single button [https://github.com/WordPress/gutenberg/pull/51435]
* [*] Ensure text input field is not editable when Bottom sheet cell is disabled [https://github.com/WordPress/gutenberg/pull/51567]

1.97.0
---
Expand Down
24 changes: 17 additions & 7 deletions bin/generate-podspecs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function warn_missing_tag_commit() {
}

# Change to the expected directory.
cd "$( dirname "$0" )"
cd ..
pushd "$( dirname "$0" )" > /dev/null
popd > /dev/null
WD=$(pwd)
echo "Working directory: $WD"

Expand All @@ -45,7 +45,7 @@ if [[ $PROMPT_RESPONSE_2 != "y" ]]; then
exit 1
fi

mkdir $DEST
mkdir "$DEST"

NODE_MODULES_DIR="gutenberg/node_modules"

Expand Down Expand Up @@ -74,7 +74,7 @@ do

echo "Generating podspec for $pod"
pod ipc spec "$podspec" > "$DEST/$pod.podspec.json"

# react-native-blur doesn't have a tag field in it's podspec
if [[ "$pod" == "react-native-blur" ]]; then
echo " ==> Patching $pod podspec"
Expand All @@ -84,7 +84,7 @@ do
jq '.source.tag = "v3.6.1" | .version = "3.6.1"' "$DEST/$pod.podspec.json" > "$TMP_RNBlurPodspec"
mv "$TMP_RNBlurPodspec" "$DEST/$pod.podspec.json"
fi

# Add warning to bottom
TMP_SPEC=$(mktemp)
jq '. + {"__WARNING!__": "This file is autogenerated by generate-podspecs.sh script. Do not modify manually. Re-run the script if necessary."}' "$DEST/$pod.podspec.json" > "$TMP_SPEC"
Expand All @@ -96,7 +96,7 @@ done

# Generate the React Native podspecs
# Change to the React Native directory to get relative paths for the RN podspecs
cd "$NODE_MODULES_DIR/react-native"
pushd "$NODE_MODULES_DIR/react-native" > /dev/null

RN_DIR="./"
SCRIPTS_PATH="./scripts/"
Expand Down Expand Up @@ -203,4 +203,14 @@ do
jq --arg COMMIT_HASH "$COMMIT_HASH" 'del(.script_phases) | del(.prepare_command) | del(.source.tag) | .source.git = "https://github.com/wordpress-mobile/gutenberg-mobile.git" | .source.commit = $COMMIT_HASH | .source.submodules = "true" | .source_files = "third-party-podspecs/FBReactNativeSpec/**/*.{c,h,m,mm,cpp}"' "$DEST/FBReactNativeSpec/FBReactNativeSpec.podspec.json" > "$TMP_FBReactNativeSpec"
mv "$TMP_FBReactNativeSpec" "$DEST/FBReactNativeSpec/FBReactNativeSpec.podspec.json"
fi
done
done
popd > /dev/null

# We are required to run this script twice to capture the correct target.
# 0 is the value set during the first script run to generate the podspecs.
if [[ "$COMMIT_HASH" != "0" ]]; then
echo 'Updating XCFramework Podfile.lock with these changes'
pushd ios-xcframework > /dev/null
bundle exec pod update
popd > /dev/null
fi
1 change: 1 addition & 0 deletions bundle/android/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ translators: %s: Select control button label e.g. "Button width" -->
<string name="gutenberg_native_replace_image_or_video" tools:ignore="UnusedResources">Replace image or video</string>
<string name="gutenberg_native_replace_video" tools:ignore="UnusedResources">Replace video</string>
<string name="gutenberg_native_retry" tools:ignore="UnusedResources">Retry</string>
<string name="gutenberg_native_reusable" tools:ignore="UnusedResources">Reusable</string>
<string name="gutenberg_native_rich_text_editing" tools:ignore="UnusedResources">Rich text editing</string>
<!-- translators: %s: Block name e.g. "Image block"
translators: Block name. %s: The localized block name -->
Expand Down
1 change: 1 addition & 0 deletions bundle/ios/GutenbergNativeTranslations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ private func dummy() {
_ = NSLocalizedString("Replace image or video", comment: "")
_ = NSLocalizedString("Replace video", comment: "")
_ = NSLocalizedString("Retry", comment: "")
_ = NSLocalizedString("Reusable", comment: "")
_ = NSLocalizedString("Rich text editing", comment: "")
_ = NSLocalizedString("Scrollable block menu closed.", comment: "")
_ = NSLocalizedString("Scrollable block menu opened. Select a block.", comment: "")
Expand Down
4 changes: 2 additions & 2 deletions ios-xcframework/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ PODS:
- React-Core
- RNSVG (9.13.6):
- React-Core
- RNTAztecView (1.97.0):
- RNTAztecView (1.98.0):
- React-Core
- WordPress-Aztec-iOS (~> 1.19.8)
- SDWebImage (5.11.1):
Expand Down Expand Up @@ -672,7 +672,7 @@ SPEC CHECKSUMS:
RNReanimated: afbb0e290008b5c3e3c673cf26e48bd48b8d5e1e
RNScreens: bd1f43d7dfcd435bc11d4ee5c60086717c45a113
RNSVG: 259ef12cbec2591a45fc7c5f09d7aa09e6692533
RNTAztecView: 3b2782b67822bf3e2fb308f6a90ec888601508ce
RNTAztecView: 6362ed78bcf0c68a2a0e25b779a84ad7096c9ecf
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
WordPress-Aztec-iOS: 7d11d598f14c82c727c08b56bd35fbeb7dafb504
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg-mobile",
"version": "1.97.0",
"version": "1.98.0",
"private": true,
"config": {
"jsfiles": "./*.js src/*.js src/**/*.js src/**/**/*.js",
Expand Down
2 changes: 2 additions & 0 deletions src/test/videopress/local-helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const pressSettingInPanel = async ( screen, panel, setting ) => {
fireEvent.press( getByText( panel ) );

// Toggle the specified setting
// TODO: Determine the cause of state updates and explicitly wait for them,
// instead of wrapping firEvent in act.
await act( () => fireEvent.press( getByText( setting ) ) );
};

Expand Down

0 comments on commit 327dec3

Please sign in to comment.