From 45b76868e88e01985c6594c48faa3e6b338ec804 Mon Sep 17 00:00:00 2001 From: "Matthew Riley MacPherson (tofumatt)" Date: Wed, 17 Oct 2018 03:34:54 +0100 Subject: [PATCH] Tweak tests; use o instead of l --- .../keyboard-shortcut-help-modal/config.js | 2 +- .../test/__snapshots__/index.js.snap | 2 +- .../src/components/block-navigation/dropdown.js | 2 +- test/e2e/specs/block-hierarchy-navigation.test.js | 12 ++++++++---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/edit-post/src/components/keyboard-shortcut-help-modal/config.js b/packages/edit-post/src/components/keyboard-shortcut-help-modal/config.js index 47e173620f6d7..5fa9db2132423 100644 --- a/packages/edit-post/src/components/keyboard-shortcut-help-modal/config.js +++ b/packages/edit-post/src/components/keyboard-shortcut-help-modal/config.js @@ -45,7 +45,7 @@ const globalShortcuts = { ariaLabel: shortcutAriaLabel.primaryShift( ',' ), }, { - keyCombination: access( 'l' ), + keyCombination: access( 'o' ), description: __( 'Open the block navigation menu.' ), }, { diff --git a/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap index c8f4bcd4a2adb..085e19e99465e 100644 --- a/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap @@ -80,7 +80,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ "+", "Alt", "+", - "B", + "O", ], }, Object { diff --git a/packages/editor/src/components/block-navigation/dropdown.js b/packages/editor/src/components/block-navigation/dropdown.js index 13909aa15e368..6eaeaf3e5686b 100644 --- a/packages/editor/src/components/block-navigation/dropdown.js +++ b/packages/editor/src/components/block-navigation/dropdown.js @@ -25,7 +25,7 @@ function BlockNavigationDropdown() { { beforeEach( async () => { await newPost(); @@ -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. @@ -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' ); @@ -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. @@ -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',