@bigbinary/neeto-playwright-commons 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +4 -6
- package/index.cjs.js.map +1 -1
- package/index.js +4 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -159,15 +159,13 @@ class CustomCommands {
|
|
|
159
159
|
};
|
|
160
160
|
this.verifySuccessToast = async ({ message, closeAfterVerification = true, }) => {
|
|
161
161
|
if (message) {
|
|
162
|
-
await expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).
|
|
162
|
+
await expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message);
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
|
-
await expect(this.page.locator(COMMON_SELECTORS.toastIcon)).
|
|
166
|
-
closeAfterVerification &&
|
|
167
|
-
(await this.page
|
|
168
|
-
.getByTestId(COMMON_SELECTORS.toastCloseButton)
|
|
169
|
-
.click());
|
|
165
|
+
await expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍");
|
|
170
166
|
}
|
|
167
|
+
closeAfterVerification &&
|
|
168
|
+
(await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
|
|
171
169
|
};
|
|
172
170
|
this.reloadAndWait = async (requestCount) => {
|
|
173
171
|
const reloadRequests = this.interceptMultipleResponses({
|