"use strict";
var __webpack_exports__ = {};
const e2e_namespaceObject = require("@tachybase/test/e2e");
const external_templatesOfPage_js_namespaceObject = require("./templatesOfPage.js");
(0, e2e_namespaceObject.test)('basic', async (param)=>{
    let { page, mockPage, mockRecord } = param;
    await mockPage(external_templatesOfPage_js_namespaceObject.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, e2e_namespaceObject.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, e2e_namespaceObject.expect)(page.getByTestId('drawer-Action.Container-collection1-Edit record').getByLabel('block-item-CardItem-').getByText(record.manyToMany[0].singleLineText)).toBeHidden();
    await page.reload();
    await (0, e2e_namespaceObject.expect)(page.getByLabel('block-item-CardItem-collection2-table').getByText(record.manyToMany[0].singleLineText)).toBeVisible();
});
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
});
