Skip to content

Commit

Permalink
Fix tab-order test
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen authored and Joen Asmussen committed Jun 8, 2020
1 parent d0bb0bb commit 27e548a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ const tabThroughParagraphBlock = async ( paragraphText ) => {

const tabThroughBlockToolbar = async () => {
await page.keyboard.press( 'Tab' );
await expect( await getActiveLabel() ).toBe( 'Move up' );
await expect( await getActiveLabel() ).toBe( 'Change block type or style' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Move down' );
await expect( await getActiveLabel() ).toBe( 'Move up' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Change block type or style' );
await expect( await getActiveLabel() ).toBe( 'Move down' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Change text alignment' );
Expand All @@ -70,7 +70,7 @@ const tabThroughBlockToolbar = async () => {
await expect( await getActiveLabel() ).toBe( 'More options' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Move up' );
await expect( await getActiveLabel() ).toBe( 'Change block type or style' );
};

describe( 'Order of block keyboard navigation', () => {
Expand Down Expand Up @@ -197,6 +197,7 @@ describe( 'Order of block keyboard navigation', () => {
);

await pressKeyWithModifier( 'shift', 'Tab' );
await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Move up' );
} );
} );

0 comments on commit 27e548a

Please sign in to comment.