Skip to content

Commit

Permalink
Change more occurrencs of Block Library to Block Inserter.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed May 9, 2024
1 parent fd8cc54 commit 6156a91
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions docs/contributors/code/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' } )
```

Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function Layout( { initialPost } ) {

const secondarySidebarLabel = isListViewOpened
? __( 'Document Overview' )
: __( 'Block Library' );
: __( 'Block Inserter' );

const secondarySidebar = () => {
if ( mode === 'visual' && isInserterOpened ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-widgets/src/components/layout/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function Interface( { blockEditorSettings } ) {

const secondarySidebarLabel = isListViewOpened
? __( 'List View' )
: __( 'Block Library' );
: __( 'Block Inserter' );

const hasSecondarySidebar = isListViewOpened || isInserterOpened;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/editor/blocks/image.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ test.describe( 'Image', () => {
name: 'Block: Image',
} );
const blockLibrary = page.getByRole( 'region', {
name: 'Block Library',
name: 'Block Inserter',
} );

async function openMediaTab() {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/specs/editor/various/inserting-blocks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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',
} )
Expand Down Expand Up @@ -634,7 +634,7 @@ test.describe( 'Inserting blocks (@firefox, @webkit)', () => {
.fill( 'More' );
await expect(
page.getByRole( 'region', {
name: 'Block Library',
name: 'Block Inserter',
} )
).toBeVisible();
} );
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/site-editor/site-editor-inserter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/widgets/editing-widgets.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6156a91

Please sign in to comment.