ant-design/components/progress/__tests__/index.test.js
诸岳 40e7e0c193
Fix: successPercent should decide the progress status when it exists, close #9382 (#9614)
* 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
2018-03-11 00:11:52 +08:00

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);
});
});