Skip to content

Commit

Permalink
E2E: Add test for columns block template lock removal restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshupathak95 committed Feb 7, 2025
1 parent e850c68 commit 82c440d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/e2e/specs/editor/plugins/post-type-locking.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,27 @@ test.describe( 'Post-type locking', () => {
).toBeHidden();
} );
} );

test.describe( 'template_lock for columns block', () => {
test.beforeEach( async ( { admin } ) => {
await admin.createNewPost( { postType: 'locked-all-post' } );
} );

test( 'should not allow changing number of columns or column operations', async ( {
editor,
page,
} ) => {
const columnsBlock = editor.canvas.getByRole( 'document', {
name: 'Block: Columns',
} );
await columnsBlock.click();

await editor.clickBlockToolbarButton( 'Options' );
await expect(
page
.getByRole( 'menu', { name: 'Options' } )
.getByRole( 'menuitem', { name: 'Delete' } )
).toBeHidden();
} );
} );
} );

0 comments on commit 82c440d

Please sign in to comment.