|
|
@ -329,13 +329,24 @@ export class CellPageObject extends BasePage { |
|
|
|
|
|
|
|
|
|
|
|
async unlinkVirtualCell({ index, columnHeader }: CellProps) { |
|
|
|
async unlinkVirtualCell({ index, columnHeader }: CellProps) { |
|
|
|
const cell = this.get({ index, columnHeader }); |
|
|
|
const cell = this.get({ index, columnHeader }); |
|
|
|
await cell.locator('.nc-datatype-link').click(); |
|
|
|
const isLink = await cell.locator('.nc-datatype-link').count(); |
|
|
|
await this.waitForResponse({ |
|
|
|
|
|
|
|
uiAction: () => this.rootPage.locator(`[data-testid="nc-child-list-icon-unlink"]`).first().click(), |
|
|
|
// Count will be 0 for BT columns
|
|
|
|
requestUrlPathToMatch: '/api/v1/db/data/noco/', |
|
|
|
if (!isLink) { |
|
|
|
httpMethodsToMatch: ['GET'], |
|
|
|
await cell.click(); |
|
|
|
}); |
|
|
|
await cell.locator('.nc-icon.unlink-icon').click(); |
|
|
|
await this.rootPage.keyboard.press('Escape'); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// For HM/MM columns
|
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
await cell.locator('.nc-datatype-link').click(); |
|
|
|
|
|
|
|
await this.waitForResponse({ |
|
|
|
|
|
|
|
uiAction: () => this.rootPage.locator(`[data-testid="nc-child-list-icon-unlink"]`).first().click(), |
|
|
|
|
|
|
|
requestUrlPathToMatch: '/api/v1/db/data/noco/', |
|
|
|
|
|
|
|
httpMethodsToMatch: ['GET'], |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
await this.rootPage.keyboard.press('Escape'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async verifyRoleAccess(param: { role: string }) { |
|
|
|
async verifyRoleAccess(param: { role: string }) { |
|
|
|