import React from "react";
import { renderWithProviders } from "testUtilities";
import styled from "styled-components";
import { DefaultTheme as theme } from "../../../theme/default";
import styledBorder from "./border";
var borderColor = theme.colors.border;
it("renders", function () {
  expect(styledBorder({
    theme: theme
  })).toBe("");
});
it("renders default", function () {
  expect(styledBorder({
    theme: theme,
    border: true
  }).trim()).toBe("border: 1px solid " + borderColor + ";");
});
it("renders border horizontally", function () {
  expect(styledBorder({
    theme: theme,
    border: "horizontal"
  })).toBe("\n    border-top: 1px solid " + borderColor + ";\n    border-bottom: 1px solid " + borderColor + ";\n  ");
});
it("renders border vertically", function () {
  expect(styledBorder({
    theme: theme,
    border: "vertical"
  })).toBe("\n    border-left: 1px solid " + borderColor + ";\n    border-right: 1px solid " + borderColor + ";\n  ");
});
it("renders custom border on one side", function () {
  expect(styledBorder({
    theme: theme,
    border: {
      color: "disabled",
      side: "top",
      size: "1rem",
      type: "dashed"
    }
  }).trim()).toBe("border-top: 1rem dashed " + theme.colors.disabled + ";");
  expect(styledBorder({
    theme: theme,
    border: {
      color: "disabled",
      side: "right",
      size: "1rem",
      type: "dashed"
    }
  }).trim()).toBe("border-right: 1rem dashed " + theme.colors.disabled + ";");
  expect(styledBorder({
    theme: theme,
    border: {
      color: "disabled",
      side: "bottom",
      size: "1rem",
      type: "dashed"
    }
  }).trim()).toBe("border-bottom: 1rem dashed " + theme.colors.disabled + ";");
  expect(styledBorder({
    theme: theme,
    border: {
      color: "disabled",
      side: "left",
      size: "1rem",
      type: "dashed"
    }
  }).trim()).toBe("border-left: 1rem dashed " + theme.colors.disabled + ";");
});
it("renders custom border vertically", function () {
  expect(styledBorder({
    theme: theme,
    border: {
      color: "disabled",
      side: "vertical",
      size: "2px",
      type: "dashed"
    }
  })).toBe("\n    border-left: 2px dashed " + theme.colors.disabled + ";\n    border-right: 2px dashed " + theme.colors.disabled + ";\n  ");
});
it("renders invalid", function () {
  expect(styledBorder({
    theme: theme,
    border: "invalid"
  })).toBe("\n    border: 1px solid invalid;\n  ");
});