From 91d7e4173a266e1ee9a5f5d23321cd2d58b7e8c0 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 28 Jun 2024 13:22:19 +0400 Subject: [PATCH] Update method for changing the content in 'editor-modes' e2e test (#62957) Co-authored-by: Mamaduka Co-authored-by: ellatrix --- test/e2e/specs/editor/various/editor-modes.spec.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/e2e/specs/editor/various/editor-modes.spec.js b/test/e2e/specs/editor/various/editor-modes.spec.js index 5fd99ee136ae57..95c409f0589e31 100644 --- a/test/e2e/specs/editor/various/editor-modes.spec.js +++ b/test/e2e/specs/editor/various/editor-modes.spec.js @@ -164,15 +164,9 @@ test.describe( 'Editing modes (visual/HTML)', () => { // Open the code editor. await pageUtils.pressKeys( 'secondary+M' ); - const textbox = page.getByRole( 'textbox', { - name: 'Type text or HTML', - } ); - - // Change content by typing. - await textbox.fill( '' ); - await textbox.focus(); - - await page.keyboard.type( ` + // Change the content. + await page.getByRole( 'textbox', { name: 'Type text or HTML' } ) + .fill( `

abc

` );