import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__ from "@tachybase/test/e2e";
import * as __WEBPACK_EXTERNAL_MODULE__templatesOfPage_mjs__ from "./templatesOfPage.mjs";
(0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.test)('basic', async (param)=>{
    let { page, mockPage, mockRecord } = param;
    await mockPage(__WEBPACK_EXTERNAL_MODULE__templatesOfPage_mjs__.disassociatePage).goto();
    const record = await mockRecord('collection1');
    await page.getByLabel('action-Action.Link-Edit record-update-collection1-table-0').click();
    await page.getByLabel('schema-initializer-Grid-popup').hover();
    await page.getByRole('menuitem', {
        name: 'table Table right'
    }).hover();
    await page.getByRole('menuitem', {
        name: 'Associated records'
    }).hover();
    await page.getByRole('menuitem', {
        name: 'manyToMany'
    }).click();
    await page.getByTestId('drawer-Action.Container-collection1-Edit record').getByLabel('schema-initializer-TableV2-').hover();
    await page.getByRole('menuitem', {
        name: 'singleLineText'
    }).click();
    await page.getByTestId('drawer-Action.Container-collection1-Edit record').getByRole('button', {
        name: 'Actions',
        exact: true
    }).hover();
    await page.getByTestId('drawer-Action.Container-collection1-Edit record').getByLabel('designer-schema-settings-TableV2.Column-TableV2.ActionColumnDesigner-collection2').hover();
    await page.getByRole('menuitem', {
        name: 'Disassociate'
    }).click();
    await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByTestId('drawer-Action.Container-collection1-Edit record').getByLabel('block-item-CardItem-').getByText(record.manyToMany[0].singleLineText)).toBeVisible();
    await page.getByLabel('action-Action.Link-Disassociate-disassociate-collection2-table-0').click();
    await page.getByRole('button', {
        name: 'OK',
        exact: true
    }).click();
    await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByTestId('drawer-Action.Container-collection1-Edit record').getByLabel('block-item-CardItem-').getByText(record.manyToMany[0].singleLineText)).toBeHidden();
    await page.reload();
    await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_e2e__.expect)(page.getByLabel('block-item-CardItem-collection2-table').getByText(record.manyToMany[0].singleLineText)).toBeVisible();
});
