|
|
@ -24,16 +24,25 @@ export class ExpandedFormPage extends BasePage { |
|
|
|
return this.dashboard.get().locator(`.nc-drawer-expanded-form`); |
|
|
|
return this.dashboard.get().locator(`.nc-drawer-expanded-form`); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async clickDuplicateRow() { |
|
|
|
async click3DotsMenu(menuItem: string) { |
|
|
|
await this.duplicateRowButton.click(); |
|
|
|
await this.get().locator('.nc-icon-transition.ant-dropdown-trigger').last().click(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// add delay; wait for the menu to appear
|
|
|
|
|
|
|
|
await this.rootPage.waitForTimeout(500); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const popUpMenu = await this.rootPage.locator('.ant-dropdown'); |
|
|
|
|
|
|
|
await popUpMenu.locator(`.ant-dropdown-menu-item:has-text("${menuItem}")`).click(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async clickDuplicateRow() { |
|
|
|
|
|
|
|
await this.click3DotsMenu('Duplicate Row'); |
|
|
|
// wait for loader to disappear
|
|
|
|
// wait for loader to disappear
|
|
|
|
// await this.dashboard.waitForLoaderToDisappear();
|
|
|
|
// await this.dashboard.waitForLoaderToDisappear();
|
|
|
|
await this.rootPage.waitForTimeout(2000); |
|
|
|
await this.rootPage.waitForTimeout(2000); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async clickDeleteRow() { |
|
|
|
async clickDeleteRow() { |
|
|
|
await this.deleteRowButton.click(); |
|
|
|
await this.click3DotsMenu('Delete Row'); |
|
|
|
await this.rootPage.locator('.ant-btn-primary:has-text("OK")').click(); |
|
|
|
await this.rootPage.locator('.ant-btn-primary:has-text("OK")').click(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -142,17 +151,7 @@ export class ExpandedFormPage extends BasePage { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async close() { |
|
|
|
async close() { |
|
|
|
await this.get().locator('.nc-icon-transition.ant-dropdown-trigger').last().click(); |
|
|
|
await this.click3DotsMenu('Close'); |
|
|
|
|
|
|
|
|
|
|
|
// TODO: fix this; remove the delay
|
|
|
|
|
|
|
|
// await this.rootPage.locator('.ant-dropdown').waitFor({ state: 'visible' });
|
|
|
|
|
|
|
|
// await this.rootPage.locator('.ant-dropdown').locator('.ant-dropdown-menu-item:has-text("Close")').click();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// add delay; wait for the menu to appear
|
|
|
|
|
|
|
|
await this.rootPage.waitForTimeout(500); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const popUpMenu = await this.rootPage.locator('.ant-dropdown'); |
|
|
|
|
|
|
|
await popUpMenu.locator('.ant-dropdown-menu-item:has-text("Close")').click(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async openChildCard(param: { column: string; title: string }) { |
|
|
|
async openChildCard(param: { column: string; title: string }) { |
|
|
|