From 40ef8983b444cfd28df2a03f637a209561d91486 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 31 May 2023 06:51:01 +0400 Subject: [PATCH] Block Toolbar: Update the 'Unlock' button label (#51083) * Block Toolbar: Update the 'Unlock' button label * Update e2e test locator --- .../block-editor/src/components/block-lock/toolbar.js | 10 ++-------- test/e2e/specs/editor/various/block-locking.spec.js | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/components/block-lock/toolbar.js b/packages/block-editor/src/components/block-lock/toolbar.js index 99080ff38134d3..d0a9d3d8bf3d3d 100644 --- a/packages/block-editor/src/components/block-lock/toolbar.js +++ b/packages/block-editor/src/components/block-lock/toolbar.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { __, sprintf } from '@wordpress/i18n'; +import { __ } from '@wordpress/i18n'; import { ToolbarButton, ToolbarGroup } from '@wordpress/components'; import { useReducer } from '@wordpress/element'; import { lock } from '@wordpress/icons'; @@ -11,10 +11,8 @@ import { lock } from '@wordpress/icons'; */ import BlockLockModal from './modal'; import useBlockLock from './use-block-lock'; -import useBlockDisplayInformation from '../use-block-display-information'; export default function BlockLockToolbar( { clientId } ) { - const blockInformation = useBlockDisplayInformation( clientId ); const { canEdit, canMove, canRemove, canLock } = useBlockLock( clientId ); const [ isModalOpen, toggleModal ] = useReducer( @@ -35,11 +33,7 @@ export default function BlockLockToolbar( { clientId } ) { diff --git a/test/e2e/specs/editor/various/block-locking.spec.js b/test/e2e/specs/editor/various/block-locking.spec.js index 2e977690a1708d..2c0a9d3f0bf565 100644 --- a/test/e2e/specs/editor/various/block-locking.spec.js +++ b/test/e2e/specs/editor/various/block-locking.spec.js @@ -73,7 +73,7 @@ test.describe( 'Block Locking', () => { await page.click( 'role=checkbox[name="Lock all"]' ); await page.click( 'role=button[name="Apply"]' ); - await editor.clickBlockToolbarButton( 'Unlock Paragraph' ); + await editor.clickBlockToolbarButton( 'Unlock' ); await page.click( 'role=checkbox[name="Lock all"]' ); await page.click( 'role=button[name="Apply"]' );