Skip to content

Unskip resizing test after bugfix #3326

@swissspidy

Description

@swissspidy

Since #3199 got resolved with #3259, we need to unskip the relevant e2e test for it:

// TODO: unskip when this actually works. Currently non-fit text blocks can't be resized smaller, only larger.
// reported in #3199
// eslint-disable-next-line jest/no-disabled-tests
it.skip( 'should not resize smaller than the set minimum width and height', async () => {
let dimensions;
const resizableHandleBottom = await page.$( '.wp-block.is-selected .components-resizable-box__handle-bottom' );
await dragAndResize( resizableHandleBottom, { x: 0, y: -250 } );
dimensions = await getSelectedBlockDimensions();
expect( dimensions.height ).toStrictEqual( textBlockMinHeight );
const resizableHandleTop = await page.$( '.wp-block.is-selected .components-resizable-box__handle-top' );
await dragAndResize( resizableHandleTop, { x: 0, y: 250 } );
dimensions = await getSelectedBlockDimensions();
expect( dimensions.height ).toStrictEqual( textBlockMinHeight );
const resizableHandleLeft = await page.$( '.wp-block.is-selected .components-resizable-box__handle-left' );
await dragAndResize( resizableHandleLeft, { x: 300, y: 0 } );
dimensions = await getSelectedBlockDimensions();
expect( dimensions.width ).toStrictEqual( textBlockMinWidth );
const resizableHandleRight = await page.$( '.wp-block.is-selected .components-resizable-box__handle-right' );
await dragAndResize( resizableHandleRight, { x: -300, y: 0 } );
dimensions = await getSelectedBlockDimensions();
expect( dimensions.width ).toStrictEqual( textBlockMinWidth );
} );

In my quick test it actually didn't quite work out of the box, so perhaps the issue is not yet fully resolved.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions