import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__ from "@tachybase/test/e2e";
__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test.describe('tree table block schema settings', ()=>{
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('supported options', async (param)=>{
        let { page, mockPage } = param;
        await mockPage(__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.oneEmptyTableWithTreeCollection).goto();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expectSettingsMenu)({
            page,
            showMenu: ()=>showSettingsMenu(page),
            supportedOptions: [
                'Edit block title',
                'Tree table',
                'Enable drag and drop sorting',
                'Fix block',
                'Set the data scope',
                'Set default sorting rules',
                'Records per page',
                'Connect data blocks',
                'Save as template',
                'Delete'
            ]
        });
    });
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('tree table', async (param)=>{
        let { page, mockPage, mockRecords } = param;
        const nocoPage = await mockPage(__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.oneEmptyTableWithTreeCollection).waitForInit();
        await nocoPage.goto();
        await showSettingsMenu(page);
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByRole('menuitem', {
            name: 'Tree table'
        }).getByRole('switch')).toBeChecked();
        await page.getByRole('menuitem', {
            name: 'Tree table'
        }).click();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByRole('menuitem', {
            name: 'Tree table'
        }).getByRole('switch')).not.toBeChecked();
    });
});
async function showSettingsMenu(page) {
    await page.getByLabel('block-item-CardItem-treeCollection-table').hover();
    await page.getByLabel('designer-schema-settings-CardItem-TableBlockDesigner-treeCollection').hover();
}
