import React from 'react';
import { render } from '@testing-library/react';
import Progress from '../index';
describe('Progress', function () {
  it('renders correctly', function () {
    var _render = render( /*#__PURE__*/React.createElement(Progress, {
      percent: 10
    })),
        container = _render.container;

    expect(container).toMatchSnapshot();
  });
  it('renders has children correctly', function () {
    var _render2 = render( /*#__PURE__*/React.createElement(Progress, {
      percent: 10
    }, "foo")),
        container = _render2.container;

    expect(container).toMatchSnapshot();
  });
  describe('circle shape progress', function () {
    it('renders shape is circle correctly', function () {
      var _render3 = render( /*#__PURE__*/React.createElement(Progress, {
        shape: "circle",
        strokeShape: "rect",
        percent: 10
      }, "foo")),
          container = _render3.container;

      expect(container).toMatchSnapshot();
    });
    it('renders shape is semi-circle correctly', function () {
      var _render4 = render( /*#__PURE__*/React.createElement(Progress, {
        shape: "semi-circle",
        percent: 10
      }, "foo")),
          container = _render4.container;

      expect(container).toMatchSnapshot();
    });
    it('renders percent correctly', function () {
      var _render5 = render( /*#__PURE__*/React.createElement(Progress, {
        shape: "circle",
        percent: 10,
        text: function text(percent) {
          return /*#__PURE__*/React.createElement("div", {
            className: "test-progress"
          }, percent);
        }
      })),
          container = _render5.container;

      expect(container.querySelectorAll('.test-progress')[0].textContent).toEqual('10');
      expect(container).toMatchSnapshot();
    });
  });
  describe('line shape progress', function () {
    it('renders size is lg correctly', function () {
      var _render6 = render( /*#__PURE__*/React.createElement(Progress, {
        shape: "line",
        percent: 10,
        size: "lg"
      })),
          container = _render6.container;

      expect(container.querySelectorAll('.za-progress--lg')).toHaveLength(1);
      expect(container).toMatchSnapshot();
    });
    it('renders size is md correctly', function () {
      var _render7 = render( /*#__PURE__*/React.createElement(Progress, {
        shape: "line",
        percent: 10,
        size: "md"
      })),
          container = _render7.container;

      expect(container.querySelectorAll('.za-progress--md')).toHaveLength(1);
      expect(container).toMatchSnapshot();
    });
    it('renders size is sm correctly', function () {
      var _render8 = render( /*#__PURE__*/React.createElement(Progress, {
        shape: "line",
        percent: 10,
        size: "sm"
      })),
          container = _render8.container;

      expect(container.querySelectorAll('.za-progress--sm')).toHaveLength(1);
      expect(container).toMatchSnapshot();
    });
  });
});