Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Mar 18, 2021
1 parent 3369d40 commit 45715c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions packages/e2e-tests/specs/editor/blocks/quote.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand All @@ -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' );

Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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' );
Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/specs/editor/blocks/table.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit 45715c4

Please sign in to comment.