diff --git a/src/components/adslot-ui/Accordion/index.jsx b/src/components/adslot-ui/Accordion/index.jsx index 6688e35ea..5104c5a58 100644 --- a/src/components/adslot-ui/Accordion/index.jsx +++ b/src/components/adslot-ui/Accordion/index.jsx @@ -15,6 +15,7 @@ class AccordionComponent extends React.PureComponent { static defaultProps = { maxExpand: 'max', + defaultActivePanelIds: [], }; state = { diff --git a/src/components/adslot-ui/Accordion/index.spec.jsx b/src/components/adslot-ui/Accordion/index.spec.jsx index 6b967598a..e907815cc 100644 --- a/src/components/adslot-ui/Accordion/index.spec.jsx +++ b/src/components/adslot-ui/Accordion/index.spec.jsx @@ -31,6 +31,17 @@ describe('AccordionComponent', () => { expect(cardElement.children()).to.have.length(1); }); + it('should have default props', () => { + const wrapper = shallow( + + {panel1.content} + + ); + const instance = wrapper.instance(); + expect(instance.props.defaultActivePanelIds).to.eql([]); + expect(instance.props.maxExpand).to.equal('max'); + }); + it('should render with props', () => { const wrapper = shallow(