"use strict";

var _react = _interopRequireDefault(require("react"));

var _index = _interopRequireDefault(require("../index"));

var _enzyme = _interopRequireWildcard(require("enzyme"));

var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

_enzyme.default.configure({
  adapter: new _enzymeAdapterReact.default()
});

describe('Text', function () {
  describe('Types', function () {
    it('should render text type default', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, null, "Lorem ipsum"));
      expect(wrapper.find('.vs-text').text()).toEqual('Lorem ipsum');
    });
    it('should render text type light', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "light"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-light').text()).toEqual('Lorem ipsum');
    });
    it('should render text type bold', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "bold"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-bold').text()).toEqual('Lorem ipsum');
    });
    it('should render text type small', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "small"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-small').text()).toEqual('Lorem ipsum');
    });
    it('should render text type small-light', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "small-light"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-small-light').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h1', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h1"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h1').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h2', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h2"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h2').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h3', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h3"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h3').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h4', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h4"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h4').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h5', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h5"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h5').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h6', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h6"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h6').text()).toEqual('Lorem ipsum');
    });
    it('should render text type subheading', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "subheading"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-subheading').text()).toEqual('Lorem ipsum');
    });
    it('should render text type link', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "link"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-link').text()).toEqual('Lorem ipsum');
    });
    it('should render text type error', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "error"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-error').text()).toEqual('Lorem ipsum');
    });
    it('should render text type error small', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "error-small"
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-error-small').text()).toEqual('Lorem ipsum');
    });
  });
  describe('Italic', function () {
    it('should render text italic', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        italic: true
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-italic').text()).toEqual('Lorem ipsum');
    });
    it('should render text type h4 and italic', function () {
      var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
        type: "h4",
        italic: true
      }, "Lorem ipsum"));
      expect(wrapper.find('.vs-text.vs-text-type-h4.vs-text-italic').text()).toEqual('Lorem ipsum');
    });
  });
  it('should render with arbitrary data-id prop', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      "data-id": "test"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-text[data-id="test"]').text()).toEqual('Lorem ipsum');
  });
});