Skip to content

Commit

Permalink
E2E: Add regression test for spacer block in themes without spacing u…
Browse files Browse the repository at this point in the history
…nits
  • Loading branch information
himanshupathak95 committed Jan 28, 2025
1 parent 0a26fe6 commit 4ef7899
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/e2e/specs/editor/blocks/spacer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,21 @@ test.describe( 'Spacer', () => {
)
).toBeFocused();
} );

test( 'should work in theme without spacing units support', async ( {
admin,
editor,
requestUtils,
} ) => {
await requestUtils.activateTheme( 'twentytwenty' );

await admin.createNewPost();
await editor.insertBlock( { name: 'core/spacer' } );

await expect(
editor.canvas.locator( '.block-editor-warning' )
).toHaveCount( 0 );

await requestUtils.activateTheme( 'twentytwentyone' );
} );
} );

0 comments on commit 4ef7899

Please sign in to comment.