diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 6d4652960c..010cd212ca 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,5 +1,6 @@ Unreleased --- +* [**] Highlight color formatting style improvements [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6517] 1.115.0 --- diff --git a/__device-tests__/gutenberg-editor-functionality-test-1-visual.test.js b/__device-tests__/gutenberg-editor-functionality-test-1-visual.test.js index 48b3fefad7..03602027ca 100644 --- a/__device-tests__/gutenberg-editor-functionality-test-1-visual.test.js +++ b/__device-tests__/gutenberg-editor-functionality-test-1-visual.test.js @@ -376,4 +376,88 @@ describe( 'Gutenberg Editor - Test Suite 1', () => { expect( screenshot ).toMatchImageSnapshot(); } ); } ); + + describe( 'Highlight color', () => { + let screenshot; + it( 'should set a custom highlight color', async () => { + await editorPage.initializeEditor(); + + const defaultBlockAppenderElement = + await editorPage.getDefaultBlockAppenderElement(); + await defaultBlockAppenderElement.click(); + const toolbar = await editorPage.getToolbar(); + + await editorPage.toggleHighlightColor( 'Pale pink' ); + + await editorPage.typeKeyString( 'Hey ' ); + + screenshot = await takeScreenshotByElement( + await toolbar.$( '~Text color' ), + { padding: -5 } + ); + expect( screenshot ).toMatchImageSnapshot(); + + await editorPage.toggleHighlightColor( 'Vivid red' ); + + await editorPage.typeKeyString( 'there ' ); + + screenshot = await takeScreenshotByElement( + await toolbar.$( '~Text color' ), + { padding: -5 } + ); + expect( screenshot ).toMatchImageSnapshot(); + + await editorPage.toggleHighlightColor( 'Luminous vivid orange' ); + + await editorPage.typeKeyString( 'how are you?' ); + + screenshot = await takeScreenshotByElement( + await toolbar.$( '~Text color' ), + { padding: -5 } + ); + expect( screenshot ).toMatchImageSnapshot(); + + await editorPage.dismissKeyboard(); + await editorPage.driver.waitUntil( async function () { + return ! ( await editorPage.driver.isKeyboardShown() ); + } ); + + let paragraphBlockElement = await editorPage.getBlockAtPosition( + blockNames.paragraph + ); + screenshot = await takeScreenshotByElement( paragraphBlockElement ); + expect( screenshot ).toMatchImageSnapshot(); + + // Add a new Paragraph block + await editorPage.addParagraphBlockByTappingEmptyAreaBelowLastBlock(); + paragraphBlockElement = await editorPage.getBlockAtPosition( + blockNames.paragraph, + 2 + ); + expect( paragraphBlockElement ).toBeTruthy(); + + await editorPage.typeKeyString( 'Hey there' ); + + await editorPage.toggleHighlightColor( 'Luminous vivid orange' ); + + await editorPage.typeKeyString( ' how are you?' ); + + await editorPage.toggleHighlightColor( 'Pale pink' ); + + await editorPage.typeKeyString( ' all good!.' ); + + // Reset color + await editorPage.toggleHighlightColor(); + + await editorPage.typeKeyString( ' No colored text.' ); + + await editorPage.dismissKeyboard(); + await editorPage.driver.waitUntil( async function () { + return ! ( await editorPage.driver.isKeyboardShown() ); + } ); + + screenshot = await takeScreenshotByElement( paragraphBlockElement ); + expect( screenshot ).toMatchImageSnapshot(); + } ); + } ); } ); diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-1-android.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-1-android.png new file mode 100644 index 0000000000..6f2e4045e4 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-1-android.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-1-ios.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-1-ios.png new file mode 100644 index 0000000000..d6f0c036b2 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-1-ios.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-2-android.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-2-android.png new file mode 100644 index 0000000000..9a0c3c6648 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-2-android.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-2-ios.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-2-ios.png new file mode 100644 index 0000000000..87da3587f2 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-2-ios.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-3-android.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-3-android.png new file mode 100644 index 0000000000..631a325fc1 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-3-android.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-3-ios.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-3-ios.png new file mode 100644 index 0000000000..aa5781734b Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-3-ios.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-4-android.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-4-android.png new file mode 100644 index 0000000000..bba2b6762d Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-4-android.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-4-ios.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-4-ios.png new file mode 100644 index 0000000000..eb1345e420 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-4-ios.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-5-android.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-5-android.png new file mode 100644 index 0000000000..c5b59983ee Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-5-android.png differ diff --git a/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-5-ios.png b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-5-ios.png new file mode 100644 index 0000000000..46626812d6 Binary files /dev/null and b/__device-tests__/image-snapshots/gutenberg-editor-functionality-test-1-visual-test-js-gutenberg-editor-test-suite-1-highlight-color-should-set-a-custom-highlight-color-5-ios.png differ diff --git a/gutenberg b/gutenberg index 979770fcfa..660553fb70 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 979770fcfa7dc6b998c2310467694a37fc8b756f +Subproject commit 660553fb70409bf11536da42d4f359ab1a64f5c9 diff --git a/ios-xcframework/Podfile.lock b/ios-xcframework/Podfile.lock index 442202bbde..b932b20f6e 100644 --- a/ios-xcframework/Podfile.lock +++ b/ios-xcframework/Podfile.lock @@ -1106,7 +1106,7 @@ PODS: - React-Core - RNTAztecView (1.115.0): - React-Core - - WordPress-Aztec-iOS (= 1.19.9) + - WordPress-Aztec-iOS (= 1.19.11) - SDWebImage (5.11.1): - SDWebImage/Core (= 5.11.1) - SDWebImage/Core (5.11.1) @@ -1114,7 +1114,7 @@ PODS: - libwebp (~> 1.0) - SDWebImage/Core (~> 5.10) - SocketRocket (0.6.1) - - WordPress-Aztec-iOS (1.19.9) + - WordPress-Aztec-iOS (1.19.11) - Yoga (1.14.0) DEPENDENCIES: @@ -1399,11 +1399,11 @@ SPEC CHECKSUMS: RNReanimated: f705119af7f77c961122a09adbfdf3dd38ce6a60 RNScreens: d07e03170921286b65f07e7b2a3aa8300f61f2ec RNSVG: eb0b170443191e4a1af53b9bd17d1f2fbd1ba152 - RNTAztecView: f9ac93cee7a4cd984d8453a9141058fa22cb9b1a + RNTAztecView: a7f3ef74bdd75250ae479b8027021576047aed0f SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - WordPress-Aztec-iOS: fbebd569c61baa252b3f5058c0a2a9a6ada686bb + WordPress-Aztec-iOS: 47311b8a342f2b12babb5b8a705ab20b281a83ae Yoga: ff0382b894475dba0b4d2a5fda860bfee5a9afad PODFILE CHECKSUM: fbfd4d8f52bfcf86e5e1fab197d349d6d2b8e72f