import React from 'react'; import renderWithTheme from '../../../testUtils/renderWithTheme'; import { IconWrapper, StyledIcon, SpinningIconWrapper, SpinningIcon, } from '../StyledIcon'; describe('IconWrapper', () => { it.each` color ${'inherit'} ${'text'} ${'subdued-text'} ${'disabled-text'} ${'primary'} ${'info'} ${'danger'} ${'warning'} ${'success'} ${'error'} `('has $color color style', ({ color }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); it.each` size ${'inherit'} ${'xsmall'} ${'small'} ${'medium'} ${'large'} ${'xlarge'} `('has $size size style', ({ size }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('StyledIcon', () => { it.each` color ${'inherit'} ${'text'} ${'subdued-text'} ${'disabled-text'} ${'primary'} ${'info'} ${'danger'} ${'warning'} ${'success'} ${'error'} `('has $color color style', ({ color }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); it.each` size ${'inherit'} ${'xsmall'} ${'small'} ${'medium'} ${'large'} ${'xlarge'} `('has $size size style', ({ size }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('SpinningIconWrapper', () => { it.each` color ${'inherit'} ${'text'} ${'subdued-text'} ${'primary'} ${'danger'} ${'warning'} ${'success'} ${'error'} `('has $color color style', ({ color }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); it.each` size ${'inherit'} ${'xsmall'} ${'small'} ${'medium'} ${'large'} ${'xlarge'} `('has $size size style', ({ size }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('SpinningIcon', () => { it.each` color ${'inherit'} ${'text'} ${'subdued-text'} ${'primary'} ${'danger'} ${'warning'} ${'success'} ${'error'} `('has $color color style', ({ color }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); it.each` size ${'inherit'} ${'xsmall'} ${'small'} ${'medium'} ${'large'} ${'xlarge'} `('has $size size style', ({ size }) => { const { container } = renderWithTheme( ); expect(container.firstChild).toMatchSnapshot(); }); });