"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('Box', function () {
  it('should render children', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, null, "Lorem ipsum"));
    expect(wrapper.find('.vs-box').text()).toEqual('Lorem ipsum');
  });
  it('should render children with direction column', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      direction: "column"
    }, _react.default.createElement("span", null, "Lorem ipsum"), _react.default.createElement("button", null, "OK")));
    expect(wrapper.find('.vs-box.vs-box-direction-column span').text()).toEqual('Lorem ipsum');
    expect(wrapper.find('.vs-box.vs-box-direction-column button').text()).toEqual('OK');
  });
  it('should render children with direction row', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      direction: "row"
    }, _react.default.createElement("span", null, "Lorem ipsum"), _react.default.createElement("button", null, "OK")));
    expect(wrapper.find('.vs-box.vs-box-direction-row span').text()).toEqual('Lorem ipsum');
    expect(wrapper.find('.vs-box.vs-box-direction-row button').text()).toEqual('OK');
  });
  it('should render with border', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      border: true
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-border').text()).toEqual('Lorem ipsum');
  });
  it('should render with padding default', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      padding: "default"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-default').text()).toEqual('Lorem ipsum');
  });
  it('should render with padding small', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      padding: "small"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-small').text()).toEqual('Lorem ipsum');
  });
  it('should render with padding large', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      padding: "large"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-large').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingLeft default', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingLeft: "default"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-left-default').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingLeft small', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingLeft: "small"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-left-small').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingLeft large', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingLeft: "large"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-left-large').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingRight default', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingRight: "default"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-right-default').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingRight small', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingRight: "small"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-right-small').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingRight large', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingRight: "large"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-right-large').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingTop default', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingTop: "default"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-top-default').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingTop small', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingTop: "small"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-top-small').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingTop large', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingTop: "large"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-top-large').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingBottom default', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingBottom: "default"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-bottom-default').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingBottom small', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingBottom: "small"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-bottom-small').text()).toEqual('Lorem ipsum');
  });
  it('should render with paddingBottom large', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      paddingBottom: "large"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-padding-bottom-large').text()).toEqual('Lorem ipsum');
  });
  it('should render with gap default', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      gap: "default"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-gap-default').text()).toEqual('Lorem ipsum');
  });
  it('should render with gap small', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      gap: "small"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-gap-small').text()).toEqual('Lorem ipsum');
  });
  it('should render with gap large', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      gap: "large"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-gap-large').text()).toEqual('Lorem ipsum');
  });
  it('should render with align center', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      align: "center"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-align-center').text()).toEqual('Lorem ipsum');
  });
  it('should render with align start', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      align: "start"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-align-start').text()).toEqual('Lorem ipsum');
  });
  it('should render with align end', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      align: "end"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-align-end').text()).toEqual('Lorem ipsum');
  });
  it('should render with justify center', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      justify: "center"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-justify-center').text()).toEqual('Lorem ipsum');
  });
  it('should render with justify start', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      justify: "start"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-justify-start').text()).toEqual('Lorem ipsum');
  });
  it('should render with justify end', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      justify: "end"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-justify-end').text()).toEqual('Lorem ipsum');
  });
  it('should render with justify space-around', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      justify: "space-around"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-justify-space-around').text()).toEqual('Lorem ipsum');
  });
  it('should render with justify space-between', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      justify: "space-between"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-justify-space-between').text()).toEqual('Lorem ipsum');
  });
  it('should render with justify space-evenly', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      justify: "space-evenly"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-justify-space-evenly').text()).toEqual('Lorem ipsum');
  });
  it('should render with grow', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.default, {
      grow: true
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box.vs-box-grow').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",
      id: "test"
    }, "Lorem ipsum"));
    expect(wrapper.find('.vs-box[data-id="test"]').text()).toEqual('Lorem ipsum');
  });
});