-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into MERX-1262-onboarding-component-accordion
- Loading branch information
Showing
7 changed files
with
35 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
Merged expectSuccessBannerMessage and expectSuccessBanner into a single method, removed the redundant method, and updated tests to use the new unified method. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,20 +102,21 @@ export class BasePage { | |
await this.saveButton.click(); | ||
} | ||
|
||
async expectSuccessBannerMessage(msg: string) { | ||
await this.successBanner.locator(`text=${msg}`).waitFor({ state: "visible", timeout: 10000 }); | ||
await expect(this.errorBanner, "No error banner should be visible").not.toBeVisible(); | ||
} | ||
|
||
async expectErrorBannerMessage(msg: string) { | ||
await this.errorBanner.locator(`text=${msg}`).waitFor({ state: "visible", timeout: 10000 }); | ||
} | ||
|
||
async expectSuccessBanner(timeout = SUCCESS_BANNER_TIMEOUT) { | ||
await this.successBanner.first().waitFor({ | ||
state: "visible", | ||
timeout, | ||
}); | ||
async expectSuccessBanner( | ||
options: { message?: string; timeout?: number } = { timeout: SUCCESS_BANNER_TIMEOUT }, | ||
) { | ||
if (options.message) { | ||
await this.successBanner | ||
.locator(`text=${options.message}`) | ||
.waitFor({ state: "visible", timeout: options.timeout }); | ||
} else { | ||
await this.successBanner.first().waitFor({ state: "visible", timeout: options.timeout }); | ||
Check failure on line 117 in playwright/pages/basePage.ts
|
||
} | ||
|
||
await expect(this.errorBanner, "No error banner should be visible").not.toBeVisible(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters