import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__ from "@tachybase/test/client";
import * as __WEBPACK_EXTERNAL_MODULE__demos_icon_picker_mjs__ from "../demos/icon-picker.mjs";
describe('IconPicker', ()=>{
    it('should display all icons when click the button', async ()=>{
        const { container } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_icon_picker_mjs__["default"], {}));
        const button = container.querySelector('button');
        await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(button);
        expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText('Icon')).toMatchInlineSnapshot('\n      <div\n        class="ant-popover-title"\n      >\n        Icon\n      </div>\n    ');
        expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.queryAllByRole('img').length).toBe(421);
    });
    it.skip('should display the selected icon', async ()=>{
        const { container } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_icon_picker_mjs__["default"], {}));
        const button = container.querySelector('button');
        await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(button);
        const icon = __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.queryAllByRole('img')[0];
        await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(icon);
        const icons = __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.queryAllByRole('img');
        expect(icons[0]).toEqual(icon);
        expect(icons[2]).toEqual(icon);
        await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(icons[1]);
        expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.queryAllByRole('img').length).toBe(0);
    }, 300000);
});
