Browse Source

test: wait for child listing and unlink response

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5624/head
mertmit 1 year ago
parent
commit
bda1911348
  1. 12
      tests/playwright/pages/Dashboard/common/Cell/index.ts

12
tests/playwright/pages/Dashboard/common/Cell/index.ts

@ -291,7 +291,11 @@ export class CellPageObject extends BasePage {
// arrow expand doesn't exist for bt columns
if (await arrow_expand.count()) {
await arrow_expand.click();
await this.waitForResponse({
uiAction: () => arrow_expand.click(),
requestUrlPathToMatch: '/api/v1/db',
httpMethodsToMatch: ['GET'],
});
// wait for child list to open
await this.rootPage.waitForSelector('.nc-modal-child-list:visible');
@ -309,7 +313,11 @@ export class CellPageObject extends BasePage {
async unlinkVirtualCell({ index, columnHeader }: CellProps) {
const cell = this.get({ index, columnHeader });
await cell.click();
await cell.locator('.unlink-icon').first().click();
await this.waitForResponse({
uiAction: () => cell.locator('.unlink-icon').first().click(),
requestUrlPathToMatch: '/api/v1/db/data/noco/',
httpMethodsToMatch: ['GET'],
});
}
async verifyRoleAccess(param: { role: string }) {

Loading…
Cancel
Save