test: check that hotkeys are focused before use (#55632)

This commit is contained in:
Oliver Eyton-Williams 2024-07-24 16:21:07 +02:00 committed by GitHub
parent f3dc9dd286
commit 25b6fb50a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,7 @@ function Hotkeys({
<>
<HotKeys
id='editor-layout'
data-playwright-test-label='hotkeys'
allowChanges={true}
handlers={handlers}
innerRef={containerRef}

View File

@ -28,6 +28,7 @@ const openModal = async (page: Page) => {
// The editor pane is focused by default, so we need to escape or it will
// capture the keyboard shortcuts
await getEditors(page).press('Escape');
await expect(page.getByTestId('hotkeys')).toBeFocused();
await page.keyboard.press('Shift+?');
};