"use strict";
var __webpack_exports__ = {};
const e2e_namespaceObject = require("@tachybase/test/e2e");
e2e_namespaceObject.test.describe('tree table block schema settings', ()=>{
    (0, e2e_namespaceObject.test)('supported options', async (param)=>{
        let { page, mockPage } = param;
        await mockPage(e2e_namespaceObject.oneEmptyTableWithTreeCollection).goto();
        await (0, e2e_namespaceObject.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, e2e_namespaceObject.test)('tree table', async (param)=>{
        let { page, mockPage, mockRecords } = param;
        const nocoPage = await mockPage(e2e_namespaceObject.oneEmptyTableWithTreeCollection).waitForInit();
        await nocoPage.goto();
        await showSettingsMenu(page);
        await (0, e2e_namespaceObject.expect)(page.getByRole('menuitem', {
            name: 'Tree table'
        }).getByRole('switch')).toBeChecked();
        await page.getByRole('menuitem', {
            name: 'Tree table'
        }).click();
        await (0, e2e_namespaceObject.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();
}
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
});
