fix(dnd): add isExtra prop to Option (#15080)

This commit is contained in:
Ville Brofeldt
2021-06-10 12:13:20 +03:00
committed by GitHub
parent 834bb9409d
commit 65714cc201
5 changed files with 37 additions and 2 deletions

View File

@@ -44,6 +44,17 @@ test('renders with caret', () => {
expect(screen.getByRole('img', { name: 'caret-right' })).toBeInTheDocument();
});
test('renders with extra triangle', () => {
render(
<Option index={1} clickClose={jest.fn()} isExtra>
Option
</Option>,
);
expect(
screen.getByRole('button', { name: 'Show info tooltip' }),
).toBeInTheDocument();
});
test('triggers onClose', () => {
const clickClose = jest.fn();
render(