Skip to content

Commit

Permalink
test(definitiontooltip): definitiontooltip tests
Browse files Browse the repository at this point in the history
* remove duplicate test case
  • Loading branch information
Neues committed Oct 11, 2024
1 parent eaefc08 commit fe4d4df
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@ describe('DefinitionTooltip', () => {
expect(screen.getByRole('button')).toHaveAttribute('aria-expanded', 'true');
});

it('should control tooltip display when using keyboard event', async () => {
const definition = 'Uniform Resource Locator';
render(<DefinitionTooltip definition={definition}>URL</DefinitionTooltip>);
expect(screen.getByRole('button')).toHaveAttribute(
'aria-expanded',
'false'
);
await userEvent.tab();
expect(screen.getByRole('button')).toHaveAttribute('aria-expanded', 'true');
await userEvent.tab();
expect(screen.getByRole('button')).toHaveAttribute(
'aria-expanded',
'false'
);
});

it('should have a visible tooltip if `defaultOpen` is set to true', () => {
const definition = 'test-definition';
render(
Expand Down

0 comments on commit fe4d4df

Please sign in to comment.