import React from 'react';
import type { ProgressProps } from '..';
import Progress from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { handleGradient, sortGradient } from '../Line';
import ProgressSteps from '../Steps';
import { render } from '../../../tests/utils';
describe('Progress', () => {
mountTest(Progress);
rtlTest(Progress);
it('successPercent should decide the progress status when it exists', () => {
const { container: wrapper, rerender } = render(
,
);
expect(wrapper.querySelectorAll('.ant-progress-status-success')).toHaveLength(0);
rerender();
expect(wrapper.querySelectorAll('.ant-progress-status-success')).toHaveLength(1);
rerender();
expect(wrapper.querySelectorAll('.ant-progress-status-success')).toHaveLength(0);
});
it('render out-of-range progress', () => {
const { container: wrapper } = render();
expect(wrapper.firstChild).toMatchSnapshot();
});
it('render out-of-range progress with info', () => {
const { container: wrapper } = render();
expect(wrapper.firstChild).toMatchSnapshot();
});
it('render negative progress', () => {
const { container: wrapper } = render();
expect(wrapper.firstChild).toMatchSnapshot();
});
it('render negative successPercent', () => {
const { container: wrapper } = render();
expect(wrapper.firstChild).toMatchSnapshot();
});
it('render format', () => {
const { container: wrapper } = render(