Skip to content

Commit

Permalink
Inserter is empty not disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 21, 2023
1 parent c663917 commit 3d79772
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions test/e2e/specs/editor/plugins/post-type-locking.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ test.describe( 'Post-type locking', () => {
await admin.createNewPost( { postType: 'locked-all-post' } );
} );

test( 'should disable the inserter', async ( { page } ) => {
await expect(
page
.getByRole( 'toolbar', { name: 'Document tools' } )
.getByRole( 'button', { name: 'Toggle block inserter' } )
).toBeDisabled();
} );

test( 'should not allow blocks to be removed', async ( {
editor,
page,
Expand Down Expand Up @@ -147,46 +139,13 @@ test.describe( 'Post-type locking', () => {
'The content of your post doesn’t match the template assigned to your post type.'
);
} );

test( 'should not allow blocks to be inserted in inner blocks', async ( {
editor,
page,
} ) => {
await editor.canvas
.getByRole( 'button', {
name: 'Two columns; equal split',
} )
.click();

await expect(
page
.getByRole( 'document', {
name: 'Block: Column (1 of 2)',
} )
.getByRole( 'button', { name: 'Add block' } )
).toBeHidden();

await expect(
page
.getByRole( 'toolbar', { name: 'Document tools' } )
.getByRole( 'button', { name: 'Toggle block inserter' } )
).toBeDisabled();
} );
} );

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

test( 'should disable the inserter', async ( { page } ) => {
await expect(
page
.getByRole( 'toolbar', { name: 'Document tools' } )
.getByRole( 'button', { name: 'Toggle block inserter' } )
).toBeDisabled();
} );

test( 'should not allow blocks to be removed', async ( {
editor,
page,
Expand Down

0 comments on commit 3d79772

Please sign in to comment.