@bigbinary/neeto-playwright-commons 1.16.3 → 1.16.4
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 +13 -3
- package/index.cjs.js.map +1 -1
- package/index.d.ts +15 -1
- package/index.js +13 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3914,8 +3914,14 @@ class CustomCommands {
|
|
|
3914
3914
|
await test$1.expect(customPageContext.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍", { timeout });
|
|
3915
3915
|
}
|
|
3916
3916
|
if (closeAfterVerification && (await toastrCloseButton.isVisible())) {
|
|
3917
|
-
await toastrCloseButton.
|
|
3918
|
-
|
|
3917
|
+
const buttonHandle = await toastrCloseButton.elementHandle();
|
|
3918
|
+
if (buttonHandle) {
|
|
3919
|
+
await customPageContext.evaluate(button => {
|
|
3920
|
+
button.dispatchEvent(new Event("click", { bubbles: true }));
|
|
3921
|
+
}, buttonHandle);
|
|
3922
|
+
// eslint-disable-next-line playwright/no-standalone-expect
|
|
3923
|
+
await test$1.expect(toastrCloseButton).toBeHidden();
|
|
3924
|
+
}
|
|
3919
3925
|
}
|
|
3920
3926
|
};
|
|
3921
3927
|
this.reloadAndWait = async (requestCount, customPageContext, interceptMultipleResponsesProps = {}) => {
|
|
@@ -4027,8 +4033,12 @@ class CustomCommands {
|
|
|
4027
4033
|
}, { buffer, fileNameWithType });
|
|
4028
4034
|
await droppableZone.dispatchEvent(dispatchEvent, { dataTransfer });
|
|
4029
4035
|
};
|
|
4030
|
-
this.
|
|
4036
|
+
this.hoverOnElement = (triggerElement, customPageContext = this.page) => test$1.expect(async () => {
|
|
4031
4037
|
await triggerElement.hover();
|
|
4038
|
+
await test$1.expect(customPageContext.getByTestId(COMMON_SELECTORS.tooltip)).toBeVisible({ timeout: 3000 });
|
|
4039
|
+
}).toPass({ timeout: 10000 });
|
|
4040
|
+
this.verifyTooltip = async ({ triggerElement, content, customPageContext = this.page, }) => {
|
|
4041
|
+
await this.hoverOnElement(triggerElement, customPageContext);
|
|
4032
4042
|
await test$1.expect(customPageContext.getByTestId(COMMON_SELECTORS.tooltip)).toContainText(content);
|
|
4033
4043
|
await this.hideTooltip(triggerElement, customPageContext);
|
|
4034
4044
|
};
|