import * as __WEBPACK_EXTERNAL_MODULE__testing_library_react__ from "@testing-library/react";
import * as __WEBPACK_EXTERNAL_MODULE__Heading_mjs__ from "./Heading.mjs";
describe('Heading', ()=>{
    test('should render Heading component based on variant prop', async ()=>{
        const { getByText, findByText } = (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            variant: "xl"
        }, 'Heading (variant="xl")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            variant: "lg"
        }, 'Heading (variant="lg")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            variant: "md"
        }, 'Heading (variant="md")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            variant: "sm"
        }, 'Heading (variant="sm")')));
        await (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.waitFor)(()=>{
            expect(getByText(/heading \(variant="xl"\)/i)).toBeVisible();
            expect(getByText(/heading \(variant="lg"\)/i)).toBeVisible();
            expect(getByText(/heading \(variant="md"\)/i)).toBeVisible();
            expect(getByText(/heading \(variant="sm"\)/i)).toBeVisible();
            expect(getByText(/heading \(variant="xl"\)/i).nodeName).toBe('H1');
            expect(getByText(/heading \(variant="lg"\)/i).nodeName).toBe('H2');
            expect(getByText(/heading \(variant="md"\)/i).nodeName).toBe('H3');
            expect(getByText(/heading \(variant="sm"\)/i).nodeName).toBe('H4');
        });
    });
    test('should render Heading component based on size prop', async ()=>{
        const { getByText, findByText } = (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            size: "xl"
        }, 'Heading (size="xl")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            size: "lg"
        }, 'Heading (size="lg")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            size: "md"
        }, 'Heading (size="md")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            size: "sm"
        }, 'Heading (size="sm")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            size: "xs"
        }, 'Heading (size="xs")')));
        await (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.waitFor)(()=>{
            expect(getByText(/heading \(size="xl"\)/i)).toBeVisible();
            expect(getByText(/heading \(size="lg"\)/i)).toBeVisible();
            expect(getByText(/heading \(size="md"\)/i)).toBeVisible();
            expect(getByText(/heading \(size="sm"\)/i)).toBeVisible();
            expect(getByText(/heading \(size="xs"\)/i)).toBeVisible();
            expect(getByText(/heading \(size="xl"\)/i).nodeName).toBe('H1');
            expect(getByText(/heading \(size="lg"\)/i).nodeName).toBe('H1');
            expect(getByText(/heading \(size="md"\)/i).nodeName).toBe('H2');
            expect(getByText(/heading \(size="sm"\)/i).nodeName).toBe('H3');
            expect(getByText(/heading \(size="xs"\)/i).nodeName).toBe('H4');
        });
    });
    test('should render Heading component based on as prop', async ()=>{
        const { getByText, findByText } = (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            as: "h1"
        }, 'Heading (as="h1")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            as: "h2"
        }, 'Heading (as="h2")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            as: "h3"
        }, 'Heading (as="h3")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            as: "h4"
        }, 'Heading (as="h4")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            as: "h5"
        }, 'Heading (as="h5")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            as: "h6"
        }, 'Heading (as="h6")'), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Heading_mjs__["default"], {
            variant: "xl",
            as: "h3"
        }, 'Heading (variant=xl, as="h3")')));
        await (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.waitFor)(()=>{
            expect(getByText(/heading \(as="h1"\)/i)).toBeVisible();
            expect(getByText(/heading \(as="h2"\)/i)).toBeVisible();
            expect(getByText(/heading \(as="h3"\)/i)).toBeVisible();
            expect(getByText(/heading \(as="h4"\)/i)).toBeVisible();
            expect(getByText(/heading \(as="h5"\)/i)).toBeVisible();
            expect(getByText(/heading \(as="h6"\)/i)).toBeVisible();
            expect(getByText(/heading \(variant=xl, as="h3"\)/i)).toBeVisible();
            expect(getByText(/heading \(as="h1"\)/i).nodeName).toBe('H1');
            expect(getByText(/heading \(as="h2"\)/i).nodeName).toBe('H2');
            expect(getByText(/heading \(as="h3"\)/i).nodeName).toBe('H3');
            expect(getByText(/heading \(as="h4"\)/i).nodeName).toBe('H4');
            expect(getByText(/heading \(as="h5"\)/i).nodeName).toBe('H5');
            expect(getByText(/heading \(as="h6"\)/i).nodeName).toBe('H6');
            expect(getByText(/heading \(variant=xl\, as="h3"\)/i).nodeName).toBe('H3');
        });
    });
});
