mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-09 10:41:03 +08:00

* fix: successPercent should decide the progress status when it exists, close #9382
* Add test for e361df0
that successPercent should decide the progress status when it exists
14 lines
496 B
JavaScript
14 lines
496 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import Progress from '..';
|
|
|
|
describe('Progress', () => {
|
|
it('successPercent should decide the progress status when it exists', async () => {
|
|
const wrapper = mount(<Progress percent={100} successPercent={50} />);
|
|
expect(wrapper.find('.ant-progress-status-success')).toHaveLength(0);
|
|
|
|
wrapper.setProps({ percent: 50, successPercent: 100 });
|
|
expect(wrapper.find('.ant-progress-status-success')).toHaveLength(1);
|
|
});
|
|
});
|