"use strict";
var __webpack_exports__ = {};
const e2e_namespaceObject = require("@tachybase/test/e2e");
e2e_namespaceObject.test.describe('tabs schema settings', ()=>{
    let commonPage;
    let commonPageUrl;
    e2e_namespaceObject.test.beforeAll(async (param)=>{
        let { mockManualDestroyPage } = param;
        commonPage = await mockManualDestroyPage(e2e_namespaceObject.oneEmptyTableBlockWithActions).waitForInit();
        commonPageUrl = await commonPage.getUrl();
    });
    e2e_namespaceObject.test.afterAll(async ()=>{
        await commonPage.destroy();
    });
    async function showSettings(page) {
        await page.getByTestId('drawer-Action.Container-general-Add record').getByText('Add new').hover();
        await page.getByLabel('designer-schema-settings-Tabs.TabPane-Tabs.Designer-general').hover();
    }
    (0, e2e_namespaceObject.test)('edit', async (param)=>{
        let { page } = param;
        await page.goto(commonPageUrl);
        await page.getByRole('button', {
            name: 'Add new'
        }).click();
        await showSettings(page);
        await page.getByRole('menuitem', {
            name: 'Edit',
            exact: true
        }).click();
        await page.mouse.move(300, 0);
        await page.getByLabel('block-item-Input-general-Tab name').getByRole('textbox').click();
        await page.getByLabel('block-item-Input-general-Tab name').getByRole('textbox').fill('Add new with new name');
        await page.getByRole('button', {
            name: 'Select icon'
        }).click();
        await page.getByLabel('account-book').locator('svg').click();
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, e2e_namespaceObject.expect)(page.getByText('Add new with new name')).toBeVisible();
        await (0, e2e_namespaceObject.expect)(page.getByLabel('account-book').locator('svg')).toBeVisible();
    });
    (0, e2e_namespaceObject.test)('delete', async (param)=>{
        let { page } = param;
        await page.goto(commonPageUrl);
        await page.getByRole('button', {
            name: 'Add new'
        }).click();
        await showSettings(page);
        await page.getByRole('menuitem', {
            name: 'Delete',
            exact: true
        }).click();
        await page.getByRole('button', {
            name: 'OK',
            exact: true
        }).click();
        await (0, e2e_namespaceObject.expect)(page.getByTestId('drawer-Action.Container-general-Add record').getByText('Add new')).toBeHidden();
    });
});
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
});
