Skip to content

Commit

Permalink
Adapt UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nesrineabdmouleh committed Oct 29, 2024
1 parent 928b91f commit c4ead5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/UI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/UI/pages/BO/catalog/suppliers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class Suppliers extends BOBasePage {
// Do nothing
}
// click on search
await page.locator(this.filterSearchButton).click();
await this.clickAndWaitForURL(page, this.filterSearchButton);
await this.waitForVisibleSelector(page, this.filterResetButton);
}

Expand All @@ -313,7 +313,7 @@ class Suppliers extends BOBasePage {
* @param value {boolean} True if we need to filter by supplier enabled, false if not
* @return {Promise<void>}
*/
async filterSupplierEnabled(page: Page, value: boolean) : Promise<void> {
async filterSupplierEnabled(page: Page, value: boolean): Promise<void> {
await this.filterTable(page, 'select', 'active', value ? 'Yes' : 'No');
}

Expand All @@ -337,8 +337,8 @@ class Suppliers extends BOBasePage {
this.waitForVisibleSelector(page, `${this.bulkActionsToggleButton}[aria-expanded='true']`),
]);

// Click on delete and wait for modal
await page.locator(enable ? this.bulkActionsEnableButton : this.bulkActionsDisableButton).click();
// Click on enable/disable and wait for modal
await this.clickAndWaitForURL(page, enable ? this.bulkActionsEnableButton : this.bulkActionsDisableButton);
return this.getAlertSuccessBlockParagraphContent(page);
}

Expand Down

0 comments on commit c4ead5d

Please sign in to comment.