"use strict";
var __webpack_exports__ = {};
const e2e_namespaceObject = require("@tachybase/test/e2e");
e2e_namespaceObject.test.describe('add menu item', ()=>{
    (0, e2e_namespaceObject.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, e2e_namespaceObject.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, e2e_namespaceObject.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, e2e_namespaceObject.expect)(page.getByText('page link', {
            exact: true
        })).toBeVisible();
        await deletePage('page group');
        await deletePage('page item');
        await deletePage('page link');
    });
    (0, e2e_namespaceObject.test)('sidebar', async (param)=>{
        let { page, mockPage } = param;
        await mockPage(e2e_namespaceObject.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, e2e_namespaceObject.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, e2e_namespaceObject.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, e2e_namespaceObject.expect)(page.getByText('link item side', {
            exact: true
        })).toBeVisible();
    });
});
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
});
