0
0
Fork 0

Replace inline styles with stylesheet (#3115)

This commit is contained in:
Yamagishi Kazutoshi 2017-05-19 18:42:54 +09:00 committed by Eugen Rochko
parent 550863198c
commit b8b7b506a2
13 changed files with 122 additions and 55 deletions

View file

@ -51,14 +51,12 @@ describe('<Button />', () => {
it('renders style="display: block; width: 100%;" if props.block given', () => {
const wrapper = shallow(<Button block />);
expect(wrapper.find('button')).to.have.style('display', 'block');
expect(wrapper.find('button')).to.have.style('width', '100%');
expect(wrapper.find('button')).to.have.className('button--block');
});
it('renders style="display: inline-block; width: auto;" by default', () => {
const wrapper = shallow(<Button />);
expect(wrapper.find('button')).to.have.style('display', 'inline-block');
expect(wrapper.find('button')).to.have.style('width', 'auto');
expect(wrapper.find('button')).to.not.have.className('button--block');
});
it('adds class "button-secondary" if props.secondary given', () => {