Skip to content

Commit

Permalink
[@mantine/core] Timeline: Fix broken tests after migration to data-* …
Browse files Browse the repository at this point in the history
…attributes
  • Loading branch information
rtivital committed Jul 20, 2022
1 parent 327868c commit 17ee007
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/mantine-core/src/components/Timeline/Timeline.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ describe('@mantine/core/Timeline', () => {
const { container: secondActive } = render(<Timeline {...defaultProps} active={1} />);
const { container: thirdActive } = render(<Timeline {...defaultProps} active={2} />);

expect(secondActive.querySelectorAll('.mantine-Timeline-itemActive')).toHaveLength(2);
expect(secondActive.querySelectorAll('.mantine-Timeline-itemLineActive')).toHaveLength(1);
expect(secondActive.querySelectorAll('.mantine-Timeline-item[data-active]')).toHaveLength(2);
expect(secondActive.querySelectorAll('.mantine-Timeline-item[data-line-active]')).toHaveLength(
1
);

expect(thirdActive.querySelectorAll('.mantine-Timeline-itemActive')).toHaveLength(3);
expect(thirdActive.querySelectorAll('.mantine-Timeline-itemLineActive')).toHaveLength(2);
expect(thirdActive.querySelectorAll('.mantine-Timeline-item[data-active]')).toHaveLength(3);
expect(thirdActive.querySelectorAll('.mantine-Timeline-item[data-line-active]')).toHaveLength(
2
);
});

it('exposes TimelineItem as Timeline.Item', () => {
Expand Down

0 comments on commit 17ee007

Please sign in to comment.