@bigbinary/neeto-playwright-commons 1.22.27 → 1.22.29
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 +2723 -2931
- package/index.cjs.js.map +1 -1
- package/index.d.ts +58 -5
- package/index.js +2724 -2932
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ interface SetSliderValueProps {
|
|
|
24
24
|
valueAsPercent: number;
|
|
25
25
|
startFromCenter?: boolean;
|
|
26
26
|
}
|
|
27
|
+
interface ClickButtonAndAwaitLoadProps {
|
|
28
|
+
locator: Locator;
|
|
29
|
+
timeout?: number;
|
|
30
|
+
}
|
|
27
31
|
interface ExecuteRecursivelyParams {
|
|
28
32
|
callback: GenericCallback;
|
|
29
33
|
condition: GenericCallback;
|
|
@@ -49,9 +53,10 @@ interface VerifyHelpPopoverProps {
|
|
|
49
53
|
customPageContext?: Page;
|
|
50
54
|
}
|
|
51
55
|
interface SaveChangesProps {
|
|
52
|
-
closeAfterVerification
|
|
53
|
-
isPane
|
|
54
|
-
customPageContext
|
|
56
|
+
closeAfterVerification: boolean;
|
|
57
|
+
isPane: boolean;
|
|
58
|
+
customPageContext: Page;
|
|
59
|
+
toastMessage: string;
|
|
55
60
|
}
|
|
56
61
|
type ConditionProps = Record<string, string>[];
|
|
57
62
|
type FilterProps = Record<string, ConditionProps>;
|
|
@@ -72,6 +77,10 @@ interface ApiRequestProps {
|
|
|
72
77
|
params?: ParamProps;
|
|
73
78
|
timeout?: number;
|
|
74
79
|
}
|
|
80
|
+
interface ToggleElementProps {
|
|
81
|
+
locator: Locator;
|
|
82
|
+
shouldBeChecked?: boolean;
|
|
83
|
+
}
|
|
75
84
|
interface WaitForPageLoadParams {
|
|
76
85
|
visibilityTimeout: number;
|
|
77
86
|
customPageContext: Page | undefined;
|
|
@@ -493,8 +502,9 @@ declare class CustomCommands {
|
|
|
493
502
|
saveChanges: ({
|
|
494
503
|
isPane,
|
|
495
504
|
customPageContext,
|
|
496
|
-
closeAfterVerification
|
|
497
|
-
|
|
505
|
+
closeAfterVerification,
|
|
506
|
+
toastMessage
|
|
507
|
+
}?: Partial<SaveChangesProps>) => Promise<[void, false | void, void]>;
|
|
498
508
|
/**
|
|
499
509
|
*
|
|
500
510
|
* Method to hide the tooltip.
|
|
@@ -628,6 +638,46 @@ declare class CustomCommands {
|
|
|
628
638
|
title,
|
|
629
639
|
description
|
|
630
640
|
}: AssertCardDetailsProps) => Promise<[void, void, void]>;
|
|
641
|
+
/**
|
|
642
|
+
*
|
|
643
|
+
* Method to click a button and wait for any loading spinners to disappear.
|
|
644
|
+
*
|
|
645
|
+
* locator: The Playwright Locator for the button to click.
|
|
646
|
+
*
|
|
647
|
+
* timeout (optional): Timeout in milliseconds for the click operation. Default is 10_000ms.
|
|
648
|
+
*
|
|
649
|
+
* @example
|
|
650
|
+
*
|
|
651
|
+
* await neetoPlaywrightUtilities.clickButtonAndAwaitLoad({
|
|
652
|
+
* locator: page.getByTestId("save-button"),
|
|
653
|
+
* timeout: 15_000
|
|
654
|
+
* });
|
|
655
|
+
* @endexample
|
|
656
|
+
*/
|
|
657
|
+
clickButtonAndAwaitLoad: ({
|
|
658
|
+
locator,
|
|
659
|
+
timeout
|
|
660
|
+
}: ClickButtonAndAwaitLoadProps) => Promise<void>;
|
|
661
|
+
/**
|
|
662
|
+
*
|
|
663
|
+
* Method to toggle the checked state of an element (like checkboxes, radio buttons, or switches).
|
|
664
|
+
*
|
|
665
|
+
* locator: The Playwright Locator for the element to toggle.
|
|
666
|
+
*
|
|
667
|
+
* shouldBeChecked (optional): Boolean indicating the desired checked state. Default is true.
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
*
|
|
671
|
+
* await neetoPlaywrightUtilities.toggleElement({
|
|
672
|
+
* locator: page.getByTestId("checkbox"),
|
|
673
|
+
* shouldBeChecked: true,
|
|
674
|
+
* });
|
|
675
|
+
* @endexample
|
|
676
|
+
*/
|
|
677
|
+
toggleElement: ({
|
|
678
|
+
locator,
|
|
679
|
+
shouldBeChecked
|
|
680
|
+
}: ToggleElementProps) => Promise<void>;
|
|
631
681
|
}
|
|
632
682
|
declare class ApiKeysApi {
|
|
633
683
|
private neetoPlaywrightUtilities;
|
|
@@ -1807,6 +1857,7 @@ declare class GooglePage extends IntegrationBase {
|
|
|
1807
1857
|
integration,
|
|
1808
1858
|
integrationRouteIndex
|
|
1809
1859
|
}: GooglePageParams);
|
|
1860
|
+
waitForGoogleAuthURL: () => Promise<void>;
|
|
1810
1861
|
/**
|
|
1811
1862
|
*
|
|
1812
1863
|
* Connects to the Google account for integration.
|
|
@@ -2788,6 +2839,7 @@ declare class TeamMembers {
|
|
|
2788
2839
|
emails?: string[];
|
|
2789
2840
|
role?: string;
|
|
2790
2841
|
}) => Promise<void>;
|
|
2842
|
+
submit: () => Promise<void>;
|
|
2791
2843
|
/**
|
|
2792
2844
|
*
|
|
2793
2845
|
* Used to search and verify the member by providing email as the search term. It takes the following parameters:
|
|
@@ -4349,6 +4401,7 @@ declare const THIRD_PARTY_ROUTES: {
|
|
|
4349
4401
|
challengeSelection: string;
|
|
4350
4402
|
myAccount: string;
|
|
4351
4403
|
chooseAccount: string;
|
|
4404
|
+
accountchooser: string;
|
|
4352
4405
|
consentScreen: string;
|
|
4353
4406
|
warningScreen: string;
|
|
4354
4407
|
additionalInfoScreen: string;
|