-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
RichText: attempt to fix RTL e2e test #23203
Conversation
Size Change: 0 B Total Size: 1.12 MB ℹ️ View Unchanged
|
8e00a95
to
70789f0
Compare
@@ -104,6 +104,9 @@ describe( 'RTL', () => { | |||
await page.evaluate( () => ( document.dir = 'rtl' ) ); | |||
await page.keyboard.press( 'Enter' ); | |||
|
|||
// Wait for rich text editor to load. | |||
await page.waitForSelector( '.block-editor-rich-text__editable' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also used here:
gutenberg/packages/e2e-tests/specs/editor/various/rich-text.test.js
Lines 256 to 262 in cb10e2d
it( 'should handle Home and End keys', async () => { | |
await page.keyboard.press( 'Enter' ); | |
// Wait for rich text editor to load. | |
await page.waitForSelector( '.block-editor-rich-text__editable' ); | |
await pressKeyWithModifier( 'primary', 'b' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why this is sometimes needed: caret position is not possible to be set internally upon focus. RichText only knows this information after a small delay. That's ok for typing since that's done by the browser, but it is needed for applying formats.
There's some other tests failing around block transforms which seems to be unrelated to the RichText change. I cannot see the failure in test failures following the RichTex change. I've run the e2e test a few times and the RTL failure is gone, so let's merge this as it solves at lease all RTL failures. I'll investigate the remaining separately. |
I also saw the quote failure on another PR: https://travis-ci.com/github/WordPress/gutenberg/jobs/349718433 |
🙏 Thanks @ellatrix ! |
Description
There's an RTL e2e test that is sometimes failing in
master
, likely caused by the RichText rewrite with hooks.Failure:
How has this been tested?
Screenshots
Types of changes
Checklist: