Skip to content

Commit

Permalink
Remove test for emptying control
Browse files Browse the repository at this point in the history
This will be covered by the new test in the NumberControl PR fixing that bug. Once both PRs land a new one can be created updating the use of the BoxControl's unit and number controls adding required tests then.
  • Loading branch information
aaronrobertshaw committed Jul 27, 2021
1 parent 217a17e commit b84ecb0
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions packages/components/src/box-control/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,31 +278,5 @@ describe( 'BoxControl', () => {
left: undefined,
} );
} );

it( 'should clear side attribute when control is cleared', () => {
let state = {
top: '1em',
right: '1em',
bottom: '1em',
left: '1em',
};
const setState = jest.fn( ( newState ) => ( state = newState ) );

render( <BoxControl values={ state } onChange={ setState } /> );

const input = screen.getByLabelText( 'Box Control', {
selector: 'input',
} );
input.focus();
fireEvent.change( input, { target: { value: '' } } );
fireEvent.keyDown( input, { keyCode: ENTER } );

expect( setState ).toHaveBeenCalledWith( {
top: undefined,
right: undefined,
bottom: undefined,
left: undefined,
} );
} );
} );
} );

0 comments on commit b84ecb0

Please sign in to comment.