import { mount } from 'enzyme';
import React from 'react';
import Progress from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { handleGradient, sortGradient } from '../Line';
import ProgressSteps from '../Steps';
describe('Progress', () => {
mountTest(Progress);
rtlTest(Progress);
it('successPercent should decide the progress status when it exists', () => {
const wrapper = mount();
expect(wrapper.find('.ant-progress-status-success')).toHaveLength(0);
wrapper.setProps({ percent: 50, success: { percent: 100 } });
expect(wrapper.find('.ant-progress-status-success')).toHaveLength(1);
wrapper.setProps({ percent: 100, success: { percent: 0 } });
expect(wrapper.find('.ant-progress-status-success')).toHaveLength(0);
});
it('render out-of-range progress', () => {
const wrapper = mount();
expect(wrapper.render()).toMatchSnapshot();
});
it('render out-of-range progress with info', () => {
const wrapper = mount();
expect(wrapper.render()).toMatchSnapshot();
});
it('render negative progress', () => {
const wrapper = mount();
expect(wrapper.render()).toMatchSnapshot();
});
it('render negative successPercent', () => {
const wrapper = mount();
expect(wrapper.render()).toMatchSnapshot();
});
it('render format', () => {
const wrapper = mount(