diff --git a/src/components/adslot-ui/ButtonGroup/index.spec.jsx b/src/components/adslot-ui/ButtonGroup/index.spec.jsx index a8ffd6f0c..4d174fa7f 100644 --- a/src/components/adslot-ui/ButtonGroup/index.spec.jsx +++ b/src/components/adslot-ui/ButtonGroup/index.spec.jsx @@ -12,6 +12,7 @@ describe('ButtonGroupComponent', () => { ); expect(wrapper.find(ButtonGroup)).to.have.length(1); + expect(wrapper.find(Button)).to.have.length(2); }); it('should override child Button style', () => { @@ -81,5 +82,19 @@ describe('ButtonGroupComponent', () => { ); expect(wrapper.find(ButtonGroup)).to.have.length(1); + expect(wrapper.find(Button)).to.have.length(0); + }); + + it('should apply dts to button group', () => { + const wrapper = mount( + + + + + ); + console.log(wrapper.debug()); + expect(wrapper.find("[data-test-selector='button-group']")).to.have.length(1); + expect(wrapper.find(Button).find("[data-test-selector='button-test-1']")).to.have.length(1); + expect(wrapper.find(Button).find("[data-test-selector='bbutton-test-2']")).to.have.length(1); }); }); diff --git a/src/components/third-party/Button/index.spec.jsx b/src/components/third-party/Button/index.spec.jsx index dc31c226d..e062ca673 100644 --- a/src/components/third-party/Button/index.spec.jsx +++ b/src/components/third-party/Button/index.spec.jsx @@ -8,6 +8,10 @@ describe('ButtonComponent', () => { it('should render Bootstrap Button', () => { const wrapper = shallow(); expect(wrapper.find(BootstrapButton)).to.have.length(1); + expect(wrapper.prop('className')).to.equal('button-component'); + expect(wrapper.find(Spinner)).to.have.length(0); + wrapper.simulate('mouseOver'); + expect(wrapper.find(Popover)).to.have.length(0); }); it('should pass through Bootstrap Button props', () => { diff --git a/www/examples/ButtonGroupExample.jsx b/www/examples/ButtonGroupExample.jsx index 485c1cfba..f6d4425d5 100644 --- a/www/examples/ButtonGroupExample.jsx +++ b/www/examples/ButtonGroupExample.jsx @@ -42,8 +42,8 @@ class ButtonGroupExample extends React.PureComponent { - - + +