Skip to content

Commit

Permalink
Iterate on warning text for block removal for query/post template/pos…
Browse files Browse the repository at this point in the history
…t content (#58138)

* Iterate on warning text for block removal for query/post template/post content

Addresses continued feedback on #52392

* Adjust string

* Update block-removal.spec.js

* Update e2e test

* Give the modal a max-width to be consistent with block lock modal

* Use modal size prop

---------

Co-authored-by: Rich Tabor <[email protected]>
Co-authored-by: Andrew Serong <[email protected]>
  • Loading branch information
3 people committed Jan 23, 2024
1 parent 986ad30 commit 291ffb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ export function BlockRemovalWarningModal( { rules } ) {
<Modal
title={ __( 'Be careful!' ) }
onRequestClose={ clearBlockRemovalPrompt }
size="medium"
>
<p>
{ _n(
'Post or page content will not be displayed if you delete this block.',
'Post or page content will not be displayed if you delete these blocks.',
'Deleting this block will stop your post or page content from displaying on this template. It is not recommended.',
'Deleting these blocks will stop your post or page content from displaying on this template. It is not recommended.',
blockNamesForPrompt.length
) }
</p>
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/site-editor/block-removal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test.describe( 'Site editor block removal prompt', () => {
// Expect the block removal prompt to have appeared
await expect(
page.getByText(
'Post or page content will not be displayed if you delete these blocks.'
'Deleting these blocks will stop your post or page content from displaying on this template. It is not recommended.'
)
).toBeVisible();
} );
Expand All @@ -59,7 +59,7 @@ test.describe( 'Site editor block removal prompt', () => {
// Expect the block removal prompt to have appeared
await expect(
page.getByText(
'Post or page content will not be displayed if you delete this block.'
'Deleting this block will stop your post or page content from displaying on this template. It is not recommended.'
)
).toBeVisible();
} );
Expand Down

0 comments on commit 291ffb9

Please sign in to comment.