Skip to content

Commit

Permalink
Drop some duplicated assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuruog committed Jul 30, 2020
1 parent 6463d44 commit cd9f72c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/client/rsg-components/Tooltip/Tooltip.spec.tsx
Expand Up @@ -16,11 +16,6 @@ describe('Tooltip', () => {
expect(container).toContainElement(getByTestId('child'));
});

test('should the child component be wrapped by "role=button" element', () => {
const { getByTestId } = renderComponent();
expect(getByTestId('child').closest('span')).toHaveAttribute('role', 'button');
});

test('should render content in the tooltop body', () => {
const { container, getByRole } = renderComponent();
fireEvent.focus(getByRole('button'));
Expand All @@ -33,7 +28,6 @@ describe('Tooltip', () => {
await waitFor(() =>
expect(container.querySelector('[data-state="visible"]')).toBeInTheDocument()
);
expect(container.querySelector('[data-state]')).toHaveAttribute('data-state', 'visible');
});

test('should show the tooltip by click', async () => {
Expand All @@ -42,7 +36,6 @@ describe('Tooltip', () => {
await waitFor(() =>
expect(container.querySelector('[data-state="visible"]')).toBeInTheDocument()
);
expect(container.querySelector('[data-state]')).toHaveAttribute('data-state', 'visible');
});

test('should show the tooltip by mouse enter', async () => {
Expand All @@ -51,7 +44,6 @@ describe('Tooltip', () => {
await waitFor(() =>
expect(container.querySelector('[data-state="visible"]')).toBeInTheDocument()
);
expect(container.querySelector('[data-state]')).toHaveAttribute('data-state', 'visible');
});

describe.each([['top'], ['right'], ['left'], ['bottom']])(
Expand Down

0 comments on commit cd9f72c

Please sign in to comment.