"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("@chakra-ui/react");
const external_testing_library_react_namespaceObject = require("@testing-library/react");
const external_TruncatedText_js_namespaceObject = require("./TruncatedText.js");
var external_TruncatedText_js_default = /*#__PURE__*/ __webpack_require__.n(external_TruncatedText_js_namespaceObject);
describe('TruncatedText', ()=>{
    test('should render truncated text', async ()=>{
        (0, external_testing_library_react_namespaceObject.render)(/*#__PURE__*/ React.createElement(external_TruncatedText_js_default(), {
            value: "Some lorem ipsum text"
        }));
        await (0, external_testing_library_react_namespaceObject.waitFor)(()=>{
            expect(external_testing_library_react_namespaceObject.screen.getByText('Some lorem ipsum text')).toBeVisible();
        });
    });
    test('should split the text into a number of lines', async ()=>{
        (0, external_testing_library_react_namespaceObject.render)(/*#__PURE__*/ React.createElement(react_namespaceObject.Box, {
            "data-testid": "truncated-text-wrapper"
        }, /*#__PURE__*/ React.createElement(external_TruncatedText_js_default(), {
            value: `"The quick brown fox jumps over the lazy dog" is an English-language pangram—a \
        sentence that contains all of the letters of the English alphabet. Owing to \
        its existence, Chakra was created.`,
            noOfLines: 1
        })));
        // TODO: Improve this test because it needs to simulate the viewport size
        await (0, external_testing_library_react_namespaceObject.waitFor)(()=>{
            expect(external_testing_library_react_namespaceObject.screen.getByTestId('truncated-text-wrapper')).toHaveTextContent('"The quick brown fox jumps over the lazy dog" is an English-language pangram—a sentence that contains all of the letters of the English alphabet. Owing to its existence, Chakra was created.');
        });
    });
});
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
});
