Skip to content

Commit

Permalink
Check multi-block selection via data API
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart committed Feb 27, 2023
1 parent 4008b6f commit 9b27419
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/e2e/specs/editor/various/block-deletion.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,15 @@ test.describe( 'Block deletion', () => {

// Select the last two paragraphs.
await pageUtils.pressKeyWithModifier( 'shift', 'ArrowUp' );
await expect(
editor.canvas.locator( '.is-multi-selected' )
).toHaveCount( 2 );
await expect
.poll( () =>
page.evaluate( () =>
window.wp.data
.select( 'core/block-editor' )
.getMultiSelectedBlocks()
)
)
.toHaveLength( 2 );

// Hit backspace and ensure the last two paragraphs were deleted, and an
// empty block was created.
Expand Down

0 comments on commit 9b27419

Please sign in to comment.