mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 04:13:13 +08:00
chore: update test cases of Spin (#34695)
This commit is contained in:
parent
5e0c232077
commit
be18ea659b
@ -1,16 +1,9 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Spin if indicator set null should not be render default indicator 1`] = `
|
exports[`Spin if indicator set null should not be render default indicator 1`] = `
|
||||||
<Spin
|
<div
|
||||||
indicator={null}
|
class="ant-spin ant-spin-spinning"
|
||||||
size="default"
|
/>
|
||||||
spinning={true}
|
|
||||||
wrapperClassName=""
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="ant-spin ant-spin-spinning"
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Spin rtl render component should be rendered correctly in RTL direction 1`] = `
|
exports[`Spin rtl render component should be rendered correctly in RTL direction 1`] = `
|
||||||
@ -47,17 +40,11 @@ exports[`Spin should render custom indicator when it's set 1`] = `
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Spin should support static method Spin.setDefaultIndicator 1`] = `
|
exports[`Spin should support static method Spin.setDefaultIndicator 1`] = `
|
||||||
<Spin
|
<div
|
||||||
size="default"
|
class="ant-spin ant-spin-spinning"
|
||||||
spinning={true}
|
|
||||||
wrapperClassName=""
|
|
||||||
>
|
>
|
||||||
<div
|
<em
|
||||||
className="ant-spin ant-spin-spinning"
|
class="custom-spinner ant-spin-dot"
|
||||||
>
|
/>
|
||||||
<em
|
</div>
|
||||||
className="custom-spinner ant-spin-dot"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Spin>
|
|
||||||
`;
|
`;
|
||||||
|
@ -33,13 +33,13 @@ describe('Spin', () => {
|
|||||||
|
|
||||||
it('if indicator set null should not be render default indicator', () => {
|
it('if indicator set null should not be render default indicator', () => {
|
||||||
const wrapper = mount(<Spin indicator={null} />);
|
const wrapper = mount(<Spin indicator={null} />);
|
||||||
expect(wrapper).toMatchSnapshot();
|
expect(wrapper.render()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support static method Spin.setDefaultIndicator', () => {
|
it('should support static method Spin.setDefaultIndicator', () => {
|
||||||
Spin.setDefaultIndicator(<em className="custom-spinner" />);
|
Spin.setDefaultIndicator(<em className="custom-spinner" />);
|
||||||
const wrapper = mount(<Spin />);
|
const wrapper = mount(<Spin />);
|
||||||
expect(wrapper).toMatchSnapshot();
|
expect(wrapper.render()).toMatchSnapshot();
|
||||||
Spin.setDefaultIndicator(null);
|
Spin.setDefaultIndicator(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user