import React, { useState } from 'react';
import { Tooltip } from 'antd';
import type { ProgressProps } from '..';
import Progress from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { fireEvent, render } from '../../../tests/utils';
import { handleGradient, sortGradient } from '../Line';
import ProgressSteps from '../Steps';
import { ProgressTypes } from '../progress';
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 strokeWidth of progress', () => {
const { container } = render();
expect(container).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(