"use strict";
// The require scope
var __webpack_require__ = {};
/************************************************************************/ // webpack/runtime/compat_get_default_export
(()=>{
    // getDefaultExport function for compatibility with non-ESM modules
    __webpack_require__.n = function(module) {
        var getter = module && module.__esModule ? function() {
            return module['default'];
        } : function() {
            return module;
        };
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
// webpack/runtime/define_property_getters
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
// webpack/runtime/has_own_property
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
/************************************************************************/ var __webpack_exports__ = {};
const react_namespaceObject = require("@testing-library/react");
const external_Heading_js_namespaceObject = require("./Heading.js");
var external_Heading_js_default = /*#__PURE__*/ __webpack_require__.n(external_Heading_js_namespaceObject);
describe('Heading', ()=>{
    test('should render Heading component based on variant prop', async ()=>{
        const { getByText, findByText } = (0, react_namespaceObject.render)(/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            variant: "xl"
        }, 'Heading (variant="xl")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            variant: "lg"
        }, 'Heading (variant="lg")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            variant: "md"
        }, 'Heading (variant="md")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            variant: "sm"
        }, 'Heading (variant="sm")')));
        await (0, react_namespaceObject.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, react_namespaceObject.render)(/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            size: "xl"
        }, 'Heading (size="xl")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            size: "lg"
        }, 'Heading (size="lg")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            size: "md"
        }, 'Heading (size="md")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            size: "sm"
        }, 'Heading (size="sm")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            size: "xs"
        }, 'Heading (size="xs")')));
        await (0, react_namespaceObject.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, react_namespaceObject.render)(/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            as: "h1"
        }, 'Heading (as="h1")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            as: "h2"
        }, 'Heading (as="h2")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            as: "h3"
        }, 'Heading (as="h3")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            as: "h4"
        }, 'Heading (as="h4")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            as: "h5"
        }, 'Heading (as="h5")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            as: "h6"
        }, 'Heading (as="h6")'), /*#__PURE__*/ React.createElement(external_Heading_js_default(), {
            variant: "xl",
            as: "h3"
        }, 'Heading (variant=xl, as="h3")')));
        await (0, react_namespaceObject.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');
        });
    });
});
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
