import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__ from "@tachybase/test/e2e";
__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test.describe('tabs schema settings', ()=>{
    let commonPage;
    let commonPageUrl;
    __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test.beforeAll(async (param)=>{
        let { mockManualDestroyPage } = param;
        commonPage = await mockManualDestroyPage(__WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.oneEmptyTableBlockWithActions).waitForInit();
        commonPageUrl = await commonPage.getUrl();
    });
    __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.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, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.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, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByText('Add new with new name')).toBeVisible();
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByLabel('account-book').locator('svg')).toBeVisible();
    });
    (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.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, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByTestId('drawer-Action.Container-general-Add record').getByText('Add new')).toBeHidden();
    });
});
