Skip to content

Commit

Permalink
Block Options: Use consistent capitalization on template parts and pa…
Browse files Browse the repository at this point in the history
…tterns (WordPress#51761)

* "Create Template part" to "Create template part"

* "Create a Pattern" to "Create pattern"

* Tests
  • Loading branch information
richtabor authored and sethrubenstein committed Jul 13, 2023
1 parent e4a093d commit c0acec4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/src/create-reusable-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const createReusableBlock = async ( content, title ) => {
await page.keyboard.type( content );

await clickBlockToolbarButton( 'Options' );
await clickMenuItem( 'Create a Pattern' );
await clickMenuItem( 'Create pattern' );
const nameInput = await page.waitForSelector(
reusableBlockNameInputSelector
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe( 'block editor keyboard shortcuts', () => {
} );
it( 'should prevent deleting multiple selected blocks from inputs', async () => {
await clickBlockToolbarButton( 'Options' );
await clickMenuItem( 'Create a Pattern' );
await clickMenuItem( 'Create pattern' );
const reusableBlockNameInputSelector =
'.reusable-blocks-menu-items__convert-modal .components-text-control__input';
const nameInput = await page.waitForSelector(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe( 'Reusable blocks', () => {

// Convert block to a reusable block.
await clickBlockToolbarButton( 'Options' );
await clickMenuItem( 'Create a Pattern' );
await clickMenuItem( 'Create pattern' );

// Set title.
const nameInput = await page.waitForSelector(
Expand Down Expand Up @@ -383,7 +383,7 @@ describe( 'Reusable blocks', () => {

// Convert to reusable.
await clickBlockToolbarButton( 'Options' );
await clickMenuItem( 'Create a Pattern' );
await clickMenuItem( 'Create pattern' );
const nameInput = await page.waitForSelector(
reusableBlockNameInputSelector
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function ConvertToTemplatePart( { clientIds, blocks } ) {
setIsModalOpen( true );
} }
>
{ __( 'Create Template part' ) }
{ __( 'Create template part' ) }
</MenuItem>
{ isModalOpen && (
<CreateTemplatePartModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ export default function ReusableBlockConvertButton( {
icon={ symbol }
onClick={ () => setIsModalOpen( true ) }
>
{ __( 'Create a Pattern' ) }
{ __( 'Create pattern' ) }
</MenuItem>
{ isModalOpen && (
<Modal
title={ __( 'Create a Pattern' ) }
title={ __( 'Create pattern' ) }
onRequestClose={ () => {
setIsModalOpen( false );
setTitle( '' );
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/site-editor/template-part.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ test.describe( 'Template Part', () => {
await editor.selectBlocks( paragraphBlock1, paragraphBlock2 );

// Convert block to a template part.
await editor.clickBlockOptionsMenuItem( 'Create Template part' );
await editor.clickBlockOptionsMenuItem( 'Create template part' );
await page.type( 'role=dialog >> role=textbox[name="Name"i]', 'Test' );
await page.keyboard.press( 'Enter' );

Expand Down

0 comments on commit c0acec4

Please sign in to comment.