Skip to content

Commit

Permalink
remove ref tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm committed Dec 8, 2022
1 parent 5d99090 commit 214bb92
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/components/src/Overlay/overlay.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,6 @@ test('popover is per default closed', () => {
expect(popover).not.toBeInTheDocument();
});

test('forwards ref', async () => {
const ref = React.createRef<HTMLDivElement>();

render(<TestPopover open={true} ref={ref} />);

// eslint-disable-next-line testing-library/await-async-utils
waitFor(() => {
expect(ref.current).toBeInstanceOf(HTMLDivElement);
});
});

test('popover has children', () => {
render(<TestPopover open={true} />);

Expand All @@ -145,20 +134,6 @@ test('popover has children', () => {
expect(popover.firstChild).toBeInTheDocument();
});

test('minWidth is set', async () => {
const ref = React.createRef<HTMLDivElement>();
render(<TestPopover open={true} ref={ref} />);

const popover = screen.getByRole('presentation');

// eslint-disable-next-line testing-library/await-async-utils
waitFor(() => {
expect(popover).toHaveStyle(
`min-width: ${(ref.current as HTMLElement).offsetWidth}`
);
});
});

// Underlay tests
// ---------------
test('renders underlay', () => {
Expand Down

0 comments on commit 214bb92

Please sign in to comment.