mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +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
|
||||
|
||||
exports[`Spin if indicator set null should not be render default indicator 1`] = `
|
||||
<Spin
|
||||
indicator={null}
|
||||
size="default"
|
||||
spinning={true}
|
||||
wrapperClassName=""
|
||||
>
|
||||
<div
|
||||
className="ant-spin ant-spin-spinning"
|
||||
/>
|
||||
</Spin>
|
||||
<div
|
||||
class="ant-spin ant-spin-spinning"
|
||||
/>
|
||||
`;
|
||||
|
||||
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`] = `
|
||||
<Spin
|
||||
size="default"
|
||||
spinning={true}
|
||||
wrapperClassName=""
|
||||
<div
|
||||
class="ant-spin ant-spin-spinning"
|
||||
>
|
||||
<div
|
||||
className="ant-spin ant-spin-spinning"
|
||||
>
|
||||
<em
|
||||
className="custom-spinner ant-spin-dot"
|
||||
/>
|
||||
</div>
|
||||
</Spin>
|
||||
<em
|
||||
class="custom-spinner ant-spin-dot"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
@ -33,13 +33,13 @@ describe('Spin', () => {
|
||||
|
||||
it('if indicator set null should not be render default indicator', () => {
|
||||
const wrapper = mount(<Spin indicator={null} />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.render()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should support static method Spin.setDefaultIndicator', () => {
|
||||
Spin.setDefaultIndicator(<em className="custom-spinner" />);
|
||||
const wrapper = mount(<Spin />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.render()).toMatchSnapshot();
|
||||
Spin.setDefaultIndicator(null);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user