import * as __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__ from "@chakra-ui/react";
import * as __WEBPACK_EXTERNAL_MODULE__testing_library_react__ from "@testing-library/react";
import * as __WEBPACK_EXTERNAL_MODULE__TruncatedText_mjs__ from "./TruncatedText.mjs";
describe('TruncatedText', ()=>{
    test('should render truncated text', async ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__TruncatedText_mjs__["default"], {
            value: "Some lorem ipsum text"
        }));
        await (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.waitFor)(()=>{
            expect(__WEBPACK_EXTERNAL_MODULE__testing_library_react__.screen.getByText('Some lorem ipsum text')).toBeVisible();
        });
    });
    test('should split the text into a number of lines', async ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Box, {
            "data-testid": "truncated-text-wrapper"
        }, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__TruncatedText_mjs__["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, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.waitFor)(()=>{
            expect(__WEBPACK_EXTERNAL_MODULE__testing_library_react__.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.');
        });
    });
});
