diff --git a/packages/e2e-tests/specs/editor/various/__snapshots__/rtl.test.js.snap b/packages/e2e-tests/specs/editor/various/__snapshots__/rtl.test.js.snap index a8b94682a45963..19b4e8c305acc2 100644 --- a/packages/e2e-tests/specs/editor/various/__snapshots__/rtl.test.js.snap +++ b/packages/e2e-tests/specs/editor/various/__snapshots__/rtl.test.js.snap @@ -8,11 +8,11 @@ exports[`RTL should arrow navigate 1`] = ` exports[`RTL should arrow navigate between blocks 1`] = ` " -
٠
+٠
١
١١٠
٢
٠
١
٢
٠
- - - - +٠١
" `; diff --git a/packages/e2e-tests/specs/editor/various/rtl.test.js b/packages/e2e-tests/specs/editor/various/rtl.test.js index 831557b9c52234..67f66ee77cc63a 100644 --- a/packages/e2e-tests/specs/editor/various/rtl.test.js +++ b/packages/e2e-tests/specs/editor/various/rtl.test.js @@ -15,10 +15,12 @@ const ARABIC_TWO = '٢'; describe( 'RTL', () => { beforeEach( async () => { await createNewPost(); + await page.evaluate( () => { + document.querySelector( '.is-root-container' ).dir = 'rtl'; + } ); } ); it( 'should arrow navigate', async () => { - await page.evaluate( () => ( document.dir = 'rtl' ) ); await page.keyboard.press( 'Enter' ); // We need at least three characters as arrow navigation *from* the @@ -36,7 +38,6 @@ describe( 'RTL', () => { } ); it( 'should split', async () => { - await page.evaluate( () => ( document.dir = 'rtl' ) ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( ARABIC_ZERO ); @@ -48,7 +49,6 @@ describe( 'RTL', () => { } ); it( 'should merge backward', async () => { - await page.evaluate( () => ( document.dir = 'rtl' ) ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( ARABIC_ZERO ); @@ -61,7 +61,6 @@ describe( 'RTL', () => { } ); it( 'should merge forward', async () => { - await page.evaluate( () => ( document.dir = 'rtl' ) ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( ARABIC_ZERO ); @@ -75,7 +74,6 @@ describe( 'RTL', () => { } ); it( 'should arrow navigate between blocks', async () => { - await page.evaluate( () => ( document.dir = 'rtl' ) ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( ARABIC_ZERO ); @@ -101,7 +99,6 @@ describe( 'RTL', () => { } ); it( 'should navigate inline boundaries', async () => { - await page.evaluate( () => ( document.dir = 'rtl' ) ); await page.keyboard.press( 'Enter' ); // Wait for rich text editor to load.