import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__ from "@tachybase/test/e2e";
__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test.describe('multi data details block schema settings', ()=>{
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('supported options', async (param)=>{
        let { page, mockPage, mockRecord } = param;
        const nocoPage = await mockPage(__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.oneDetailBlockWithM2oFieldToGeneral).waitForInit();
        await mockRecord('general');
        await nocoPage.goto();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expectSettingsMenu)({
            page,
            showMenu: async ()=>{
                await page.getByLabel('block-item-CardItem-targetToGeneral-details').hover();
                await page.getByLabel('designer-schema-settings-CardItem-DetailsDesigner-targetToGeneral').hover();
            },
            supportedOptions: [
                'Edit block title',
                'Set the data scope',
                'Set default sorting rules',
                'Save as template',
                'Delete'
            ]
        });
    });
});
__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test.describe('actions schema settings', ()=>{
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('edit & delete & duplicate', async (param)=>{
        let { page, mockPage, mockRecord } = param;
        await mockPage(__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.oneEmptyDetailsBlock).goto();
        await mockRecord('general');
        await page.getByLabel('schema-initializer-ActionBar-detailsWithPaging:configureActions-general').hover();
        await page.getByRole('menuitem', {
            name: 'Edit'
        }).click();
        await page.getByRole('menuitem', {
            name: 'Delete'
        }).click();
        await page.mouse.move(0, 300);
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expectSettingsMenu)({
            page,
            showMenu: async ()=>{
                await page.getByRole('button', {
                    name: 'Edit'
                }).hover();
                await page.getByRole('button', {
                    name: 'designer-schema-settings-Action'
                }).hover();
            },
            supportedOptions: [
                'Edit button',
                'Linkage rules',
                'Open mode',
                'Popup size',
                'Delete'
            ]
        });
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expectSettingsMenu)({
            page,
            showMenu: async ()=>{
                await page.getByRole('button', {
                    name: 'Delete'
                }).hover();
                await page.getByRole('button', {
                    name: 'designer-schema-settings-Action'
                }).hover();
            },
            supportedOptions: [
                'Edit button',
                'Linkage rules',
                'Delete'
            ]
        });
    });
});
