Skip to content

Commit

Permalink
Merge pull request #470 from Progi1984/boCarriersPage
Browse files Browse the repository at this point in the history
boCarriersPage : Stabilize calls for dnd
  • Loading branch information
Progi1984 authored Mar 11, 2025
2 parents d690aba + 4242b5b commit ec3cabd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/interfaces/BO/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface BOBasePagePageInterface extends CommonPageInterface {
getAlertDangerBlockParagraphContent(page: Page): Promise<string>;
getAlertInfoBlockParagraphContent(page: Page): Promise<string>;
getAlertSuccessBlockContent(page: Frame | Page): Promise<string>;
getAlertSuccessBlockParagraphContent(page: Frame | Page): Promise<string>;
getAlertSuccessBlockParagraphContent(page: Frame | Page, timeout?: number): Promise<string>;
getAllNotificationsNumber(page: Page): Promise<number>;
getCurrentEmployeeAvatar(page: Page): Promise<string | null>;
getGrowlMessageContent(page: Page, timeout?: number): Promise<string | null>;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/BO/BOBasePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,8 @@ export default class BOBasePage extends CommonPage implements BOBasePagePageInte
* @param page {Frame|Page} Browser tab
* @return {Promise<string>}
*/
async getAlertSuccessBlockParagraphContent(page: Frame | Page): Promise<string> {
await this.elementVisible(page, this.alertSuccessBlockParagraph, 2000);
async getAlertSuccessBlockParagraphContent(page: Frame | Page, timeout: number = 2000): Promise<string> {
await this.elementVisible(page, this.alertSuccessBlockParagraph, timeout);
return this.getTextContent(page, this.alertSuccessBlockParagraph);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/commonPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ export default class CommonPage implements CommonPageInterface {
}

// Wait a bit before dropping the element
await page.waitForTimeout(500);
await page.waitForTimeout(2500);
await page.mouse.up();
}

Expand Down
3 changes: 2 additions & 1 deletion src/versions/develop/pages/BO/shipping/carriers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,9 @@ class BOCarriersPage extends BOBasePage implements BOCarriersPageInterface {
*/
async changePosition(page: Page, actualPosition: number, newPosition: number): Promise<string | null> {
await this.dragAndDropSlowly(page, this.tableColumnHandle(actualPosition), this.tableBodyRow(newPosition));
await page.waitForTimeout(6000);

return this.getAlertSuccessBlockParagraphContent(page);
return this.getAlertSuccessBlockParagraphContent(page, 3000);
}
}

Expand Down

0 comments on commit ec3cabd

Please sign in to comment.