From 45715c42415aaeb9bc21deed7e44698a9582feaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Fri, 19 Mar 2021 01:49:12 +0200 Subject: [PATCH] Fix e2e tests --- packages/e2e-tests/specs/editor/blocks/quote.test.js | 12 ++++++------ packages/e2e-tests/specs/editor/blocks/table.test.js | 6 +++--- .../editor/various/toolbar-roving-tabindex.test.js | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/e2e-tests/specs/editor/blocks/quote.test.js b/packages/e2e-tests/specs/editor/blocks/quote.test.js index e185c9e3c7cd7..eb06f0f7a45de 100644 --- a/packages/e2e-tests/specs/editor/blocks/quote.test.js +++ b/packages/e2e-tests/specs/editor/blocks/quote.test.js @@ -87,7 +87,7 @@ describe( 'Quote', () => { await page.keyboard.type( 'one' ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( 'two' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'cite' ); await transformBlockTo( 'Paragraph' ); @@ -96,7 +96,7 @@ describe( 'Quote', () => { it( 'and renders only one paragraph for the cite, if the quote is void', async () => { await insertBlock( 'Quote' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'cite' ); await transformBlockTo( 'Paragraph' ); @@ -146,7 +146,7 @@ describe( 'Quote', () => { it( 'is transformed to a heading and a quote if the quote contains a citation', async () => { await insertBlock( 'Quote' ); await page.keyboard.type( 'one' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'cite' ); await transformBlockTo( 'Heading' ); expect( await getEditedPostContent() ).toMatchSnapshot(); @@ -157,7 +157,7 @@ describe( 'Quote', () => { await page.keyboard.type( 'one' ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( 'two' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'cite' ); await transformBlockTo( 'Heading' ); expect( await getEditedPostContent() ).toMatchSnapshot(); @@ -174,7 +174,7 @@ describe( 'Quote', () => { await page.keyboard.type( 'one' ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( 'two' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'cite' ); await transformBlockTo( 'Pullquote' ); expect( await getEditedPostContent() ).toMatchSnapshot(); @@ -214,7 +214,7 @@ describe( 'Quote', () => { await page.keyboard.type( '1' ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( '2' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'c' ); await page.keyboard.press( 'ArrowUp' ); await page.keyboard.press( 'ArrowUp' ); diff --git a/packages/e2e-tests/specs/editor/blocks/table.test.js b/packages/e2e-tests/specs/editor/blocks/table.test.js index 1b8273159b2ba..f4c3fb4041281 100644 --- a/packages/e2e-tests/specs/editor/blocks/table.test.js +++ b/packages/e2e-tests/specs/editor/blocks/table.test.js @@ -78,15 +78,15 @@ describe( 'Table', () => { await page.keyboard.type( 'This' ); // Tab to the next cell and add some text. - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'is' ); // Tab to the next cell and add some text. - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'table' ); // Tab to the next cell and add some text. - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( 'block' ); // Expect the post to have the correct written content inside the table. diff --git a/packages/e2e-tests/specs/editor/various/toolbar-roving-tabindex.test.js b/packages/e2e-tests/specs/editor/various/toolbar-roving-tabindex.test.js index ce30594e23b04..1f378b96a11f0 100644 --- a/packages/e2e-tests/specs/editor/various/toolbar-roving-tabindex.test.js +++ b/packages/e2e-tests/specs/editor/various/toolbar-roving-tabindex.test.js @@ -46,7 +46,7 @@ async function testGroupKeyboardNavigation( currentBlockTitle ) { await expectLabelToHaveFocus( 'Block: Group' ); - await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'ArrowRight' ); await expectLabelToHaveFocus( currentBlockLabel ); await pressKeyWithModifier( 'shift', 'Tab' ); await expectLabelToHaveFocus( 'Select Group' );