import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import { render } from '@testing-library/react';
import { ProgressIndicator } from '.';
describe('ProgressIndicator', function () {
  var wrapper;
  describe('default props', function () {
    beforeEach(function () {
      wrapper = render( /*#__PURE__*/React.createElement(ProgressIndicator, null));
    });
    it('should show the loader', function () {
      expect(wrapper.getByTestId('loader')).toBeInTheDocument();
    });
    it('should show the "Loading..." text', function () {
      expect(wrapper.getByText('Loading...')).toBeInTheDocument();
    });
  });
  describe('with CSS modifier', function () {
    beforeEach(function () {
      wrapper = render( /*#__PURE__*/React.createElement(ProgressIndicator, {
        className: "rn-progress-indicator--custom"
      }));
    });
    it('should add the modifier', function () {
      expect(wrapper.getByTestId('progress-indicator').classList).toContain('rn-progress-indicator--custom');
    });
  });
  describe('with arbitrary props', function () {
    beforeEach(function () {
      wrapper = render( /*#__PURE__*/React.createElement(ProgressIndicator, {
        "data-arbitrary": "arbitrary"
      }));
    });
    it('should spread arbitrary props', function () {
      expect(wrapper.getByTestId('progress-indicator')).toHaveAttribute('data-arbitrary', 'arbitrary');
    });
  });
});