@bigbinary/neeto-playwright-commons 4.8.13 → 4.8.14
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.d.ts +1 -1
- package/index.js +6 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -686,7 +686,7 @@ declare class CustomCommands {
|
|
|
686
686
|
*
|
|
687
687
|
* Method to verify the presence and content of the unsaved changes modal.
|
|
688
688
|
*
|
|
689
|
-
* shouldLeavePage (optional): A boolean indicating whether to
|
|
689
|
+
* shouldLeavePage (optional): A boolean indicating whether to leave the page by discarding the changes (true) or stay on the page by closing the modal without saving (false). Defaults to false.
|
|
690
690
|
*
|
|
691
691
|
* @example
|
|
692
692
|
*
|
package/index.js
CHANGED
|
@@ -2482,10 +2482,12 @@ class CustomCommands {
|
|
|
2482
2482
|
).toHaveText("Are you sure you want to leave? All unsaved changes will be lost."),
|
|
2483
2483
|
expect(this.page.getByTestId(COMMON_SELECTORS.alertTitle)).toHaveText("You have unsaved changes"),
|
|
2484
2484
|
]);
|
|
2485
|
-
const
|
|
2486
|
-
? COMMON_SELECTORS.alertCancelButton
|
|
2487
|
-
:
|
|
2488
|
-
|
|
2485
|
+
const actionButton = shouldLeavePage
|
|
2486
|
+
? alertBox.getByTestId(COMMON_SELECTORS.alertCancelButton)
|
|
2487
|
+
: alertBox
|
|
2488
|
+
.getByTestId(COMMON_SELECTORS.dialogCloseButton)
|
|
2489
|
+
.or(alertBox.getByTestId(COMMON_SELECTORS.alertModalCrossIcon));
|
|
2490
|
+
await actionButton.click();
|
|
2489
2491
|
await expect(alertBox).toBeHidden();
|
|
2490
2492
|
};
|
|
2491
2493
|
setSliderValue = async ({ parentLocator = this.page, valueAsPercent, startFromCenter = false, }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.14",
|
|
4
4
|
"description": "A package encapsulating common playwright code across neeto projects.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
|
|
6
6
|
"license": "apache-2.0",
|