"use strict";

var _react = _interopRequireDefault(require("react"));
var _testUtilities = require("testUtilities");
var _mastercardPill = _interopRequireDefault(require("./mastercardPill"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
describe("MasterCardPill component", function () {
  test("should render default component", function () {
    (0, _testUtilities.renderWithProviders)(/*#__PURE__*/_react["default"].createElement(_mastercardPill["default"], null));
    expect(_testUtilities.screen.queryByTestId("mastercard-pill")).toBeInTheDocument();
    expect(_testUtilities.screen.queryByTestId("mastercard-pill")).toHaveTextContent("-");
  });
  test("should render component with custom test id", function () {
    (0, _testUtilities.renderWithProviders)(/*#__PURE__*/_react["default"].createElement(_mastercardPill["default"], {
      "data-testid": "custom-mastercard-pill"
    }));
    expect(_testUtilities.screen.queryByTestId("mastercard-pill")).not.toBeInTheDocument();
    expect(_testUtilities.screen.queryByTestId("custom-mastercard-pill")).toBeInTheDocument();
  });
  test("should render component with text", function () {
    var mockedText = "sample";
    (0, _testUtilities.renderWithProviders)(/*#__PURE__*/_react["default"].createElement(_mastercardPill["default"], {
      text: mockedText
    }));
    expect(_testUtilities.screen.queryByTestId("mastercard-pill")).toHaveTextContent(mockedText);
  });
  test("should render component with icon", function () {
    (0, _testUtilities.renderWithProviders)(/*#__PURE__*/_react["default"].createElement(_mastercardPill["default"], {
      icon: "alarm_bell"
    }));
    expect(_testUtilities.screen.queryByTestId("mastercard-pill")).not.toHaveTextContent("-");
  });
});