"use strict";

require("@testing-library/jest-dom");
var _react = require("@testing-library/react");
var _BodyText = _interopRequireDefault(require("../BodyText"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
describe('BodyText Specs', function () {
  test('should render a text', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyText["default"], {
      children: "Hello!"
    }));
    var bodyText = _react.screen.getByText('Hello!');
    expect(bodyText).toBeInTheDocument();
  });
  test('should support multi-line content', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyText["default"], {
      children: "Hello! I am Multi-line"
    }));
    var bodyText = _react.screen.getByText('Hello! I am Multi-line');
    var expected = 'P';
    var actual = bodyText.tagName;
    expect(actual).toBe(expected);
  });
  test('should support single-line marqueeing content when `noWrap` is true', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyText["default"], {
      noWrap: true,
      children: "Hello!"
    }));
    var bodyText = _react.screen.getByText('Hello!').parentElement;
    var expected = 'marquee';
    expect(bodyText).toHaveClass(expected);
  });
  test('should include the noWrap class if `noWrap` is true', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyText["default"], {
      noWrap: true,
      children: "Hello!"
    }));
    var bodyText = _react.screen.getByText('Hello!').parentElement.parentElement;
    var expected = 'noWrap';
    expect(bodyText).toHaveClass(expected);
  });
  test('should have small class if `size` is small', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyText["default"], {
      size: "small",
      children: "Hello!"
    }));
    var bodyText = _react.screen.getByText('Hello!');
    var expected = 'small';
    expect(bodyText).toHaveClass(expected);
  });
  test('should have centered class if `centered` is true', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyText["default"], {
      centered: true,
      children: "Hello!"
    }));
    var bodyText = _react.screen.getByText('Hello!');
    var expected = 'centered';
    expect(bodyText).toHaveClass(expected);
  });
});