Skip to content

Commit

Permalink
test: Add test case (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Nov 17, 2020
1 parent d1ca569 commit d98a6bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ If `accordion` is true, only one panel can be open. Opening another panel will
<td>openMotion</td>
<td>object</td>
<th></th>
<td>set the animation of open behavior, [more](https://github.com/react-component/motion)</td>
<td>set the animation of open behavior, [more](https://github.com/react-component/motion). Different with v2, closed pane use a `rc-collapse-content-hidden` class to set `display: none` for hidden.</td>
</tr>
<tr>
<td>disabled</td>
Expand Down
1 change: 1 addition & 0 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class CollapsePanel extends React.Component<CollapsePanelProps, any> {
</div>
<CSSMotion
visible={isActive}
leavedClassName={`${prefixCls}-content-hidden`}
{...openMotion}
forceRender={forceRender}
removeOnLeave={destroyInactivePanel}
Expand Down
1 change: 1 addition & 0 deletions tests/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ describe('collapse', () => {
);
expect(collapse.find('.rc-collapse-content').length).toBe(1);
expect(collapse.find('.rc-collapse-content-active').length).toBe(0);
expect(collapse.find('div.rc-collapse-content-hidden').length).toBe(1);
});
});

Expand Down

1 comment on commit d98a6bd

@vercel
Copy link

@vercel vercel bot commented on d98a6bd Nov 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.