From 41de3976cc897796f946364a0bd6a91cf1ebd153 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Fri, 14 Jun 2024 13:30:58 -0500 Subject: [PATCH] Update test to right focus area --- test/e2e/specs/editor/various/writing-flow.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/specs/editor/various/writing-flow.spec.js b/test/e2e/specs/editor/various/writing-flow.spec.js index 16d7d1abb4a693..6a957221156964 100644 --- a/test/e2e/specs/editor/various/writing-flow.spec.js +++ b/test/e2e/specs/editor/various/writing-flow.spec.js @@ -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, } ) => { @@ -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.