import React from "react"; import "@testing-library/jest-dom/extend-expect"; import { render } from "../../utils/render"; import { Title, Title2, Subtitle, H1, H2, H3, Label1, Label2, Spotlight, Legend, Legend2, Legend3 } from ".."; import { theme } from "../../utils/Theme"; describe(" test case", () => { test("renders text", () => { const { getByText } = render(<Title>Hi, I'm Title); expect(getByText("Hi, I'm Title")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Title); expect(getByText("Hi, I'm Title")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Title2); expect(getByText("Hi, I'm Title2")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Title2); expect(getByText("Hi, I'm Title2")).toMatchSnapshot(); }); test("matches snapshot when color is passed via props", () => { const { getByText } = render( Hi, I'm Title2 ); expect(getByText("Hi, I'm Title2")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Subtitle); expect(getByText("Hi, I'm Subtitle")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Subtitle); expect(getByText("Hi, I'm Subtitle")).toMatchSnapshot(); }); test("matches snapshot when color is passed via props", () => { const { getByText } = render( Hi, I'm Subtitle ); expect(getByText("Hi, I'm Subtitle")).toMatchSnapshot(); }); }); describe("

test case", () => { test("renders text", () => { const { getByText } = render(

Hi, I'm H1

); expect(getByText("Hi, I'm H1")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(

Hi, I'm H1

); expect(getByText("Hi, I'm H1")).toMatchSnapshot(); }); }); describe("

test case", () => { test("renders text", () => { const { getByText } = render(

Hi, I'm H2

); expect(getByText("Hi, I'm H2")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(

Hi, I'm H2

); expect(getByText("Hi, I'm H2")).toMatchSnapshot(); }); }); describe("

test case", () => { test("renders text", () => { const { getByText } = render(

Hi, I'm H3

); expect(getByText("Hi, I'm H3")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(

Hi, I'm H3

); expect(getByText("Hi, I'm H3")).toMatchSnapshot(); }); test("matches snapshot when H3 is bold", () => { const { getByText } = render(

Hi, I'm H3

); expect(getByText("Hi, I'm H3")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Label1); expect(getByText("Hi, I'm Label1")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Label1); expect(getByText("Hi, I'm Label1")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Label2); expect(getByText("Hi, I'm Label2")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Label2); expect(getByText("Hi, I'm Label2")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Spotlight); expect(getByText("Hi, I'm Spotlight")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Spotlight); expect(getByText("Hi, I'm Spotlight")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Legend); expect(getByText("Hi, I'm Legend")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Legend); expect(getByText("Hi, I'm Legend")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Legend2); expect(getByText("Hi, I'm Legend2")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Legend2); expect(getByText("Hi, I'm Legend2")).toMatchSnapshot(); }); }); describe(" test case", () => { test("renders text", () => { const { getByText } = render(Hi, I'm Legend3); expect(getByText("Hi, I'm Legend3")).toBeInTheDocument(); }); test("matches snapshot", () => { const { getByText } = render(Hi, I'm Legend3); expect(getByText("Hi, I'm Legend3")).toMatchSnapshot(); }); });