Skip to content

Commit

Permalink
Remove unnecessary test, fix related test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Feb 5, 2024
1 parent c667abe commit 073ae19
Showing 1 changed file with 5 additions and 35 deletions.
40 changes: 5 additions & 35 deletions test/e2e/specs/editor/various/multi-block-selection.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ test.describe( 'Multi-block selection', () => {
pageUtils,
multiBlockSelectionUtils,
} ) => {
for ( let i = 1; i <= 2; i += 1 ) {
for ( let i = 1; i <= 3; i += 1 ) {
await editor.insertBlock( {
name: 'core/paragraph',
attributes: { content: `${ i }` },
Expand All @@ -232,14 +232,13 @@ test.describe( 'Multi-block selection', () => {

await expect
.poll( multiBlockSelectionUtils.getSelectedFlatIndices )
.toEqual( [ 1, 2 ] );
.toEqual( [ 1, 2, 3 ] );

await page.keyboard.press( 'Escape' );

// FIXME: This doesn't seem to work anymore.
// await expect
// .poll( multiBlockSelectionUtils.getSelectedFlatIndices )
// .toEqual( [] );
await expect
.poll( multiBlockSelectionUtils.getSelectedFlatIndices )
.toEqual( [ 1 ] );
} );

test( 'should select with shift + click', async ( {
Expand Down Expand Up @@ -877,35 +876,6 @@ test.describe( 'Multi-block selection', () => {
] );
} );

test( 'should select all from empty selection', async ( {
page,
editor,
pageUtils,
multiBlockSelectionUtils,
} ) => {
for ( let i = 1; i <= 2; i += 1 ) {
await editor.insertBlock( {
name: 'core/paragraph',
attributes: { content: `${ i }` },
} );
}

// Clear the selected block.
await page.keyboard.press( 'Escape' );
await page.keyboard.press( 'Escape' );

await expect
.poll( multiBlockSelectionUtils.getSelectedBlocks )
.toEqual( [] );

await pageUtils.pressKeys( 'primary+a' );

await page.keyboard.press( 'Backspace' );

// Expect both paragraphs to be deleted.
await expect.poll( editor.getBlocks ).toEqual( [] );
} );

test( 'should select title if the cursor is on title', async ( {
editor,
pageUtils,
Expand Down

0 comments on commit 073ae19

Please sign in to comment.