From 6156a91c564a6ff19820f83a809854f4bbd3d4fa Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 9 May 2024 15:09:26 +0200 Subject: [PATCH] Change more occurrencs of Block Library to Block Inserter. --- docs/contributors/code/e2e/README.md | 4 ++-- packages/edit-post/src/components/layout/index.js | 2 +- packages/edit-site/src/components/editor/index.js | 2 +- packages/edit-widgets/src/components/layout/interface.js | 2 +- .../interface/src/components/interface-skeleton/index.js | 2 +- test/e2e/specs/editor/blocks/image.spec.js | 2 +- test/e2e/specs/editor/various/inserting-blocks.spec.js | 6 +++--- test/e2e/specs/site-editor/site-editor-inserter.spec.js | 2 +- test/e2e/specs/widgets/editing-widgets.spec.js | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/contributors/code/e2e/README.md b/docs/contributors/code/e2e/README.md index 43443cddd6aeb6..0582bc321c8c5a 100644 --- a/docs/contributors/code/e2e/README.md +++ b/docs/contributors/code/e2e/README.md @@ -57,8 +57,8 @@ page.getByRole( 'button', { name: 'Hello World' } ); It can also be chained to perform complex queries: ```js -// Select an option with a name "Buttons" under the "Block Library" region. -page.getByRole( 'region', { name: 'Block Library' } ) +// Select an option with a name "Buttons" under the "Block Inserter" region. +page.getByRole( 'region', { name: 'Block Inserter' } ) .getByRole( 'option', { name: 'Buttons' } ) ``` diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index bdf2451e27564a..4776b038167ad4 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -243,7 +243,7 @@ function Layout( { initialPost } ) { const secondarySidebarLabel = isListViewOpened ? __( 'Document Overview' ) - : __( 'Block Library' ); + : __( 'Block Inserter' ); const secondarySidebar = () => { if ( mode === 'visual' && isInserterOpened ) { diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js index dbe268fe6adb1e..ecc528e33b5f73 100644 --- a/packages/edit-site/src/components/editor/index.js +++ b/packages/edit-site/src/components/editor/index.js @@ -165,7 +165,7 @@ export default function Editor( { isLoading, onClick } ) { const shouldShowListView = isEditMode && showVisualEditor && isListViewOpen; const secondarySidebarLabel = isListViewOpen ? __( 'List View' ) - : __( 'Block Library' ); + : __( 'Block Inserter' ); const postWithTemplate = !! context?.postId; let title; diff --git a/packages/edit-widgets/src/components/layout/interface.js b/packages/edit-widgets/src/components/layout/interface.js index ee46251eca2245..929d6dddd6e99c 100644 --- a/packages/edit-widgets/src/components/layout/interface.js +++ b/packages/edit-widgets/src/components/layout/interface.js @@ -84,7 +84,7 @@ function Interface( { blockEditorSettings } ) { const secondarySidebarLabel = isListViewOpened ? __( 'List View' ) - : __( 'Block Library' ); + : __( 'Block Inserter' ); const hasSecondarySidebar = isListViewOpened || isInserterOpened; diff --git a/packages/interface/src/components/interface-skeleton/index.js b/packages/interface/src/components/interface-skeleton/index.js index dc04ccec6fe5e5..20b0e64c602a7b 100644 --- a/packages/interface/src/components/interface-skeleton/index.js +++ b/packages/interface/src/components/interface-skeleton/index.js @@ -88,7 +88,7 @@ function InterfaceSkeleton( /* translators: accessibility text for the content landmark region. */ body: __( 'Content' ), /* translators: accessibility text for the secondary sidebar landmark region. */ - secondarySidebar: __( 'Block Library' ), + secondarySidebar: __( 'Block Inserter' ), /* translators: accessibility text for the settings landmark region. */ sidebar: __( 'Settings' ), /* translators: accessibility text for the publish landmark region. */ diff --git a/test/e2e/specs/editor/blocks/image.spec.js b/test/e2e/specs/editor/blocks/image.spec.js index bd08650d7a815a..f71662562ffe55 100644 --- a/test/e2e/specs/editor/blocks/image.spec.js +++ b/test/e2e/specs/editor/blocks/image.spec.js @@ -432,7 +432,7 @@ test.describe( 'Image', () => { name: 'Block: Image', } ); const blockLibrary = page.getByRole( 'region', { - name: 'Block Library', + name: 'Block Inserter', } ); async function openMediaTab() { diff --git a/test/e2e/specs/editor/various/inserting-blocks.spec.js b/test/e2e/specs/editor/various/inserting-blocks.spec.js index 174cf88ef0c483..ce88e78e645530 100644 --- a/test/e2e/specs/editor/various/inserting-blocks.spec.js +++ b/test/e2e/specs/editor/various/inserting-blocks.spec.js @@ -392,7 +392,7 @@ test.describe( 'Inserting blocks (@firefox, @webkit)', () => { name: 'Block Inserter', } ); const blockLibrary = page.getByRole( 'region', { - name: 'Block Library', + name: 'Block Inserter', } ); await inserterButton.click(); @@ -604,7 +604,7 @@ test.describe( 'Inserting blocks (@firefox, @webkit)', () => { await expect( page - .getByRole( 'region', { name: 'Block Library' } ) + .getByRole( 'region', { name: 'Block Inserter' } ) .getByRole( 'searchbox', { name: 'Search for blocks and patterns', } ) @@ -634,7 +634,7 @@ test.describe( 'Inserting blocks (@firefox, @webkit)', () => { .fill( 'More' ); await expect( page.getByRole( 'region', { - name: 'Block Library', + name: 'Block Inserter', } ) ).toBeVisible(); } ); diff --git a/test/e2e/specs/site-editor/site-editor-inserter.spec.js b/test/e2e/specs/site-editor/site-editor-inserter.spec.js index 5d5a8f9afba5fd..75ee0b9cf02312 100644 --- a/test/e2e/specs/site-editor/site-editor-inserter.spec.js +++ b/test/e2e/specs/site-editor/site-editor-inserter.spec.js @@ -50,7 +50,7 @@ test.describe( 'Site Editor Inserter', () => { name: 'Block Inserter', } ); const blockLibrary = page.getByRole( 'region', { - name: 'Block Library', + name: 'Block Inserter', } ); const beforeBlocks = await editor.getBlocks(); diff --git a/test/e2e/specs/widgets/editing-widgets.spec.js b/test/e2e/specs/widgets/editing-widgets.spec.js index 492f35d30b4ddd..2aac05e8ac3963 100644 --- a/test/e2e/specs/widgets/editing-widgets.spec.js +++ b/test/e2e/specs/widgets/editing-widgets.spec.js @@ -59,7 +59,7 @@ test.describe( 'Widgets screen', () => { .getByRole( 'button', { name: 'Block Inserter' } ) .click(); const blockLibrary = page.getByRole( 'region', { - name: 'Block Library', + name: 'Block Inserter', } ); await expect( @@ -693,7 +693,7 @@ class WidgetsScreen { */ getBlockInGlobalInserter = async ( blockName ) => { const blockLibrary = this.#page.getByRole( 'region', { - name: 'Block Library', + name: 'Block Inserter', } ); if ( await blockLibrary.isHidden() ) { await this.#page