"use strict";

require("@testing-library/jest-dom");
var _react = require("@testing-library/react");
var _Heading = _interopRequireDefault(require("../Heading"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
describe('Heading Specs', function () {
  var content = 'Hello Heading!';
  test('should render a Heading with content', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      children: content
    }));
    var heading = _react.screen.getByText(content);
    expect(heading).toBeInTheDocument();
  });
  test('should add the showLine class', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      showLine: true,
      children: content
    }));
    var heading = _react.screen.getByText(content).parentElement.parentElement;
    var expected = 'showLine';
    expect(heading).toHaveClass(expected);
  });
  test('should render a Heading with spacing large', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      spacing: "large",
      children: content
    }));
    var heading = _react.screen.getByText(content).parentElement.parentElement;
    var expected = 'largeSpacing';
    expect(heading).toHaveClass(expected);
  });
  test('should render a Heading with spacing medium', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      children: content
    }));
    var heading = _react.screen.getByText(content).parentElement.parentElement;
    var expected = 'mediumSpacing';
    expect(heading).toHaveClass(expected);
  });
  test('should render a Heading with spacing small', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      spacing: "small",
      children: content
    }));
    var heading = _react.screen.getByText(content).parentElement.parentElement;
    var expected = 'smallSpacing';
    expect(heading).toHaveClass(expected);
  });
  test('should render a Heading with spacing none', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      spacing: "none",
      children: content
    }));
    var heading = _react.screen.getByText(content).parentElement.parentElement;
    var expected = 'noneSpacing';
    expect(heading).toHaveClass(expected);
  });
  test('should show back button', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Heading["default"], {
      showBackButton: true,
      children: content
    }));
    var actual = _react.screen.getByRole('button');
    expect(actual).toBeInTheDocument();
  });
});