Skip to content

Commit

Permalink
Tweak tests; use o instead of l
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt authored and youknowriad committed Oct 17, 2018
1 parent a1c039d commit 45b7686
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const globalShortcuts = {
ariaLabel: shortcutAriaLabel.primaryShift( ',' ),
},
{
keyCombination: access( 'l' ),
keyCombination: access( 'o' ),
description: __( 'Open the block navigation menu.' ),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
"+",
"Alt",
"+",
"B",
"O",
],
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function BlockNavigationDropdown() {
<KeyboardShortcuts
bindGlobal
shortcuts={ {
[ rawShortcut.access( 'l' ) ]: onToggle,
[ rawShortcut.access( 'o' ) ]: onToggle,
} }
/>
<IconButton
Expand Down
12 changes: 8 additions & 4 deletions test/e2e/specs/block-hierarchy-navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import {
pressWithModifier,
} from '../support/utils';

async function openBlockNavigator() {
return pressWithModifier( ACCESS_MODIFIER_KEYS, 'o' );
}

describe( 'Navigating the block hierarchy', () => {
beforeEach( async () => {
await newPost();
Expand Down Expand Up @@ -55,7 +59,7 @@ describe( 'Navigating the block hierarchy', () => {
await page.keyboard.type( 'First column' );

// Navigate to the columns blocks using the keyboard.
await pressWithModifier( ACCESS_MODIFIER_KEYS, 'l' );
await openBlockNavigator();
await page.keyboard.press( 'Enter' );

// Move focus to the sidebar area.
Expand All @@ -69,7 +73,7 @@ describe( 'Navigating the block hierarchy', () => {
page.keyboard.press( 'ArrowRight' );

// Navigate to the last column in the columns block.
await pressWithModifier( ACCESS_MODIFIER_KEYS, 'l' );
await openBlockNavigator();
await pressTimes( 'Tab', 4 );
await page.keyboard.press( 'Enter' );

Expand All @@ -91,7 +95,7 @@ describe( 'Navigating the block hierarchy', () => {
await insertBlock( 'Image' );

// Return to first block.
await pressWithModifier( ACCESS_MODIFIER_KEYS, 'l' );
await openBlockNavigator();
await page.keyboard.press( 'Space' );

// Replace its content.
Expand All @@ -102,7 +106,7 @@ describe( 'Navigating the block hierarchy', () => {
} );

it( 'should report "No blocks created yet." when post is empty', async () => {
await pressWithModifier( ACCESS_MODIFIER_KEYS, 'l' );
await openBlockNavigator();

const blockNavigationText = await page.$eval(
'.editor-block-navigation__paragraph',
Expand Down

0 comments on commit 45b7686

Please sign in to comment.