diff --git a/packages/editor/src/components/post-template/swap-template-button.js b/packages/editor/src/components/post-template/swap-template-button.js index 008898a395ff27..f85b18e3559697 100644 --- a/packages/editor/src/components/post-template/swap-template-button.js +++ b/packages/editor/src/components/post-template/swap-template-button.js @@ -37,7 +37,7 @@ export default function SwapTemplateButton( { onClick } ) { return ( <> setShowModal( true ) }> - { __( 'Replace template' ) } + { __( 'Change template' ) } { showModal && ( - { __( 'Replace template' ) } + { __( 'Change template' ) } { // The default template in a post is indicated by an empty string diff --git a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js index 1ca31fb7817f20..b78a059a6be2c8 100644 --- a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js +++ b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js @@ -77,7 +77,7 @@ test.describe( 'Post Editor Template mode', () => { ).toBeVisible(); } ); - test( 'Replace templates and proper template resolution when switching to default template', async ( { + test( 'Change templates and proper template resolution when switching to default template', async ( { editor, page, requestUtils, @@ -88,10 +88,10 @@ test.describe( 'Post Editor Template mode', () => { await page.reload(); await postEditorTemplateMode.disableTemplateWelcomeGuide(); await postEditorTemplateMode.openTemplatePopover(); - // Replace to a custom template, save and reload. + // Change to a custom template, save and reload. await page .getByRole( 'menuitem', { - name: 'Replace template', + name: 'Change template', } ) .click(); await page @@ -101,7 +101,7 @@ test.describe( 'Post Editor Template mode', () => { .click(); await editor.saveDraft(); await page.reload(); - // Replace to the default template. + // Change to the default template. await postEditorTemplateMode.openTemplatePopover(); await page .getByRole( 'menuitem', { diff --git a/test/e2e/specs/site-editor/pages.spec.js b/test/e2e/specs/site-editor/pages.spec.js index 89284bb613abd7..54f8a64e067cbf 100644 --- a/test/e2e/specs/site-editor/pages.spec.js +++ b/test/e2e/specs/site-editor/pages.spec.js @@ -281,7 +281,7 @@ test.describe( 'Pages', () => { await templateOptionsButton.click(); await page .getByRole( 'menu', { name: 'Template options' } ) - .getByText( 'Replace template' ) + .getByText( 'Change template' ) .click(); const templateItem = page.locator( '.block-editor-block-patterns-list__item-title' @@ -305,7 +305,7 @@ test.describe( 'Pages', () => { await expect( templateOptionsButton ).toHaveText( 'Single Entries' ); } ); - test( 'replace template options should respect the declared `postTypes`', async ( { + test( 'change template options should respect the declared `postTypes`', async ( { page, editor, } ) => { @@ -321,7 +321,7 @@ test.describe( 'Pages', () => { await expect( page .getByRole( 'menu', { name: 'Template options' } ) - .getByText( 'Replace template' ) + .getByText( 'Change template' ) ).toHaveCount( 0 ); } ); } ); diff --git a/test/e2e/specs/site-editor/template-registration.spec.js b/test/e2e/specs/site-editor/template-registration.spec.js index d17652fc13b1c4..9856db97130386 100644 --- a/test/e2e/specs/site-editor/template-registration.spec.js +++ b/test/e2e/specs/site-editor/template-registration.spec.js @@ -94,7 +94,7 @@ test.describe( 'Block template registration', () => { ).toBeHidden(); } ); - test( 'registered templates are available in the Replace template screen', async ( { + test( 'registered templates are available in the Change template screen', async ( { admin, editor, page, @@ -106,12 +106,10 @@ test.describe( 'Block template registration', () => { attributes: { content: 'User-created post.' }, } ); - // Replace template. + // Change template. await page.getByRole( 'button', { name: 'Post', exact: true } ).click(); await page.getByRole( 'button', { name: 'Template options' } ).click(); - await page - .getByRole( 'menuitem', { name: 'Replace template' } ) - .click(); + await page.getByRole( 'menuitem', { name: 'Change template' } ).click(); await page.getByText( 'Plugin Template' ).click(); // Verify the template is applied. @@ -135,12 +133,10 @@ test.describe( 'Block template registration', () => { attributes: { content: 'User-created post.' }, } ); - // Replace template. + // Change template. await page.getByRole( 'button', { name: 'Post', exact: true } ).click(); await page.getByRole( 'button', { name: 'Template options' } ).click(); - await page - .getByRole( 'menuitem', { name: 'Replace template' } ) - .click(); + await page.getByRole( 'menuitem', { name: 'Change template' } ).click(); await page.getByText( 'Custom', { exact: true } ).click(); // Verify the theme template is applied.