Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight color fixes #6517

Merged
merged 24 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased
---
* [**] Highlight color formatting style improvements [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6517]

1.115.0
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
} );
} );
} );
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 239 files
8 changes: 4 additions & 4 deletions ios-xcframework/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1106,15 +1106,15 @@ 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)
- SDWebImageWebPCoder (0.8.5):
- 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:
Expand Down Expand Up @@ -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
Expand Down