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_demo1_mjs__ from "../demos/demo1.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__demos_demo2_mjs__ from "../demos/demo2.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__demos_demo3_mjs__ from "../demos/demo3.mjs";
describe('Menu', ()=>{
    it('mode: "horizontal"', async ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_demo1_mjs__["default"], {}));
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.waitFor)(async ()=>{
            expect((0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.within)(document.querySelector('.ant-menu-item-selected')).getByText(/menu item 1/i)).toBeInTheDocument();
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/menu item 2/i)).toBeInTheDocument();
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/submenu 1/i)).toBeInTheDocument();
            await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/menu item 2/i));
            expect((0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.within)(document.querySelector('.ant-menu-item-selected')).getByText(/menu item 2/i)).toBeInTheDocument();
        });
    });
    it('mode: "inline"', async ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_demo2_mjs__["default"], {}));
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.waitFor)(async ()=>{
            expect((0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.within)(document.querySelector('.ant-menu-item-selected')).getByText(/menu item 1/i)).toBeInTheDocument();
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/menu item 2/i)).toBeInTheDocument();
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/submenu 1/i)).toBeInTheDocument();
            await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/menu item 2/i));
            expect((0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.within)(document.querySelector('.ant-menu-item-selected')).getByText(/menu item 2/i)).toBeInTheDocument();
        });
    });
    it('mode: "mix"', async ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__demos_demo3_mjs__["default"], {}));
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.waitFor)(async ()=>{
            expect((0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.within)(document.querySelector('.ant-menu-item-selected')).getByText(/menu item 1/i)).toBeInTheDocument();
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/menu item 2/i)).toBeInTheDocument();
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/submenu 1/i)).toBeInTheDocument();
            await __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.userEvent.click(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.getByText(/menu item 2/i));
            expect((0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.within)(document.querySelector('.ant-menu-item-selected')).getByText(/menu item 2/i)).toBeInTheDocument();
        });
    });
});
