From 30071fbd774ce71e2f8c39abf7610f0f5bd5ab08 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 2 Oct 2024 10:56:38 +0100 Subject: [PATCH] Changes per review --- .../src/editor/switch-editor-tool.ts | 4 ++-- test/e2e/specs/editor/various/write-design-mode.spec.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts b/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts index ed9406f72cec2d..ff37651158231d 100644 --- a/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts +++ b/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts @@ -4,12 +4,12 @@ import type { Editor } from './index'; /** - * Clicks a block toolbar button. + * Switch the editor tool being used. * * @param this * @param label The text string of the button label. */ -export async function switchEditorTool( this: Editor, label: string ) { +export async function switchEditorTool( this: Editor, label: 'string' ) { const toolsToolbar = this.page.getByRole( 'toolbar', { name: 'Document tools', } ); diff --git a/test/e2e/specs/editor/various/write-design-mode.spec.js b/test/e2e/specs/editor/various/write-design-mode.spec.js index e6f9fb03b17d1b..55dbde954563db 100644 --- a/test/e2e/specs/editor/various/write-design-mode.spec.js +++ b/test/e2e/specs/editor/various/write-design-mode.spec.js @@ -96,7 +96,7 @@ test.describe( 'Write/Design mode', () => { await paragraph.click(); await page.keyboard.type( ' something' ); expect( await getSelectedBlock() ).toEqual( paragraphClientId ); - expect( await paragraph.innerHTML() ).toEqual( 'Something something' ); + await expect( paragraph ).toHaveText( 'Something something' ); // Check that the inspector still shows the group block with the content panel. await editor.openDocumentSettingsSidebar();