From fb5305d4c646f983c3f0edab3ac6e14ab49fe110 Mon Sep 17 00:00:00 2001 From: "@linhf2023" <32009993+any1024@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:41:47 +0800 Subject: [PATCH] fix(TimeLine): Correct className (#40700) Co-authored-by: WB780012 --- components/timeline/TimelineItemList.tsx | 1 - components/timeline/__tests__/index.test.tsx | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/timeline/TimelineItemList.tsx b/components/timeline/TimelineItemList.tsx index 51d133783e..aa19319102 100644 --- a/components/timeline/TimelineItemList.tsx +++ b/components/timeline/TimelineItemList.tsx @@ -55,7 +55,6 @@ const TimelineItemList: React.FC { expect(container.querySelector('.ant-timeline-item-label')).toHaveTextContent(label); }); + it('TimeLine className should correctly', () => { + const { container } = renderFactory({ className: 'timelineBox' }); + + expect(container.querySelector('.ant-timeline')).toHaveClass('timelineBox'); + + expect(container.querySelectorAll('li.ant-timeline-item')[0]).not.toHaveClass('timelineBox'); + }); + describe('prop: color', () => { const presetColors = ['blue', 'red', 'green', 'gray'];