test: update result
parent
769f9b794e
commit
8f19769cce
|
@ -1 +1 @@
|
|||
Subproject commit 48e2a378cecd87b9e32d0ddc6d3fed26ed4a5e50
|
||||
Subproject commit bb1ff4ddc529b85b5ab492d80d391b057fdd6eaa
|
|
@ -1,6 +1,7 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Result from '../index';
|
||||
import Button from '../../button';
|
||||
import { sleep } from '../../../tests/utils';
|
||||
|
||||
describe('Result', () => {
|
||||
it('🙂 successPercent should decide the progress status when it exists', () => {
|
||||
|
@ -23,20 +24,21 @@ describe('Result', () => {
|
|||
expect(wrapper.findAll('.anticon-check-circle')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('🙂 different status, different class', () => {
|
||||
const wrapper = mount(Result, { props: { status: 'warning' } });
|
||||
it('🙂 different status, different class', async () => {
|
||||
const wrapper = mount(Result, { props: { status: 'warning' }, sync: false });
|
||||
expect(wrapper.findAll('.ant-result-warning')).toHaveLength(1);
|
||||
|
||||
wrapper.setProps({
|
||||
status: 'error',
|
||||
});
|
||||
|
||||
await sleep();
|
||||
expect(wrapper.findAll('.ant-result-error')).toHaveLength(1);
|
||||
|
||||
wrapper.setProps({
|
||||
status: '500',
|
||||
});
|
||||
|
||||
await sleep();
|
||||
expect(wrapper.findAll('.ant-result-500')).toHaveLength(1);
|
||||
});
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import demo from '../antdv-demo/docs/radio/demo/index';
|
||||
import demo from '../antdv-demo/docs/result/demo/index';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
Loading…
Reference in New Issue