Revision 901fe896
Added by Ondřej Pražák over 7 years ago
webpack/assets/javascripts/react_app/components/common/Loader.test.js | ||
---|---|---|
import Loader from './Loader';
|
||
import {STATUS} from '../../constants';
|
||
|
||
function setup(status) {
|
||
function setup(status, spinnerSize) {
|
||
const props = {
|
||
status: status
|
||
status: status,
|
||
spinnerSize: spinnerSize
|
||
};
|
||
|
||
return shallow(<Loader {...props}>
|
||
... | ... | |
expect(wrapper.children().equals(<div className="spinner spinner-lg"></div>)).toBe(true);
|
||
});
|
||
|
||
it('pending-different-spinner', () => {
|
||
const wrapper = setup(STATUS.PENDING, 'xs');
|
||
|
||
expect(wrapper.children().length).toBe(1);
|
||
expect(wrapper.children().equals(<div className="spinner spinner-xs"></div>)).toBe(true);
|
||
});
|
||
|
||
it('default case', () => {
|
||
const wrapper = mount(<Loader>
|
||
</Loader>);
|
Also available in: Unified diff
Fixes #14688 - Power status visible on hosts index page