Skip to content

Commit

Permalink
Update test to right focus area
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Jun 14, 2024
1 parent 077ec35 commit 41de397
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/specs/editor/various/writing-flow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,6 @@ test.describe( 'Writing Flow (@firefox, @webkit)', () => {
} );

test( 'escape should set select mode and then focus the canvas', async ( {
editor,
page,
writingFlowUtils,
} ) => {
Expand All @@ -980,7 +979,9 @@ test.describe( 'Writing Flow (@firefox, @webkit)', () => {
await page.keyboard.press( 'Escape' );
// The navigation button should be hidden.
await expect( navigationButton ).toBeHidden();
await expect( editor.canvas.locator( 'body' ) ).toBeFocused();
await expect(
page.getByRole( 'region', { name: 'Editor content' } )
).toBeFocused();
} );

// Checks for regressions of https://github.com/WordPress/gutenberg/issues/40091.
Expand Down

0 comments on commit 41de397

Please sign in to comment.