import React from "react"; import renderer from "react-test-renderer"; import AlertBanner from "../AlertBanner"; import AlertBannerLink from "../AlertBannerLink/AlertBannerLink"; import AlertBannerButton from "../AlertBannerButton/AlertBannerButton"; import AlertBannerText from "../AlertBannerText/AlertBannerText"; import { NOOP } from "../../../utils/function-utils"; describe("AlertBanner", () => { it("should render correctly without props", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("should render correctly with props", () => { const tree = renderer .create( ) .toJSON(); expect(tree).toMatchSnapshot(); }); it("should render with correctly with text and link", () => { const tree = renderer .create( ) .toJSON(); expect(tree).toMatchSnapshot(); }); it("should render with correctly with text and button", () => { const tree = renderer .create( Lorem Ipsum Salura ) .toJSON(); expect(tree).toMatchSnapshot(); }); it("should render with correctly with multiple elements", () => { const tree = renderer .create( Lorem Ipsum Bailar ) .toJSON(); expect(tree).toMatchSnapshot(); }); it("should render correctly with hidden close button", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("should render correctly with background color", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); });