"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _reactDom = _interopRequireDefault(require("react-dom"));

var _Heading = _interopRequireDefault(require("@instructure/ui-elements/lib/components/Heading"));

var _PositionBox = _interopRequireDefault(require("../PositionBox"));

describe('Position Box', function () {
  var testbed = createTestbed(_PositionBox.default, {
    position: '2',
    headingText: 'item number two'
  });
  shouldRenderComponent(testbed, {}, _PositionBox.default);
  describe('rendering', function () {
    it('renders position when it is a string', function () {
      var stringPositon = '77';
      testbed.render({
        position: stringPositon
      });
      expect(testbed.getText()).to.include(stringPositon);
    });
    it('renders position when it is a number', function () {
      testbed.render({
        position: 33
      });
      expect(testbed.getText()).to.include('33');
    });
    it('renders the headingText in a Header component', function () {
      testbed.render();
      var heading = testbed.findChildByType(_Heading.default);

      var headingText = _reactDom.default.findDOMNode(heading).innerText;

      expect(headingText).to.include('item number two');
    });
  });
  describe('a11y tests', function () {
    it('should meet a11y standards', function (done) {
      testbed.render();
      testbed.checkA11yStandards(done, {});
    });
  });
});