"use strict";
var __webpack_exports__ = {};
const e2e_namespaceObject = require("@tachybase/test/e2e");
e2e_namespaceObject.test.describe('collapse schema settings', ()=>{
    (0, e2e_namespaceObject.test)('supported options', async (param)=>{
        let { page, mockPage } = param;
        await mockPage(e2e_namespaceObject.oneEmptyFilterCollapseBlock).goto();
        await (0, e2e_namespaceObject.expectSettingsMenu)({
            page,
            showMenu: async ()=>{
                await page.getByLabel('block-item-CardItem-general-filter-collapse').hover();
                await page.getByLabel('designer-schema-settings-CardItem-AssociationFilter.BlockDesigner-general').hover();
            },
            supportedOptions: [
                'Edit block title',
                'Save as template',
                'Connect data blocks',
                'Delete'
            ]
        });
    });
    e2e_namespaceObject.test.describe('connect data blocks', ()=>{
        (0, e2e_namespaceObject.test)('connecting two blocks of the same collection', async (param)=>{
            let { page, mockPage, mockRecords } = param;
            const nocoPage = await mockPage(e2e_namespaceObject.oneCollapseAndOneTableWithSameCollection).waitForInit();
            const records = await mockRecords('general', [
                {
                    singleSelect: 'option1'
                },
                {
                    singleSelect: 'option2'
                },
                {
                    singleSelect: 'option3'
                }
            ]);
            await nocoPage.goto();
            await page.getByLabel('block-item-CardItem-general-filter-collapse').hover();
            await page.getByLabel('designer-schema-settings-CardItem-AssociationFilter.BlockDesigner-general').hover();
            await page.getByRole('menuitem', {
                name: 'Connect data blocks'
            }).hover();
            await page.getByRole('menuitem', {
                name: 'General'
            }).click();
            await page.getByRole('button', {
                name: 'right singleSelect search'
            }).click();
            await page.getByLabel('block-item-CardItem-general-filter-collapse').getByText('Option1').click();
            await (0, e2e_namespaceObject.expect)(page.getByLabel('block-item-CardItem-general-table').getByRole('row', {
                name: 'Option2'
            })).toBeHidden();
            await (0, e2e_namespaceObject.expect)(page.getByLabel('block-item-CardItem-general-table').getByRole('row', {
                name: 'Option3'
            })).toBeHidden();
            await (0, e2e_namespaceObject.expect)(page.getByLabel('block-item-CardItem-general-table').getByRole('row', {
                name: 'Option1'
            })).toBeVisible();
            await page.getByLabel('block-item-CardItem-general-filter-collapse').getByText('Option1').click();
            await (0, e2e_namespaceObject.expect)(page.getByLabel('block-item-CardItem-general-table').getByRole('row')).toHaveCount(records.length + 1);
        });
    });
});
e2e_namespaceObject.test.describe('fields schema settings', ()=>{});
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
});
