@bigbinary/neeto-playwright-commons 1.5.0 → 1.5.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 +2 -1
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ interface ExecuteRecursivelyParams {
|
|
|
17
17
|
}
|
|
18
18
|
type ExecuteRecursively = (params: ExecuteRecursivelyParams) => Promise<void>;
|
|
19
19
|
interface VerifySuccessToastParams {
|
|
20
|
-
message
|
|
20
|
+
message?: string;
|
|
21
21
|
closeAfterVerification: boolean;
|
|
22
22
|
}
|
|
23
23
|
type VerifySuccessToast = (params: VerifySuccessToastParams) => Promise<void>;
|
package/index.js
CHANGED
|
@@ -166,7 +166,7 @@ class CustomCommands {
|
|
|
166
166
|
const startTime = Date.now();
|
|
167
167
|
await this.recursiveMethod(callback, condition, timeout, startTime);
|
|
168
168
|
};
|
|
169
|
-
this.verifySuccessToast = async ({ message, closeAfterVerification = true, }) => {
|
|
169
|
+
this.verifySuccessToast = async ({ message = null, closeAfterVerification = true, }) => {
|
|
170
170
|
if (message) {
|
|
171
171
|
await expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message);
|
|
172
172
|
}
|
|
@@ -175,6 +175,7 @@ class CustomCommands {
|
|
|
175
175
|
}
|
|
176
176
|
closeAfterVerification &&
|
|
177
177
|
(await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
|
|
178
|
+
await expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
|
|
178
179
|
};
|
|
179
180
|
this.reloadAndWait = async (requestCount) => {
|
|
180
181
|
const reloadRequests = this.interceptMultipleResponses({
|