import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__ from "@tachybase/test/e2e";
__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test.describe('add menu item', ()=>{
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('header', async (param)=>{
        let { page, deletePage } = param;
        await page.goto('/');
        await page.getByTestId('schema-initializer-Menu-header').hover();
        await page.getByRole('menuitem', {
            name: 'Group'
        }).click();
        await page.getByRole('textbox').click();
        await page.getByRole('textbox').fill('page group');
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByLabel('page group', {
            exact: true
        })).toBeVisible();
        await page.getByTestId('schema-initializer-Menu-header').hover();
        await page.getByRole('menuitem', {
            name: 'Page',
            exact: true
        }).click();
        await page.getByRole('textbox').click();
        await page.getByRole('textbox').fill('page item');
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByLabel('page item', {
            exact: true
        })).toBeVisible();
        await page.getByTestId('schema-initializer-Menu-header').hover();
        await page.getByRole('menuitem', {
            name: 'Link',
            exact: true
        }).click();
        await page.getByLabel('block-item-Input-Menu item title').getByRole('textbox').click();
        await page.getByLabel('block-item-Input-Menu item title').getByRole('textbox').fill('page link');
        await page.getByLabel('block-item-Input-Link').getByRole('textbox').click();
        await page.getByLabel('block-item-Input-Link').getByRole('textbox').fill('baidu.com');
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByText('page link', {
            exact: true
        })).toBeVisible();
        await deletePage('page group');
        await deletePage('page item');
        await deletePage('page link');
    });
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('sidebar', async (param)=>{
        let { page, mockPage } = param;
        await mockPage(__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.groupPageEmpty).goto();
        await page.getByTestId('schema-initializer-Menu-side').hover();
        await page.getByRole('menuitem', {
            name: 'Group',
            exact: true
        }).click();
        await page.getByRole('textbox').click();
        await page.getByRole('textbox').fill('page group side');
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByText('page group side', {
            exact: true
        })).toBeVisible();
        await page.getByTestId('schema-initializer-Menu-side').hover();
        await page.getByRole('menuitem', {
            name: 'Page',
            exact: true
        }).click();
        await page.getByRole('textbox').click();
        await page.getByRole('textbox').fill('page item side');
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByText('page item side', {
            exact: true
        })).toBeVisible();
        await page.getByTestId('schema-initializer-Menu-side').hover();
        await page.getByRole('menuitem', {
            name: 'Link',
            exact: true
        }).click();
        await page.getByLabel('block-item-Input-Menu item title').getByRole('textbox').click();
        await page.getByLabel('block-item-Input-Menu item title').getByRole('textbox').fill('link item side');
        await page.getByLabel('block-item-Input-Link').getByRole('textbox').click();
        await page.getByLabel('block-item-Input-Link').getByRole('textbox').fill('/');
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByText('link item side', {
            exact: true
        })).toBeVisible();
    });
});
