Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
shimotmk committed Feb 7, 2025
1 parent 6a656af commit d8c9b0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/components/src/border-control/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ describe( 'BorderControl', () => {
const solidButton = getButton( 'Solid' );
const dashedButton = getButton( 'Dashed' );
const dottedButton = getButton( 'Dotted' );
const resetButton = getButton( 'Reset' );
const clearButton = getButton( 'Clear' );

expect( customColorPicker ).toBeInTheDocument();
expect( colorSwatchButtons.length ).toEqual( colors.length );
expect( styleLabel ).toBeInTheDocument();
expect( solidButton ).toBeInTheDocument();
expect( dashedButton ).toBeInTheDocument();
expect( dottedButton ).toBeInTheDocument();
expect( resetButton ).toBeInTheDocument();
expect( clearButton ).toBeInTheDocument();
} );

it( 'should not render style options when opted out of', async () => {
Expand Down Expand Up @@ -350,12 +350,12 @@ describe( 'BorderControl', () => {
expect( props.onChange ).not.toHaveBeenCalled();
} );

it( 'should reset color and style only when popover reset button clicked', async () => {
it( 'should clear color and style only when popover clear button clicked', async () => {
const user = userEvent.setup();
const props = createProps();
render( <BorderControl { ...props } /> );
await openPopover( user );
await user.click( getButton( 'Reset' ) );
await user.click( getButton( 'Clear' ) );

expect( props.onChange ).toHaveBeenNthCalledWith( 1, {
color: undefined,
Expand Down

0 comments on commit d8c9b0a

Please sign in to comment.