Skip to content

Commit

Permalink
Merge pull request #420 from florine2623/editEditShopGroupMethod
Browse files Browse the repository at this point in the history
Edit @pages/BO/advancedParameters/multistore for Core
  • Loading branch information
Progi1984 authored Feb 20, 2025
2 parents 2b0c9a4 + e44f91d commit 648840c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class BOMultistorePage extends BOBasePage implements BOMultistorePageInterface {

private readonly sortColumnDiv: (number: number) => string;

private readonly editGroupButton: (row: number) => string;

/**
* @constructs
* Setting up texts and selectors to use on multistore page
Expand Down Expand Up @@ -123,6 +125,7 @@ class BOMultistorePage extends BOBasePage implements BOMultistorePageInterface {
this.tableColumnActionsToggleButton = (row: number) => `${this.tableColumnActions(row)} button.dropdown-toggle`;
this.tableColumnActionsDropdownMenu = (row: number) => `${this.tableColumnActions(row)} .dropdown-menu`;
this.tableColumnActionsDeleteLink = (row: number) => `${this.tableColumnActionsDropdownMenu(row)} a.delete`;
this.editGroupButton = (row: number) => `${this.tableBodyColumn(row)} .btn-group a.edit`;

// Confirmation modal
this.deleteModalButtonYes = '#popup_ok';
Expand Down Expand Up @@ -220,7 +223,11 @@ class BOMultistorePage extends BOBasePage implements BOMultistorePageInterface {
* @return {Promise<void>}
*/
async gotoEditShopGroupPage(page: Page, row: number): Promise<void> {
await this.clickAndWaitForURL(page, this.tableColumnActionsEditLink(row));
if (await this.elementVisible(page, this.tableColumnActionsEditLink(row), 2000)) {
await page.locator(this.tableColumnActionsEditLink(row)).click();
return;
}
await page.locator(this.editGroupButton(row)).click();
}

/**
Expand Down

0 comments on commit 648840c

Please sign in to comment.