"use strict";

var _react = _interopRequireDefault(require("react"));
var _testUtilities = require("testUtilities");
var _default = require("../../../theme/default");
var _index = _interopRequireDefault(require("./index"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var base = _default.DefaultTheme.constants.SIZE_SUB_UNIT;
it("renders", function () {
  var _renderWithProviders = (0, _testUtilities.renderWithProviders)( /*#__PURE__*/_react["default"].createElement(_index["default"], null, "Content")),
    getByText = _renderWithProviders.getByText;
  expect(getByText("Content")).toBeInTheDocument();
});
it("renders with align", function () {
  var _renderWithProviders2 = (0, _testUtilities.renderWithProviders)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
      alignContent: "end",
      column: true
    }, "Content")),
    getByText = _renderWithProviders2.getByText;
  expect(getByText("Content")).toHaveStyleRule("display", "flex");
  expect(getByText("Content")).toHaveStyleRule("align-content", "flex-end");
  expect(getByText("Content")).toHaveStyleRule("flex-direction", "column");
});
it("renders spaces align", function () {
  var _renderWithProviders3 = (0, _testUtilities.renderWithProviders)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
      width: "10rem",
      border: true,
      overflow: "auto",
      padding: [1, 2, 1, 0],
      margin: [1, "auto"]
    }, "Content")),
    getByText = _renderWithProviders3.getByText;
  expect(getByText("Content")).toHaveStyleRule("width", "10rem");
  expect(getByText("Content")).toHaveStyleRule("border", "1px solid " + _default.DefaultTheme.colors.border);
  expect(getByText("Content")).toHaveStyleRule("overflow", "auto");
  expect(getByText("Content")).toHaveStyleRule("padding", base + "px " + base * 2 + "px " + base + "px 0");
  expect(getByText("Content")).toHaveStyleRule("margin", base + "px auto");
});