Skip to content

Commit

Permalink
Test: Remove custom option selection test
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshupathak95 committed Feb 11, 2025
1 parent 7d6c0ac commit ab709c4
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions packages/components/src/font-size-picker/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ describe( 'FontSizePicker', () => {
}
);

commonSelectTests( fontSizes );
commonTests( fontSizes );
} );

Expand Down Expand Up @@ -325,7 +324,6 @@ describe( 'FontSizePicker', () => {
}
);

commonSelectTests( fontSizes );
commonTests( fontSizes );
} );

Expand Down Expand Up @@ -521,24 +519,6 @@ describe( 'FontSizePicker', () => {
);
}

function commonSelectTests( fontSizes: FontSize[] ) {
it( 'shows custom input when Custom is selected', async () => {
const user = userEvent.setup();
const onChange = jest.fn();
await render(
<FontSizePicker fontSizes={ fontSizes } onChange={ onChange } />
);
await user.click(
screen.getByRole( 'combobox', { name: 'Font size' } )
);
await user.click(
screen.getByRole( 'option', { name: 'Custom' } )
);
expect( screen.getByLabelText( 'Custom' ) ).toBeVisible();
expect( onChange ).not.toHaveBeenCalled();
} );
}

function commonTests( fontSizes: FontSize[] ) {
it( 'shows custom input when value is unknown', async () => {
await render(
Expand Down

0 comments on commit ab709c4

Please sign in to comment.