@bigbinary/neeto-playwright-commons 1.9.1 → 1.9.2
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 +9 -6
- package/index.cjs.js.map +1 -1
- package/index.d.ts +7 -5
- package/index.js +9 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -42,8 +42,7 @@ interface ApiRequestProps {
|
|
|
42
42
|
params?: ParamProps;
|
|
43
43
|
}
|
|
44
44
|
interface WaitForPageLoadParams {
|
|
45
|
-
|
|
46
|
-
retryTimeout: number;
|
|
45
|
+
visibilityTimeout: number;
|
|
47
46
|
customPageContext: Page | undefined;
|
|
48
47
|
}
|
|
49
48
|
type ApiRequest = (props: ApiRequestProps & Record<string, unknown>) => Promise<APIResponse | undefined>;
|
|
@@ -57,7 +56,7 @@ interface SelectOptionFromDropdownParams {
|
|
|
57
56
|
selectMenu: string;
|
|
58
57
|
value: string;
|
|
59
58
|
options?: Partial<{
|
|
60
|
-
|
|
59
|
+
visibilityTimeout: number;
|
|
61
60
|
textAssertionTimeout: number;
|
|
62
61
|
retryTimeout: number;
|
|
63
62
|
}>;
|
|
@@ -152,9 +151,9 @@ declare class CustomCommands {
|
|
|
152
151
|
*/
|
|
153
152
|
reloadAndWait: (requestCount: number, customPageContext?: Page, interceptMultipleResponsesProps?: Partial<Omit<InterceptMultipleResponsesParams, "times">>) => Promise<void>;
|
|
154
153
|
waitForPageLoad: ({
|
|
155
|
-
|
|
154
|
+
visibilityTimeout,
|
|
156
155
|
customPageContext
|
|
157
|
-
}
|
|
156
|
+
}?: Partial<WaitForPageLoadParams>) => Promise<void>;
|
|
158
157
|
/**
|
|
159
158
|
*
|
|
160
159
|
* Command to send a request.
|
|
@@ -802,6 +801,9 @@ declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling",
|
|
|
802
801
|
* @endexample
|
|
803
802
|
*/
|
|
804
803
|
declare const COMMON_SELECTORS: {
|
|
804
|
+
emailInputError: string;
|
|
805
|
+
pane: string;
|
|
806
|
+
sideBar: string;
|
|
805
807
|
copyButton: string;
|
|
806
808
|
spinner: string;
|
|
807
809
|
subheaderText: string;
|
package/index.js
CHANGED
|
@@ -158,6 +158,9 @@ const getByDataQA = curry((page, dataQa) => {
|
|
|
158
158
|
});
|
|
159
159
|
|
|
160
160
|
const COMMON_SELECTORS = {
|
|
161
|
+
emailInputError: "email-input-error",
|
|
162
|
+
pane: "pane-wrapper",
|
|
163
|
+
sideBar: "sidebar",
|
|
161
164
|
copyButton: "copy-button",
|
|
162
165
|
spinner: ".neeto-ui-spinner",
|
|
163
166
|
subheaderText: "subheader-left",
|
|
@@ -2551,15 +2554,15 @@ class CustomCommands {
|
|
|
2551
2554
|
await pageContext.reload();
|
|
2552
2555
|
await reloadRequests;
|
|
2553
2556
|
};
|
|
2554
|
-
this.waitForPageLoad = async ({
|
|
2557
|
+
this.waitForPageLoad = async ({ visibilityTimeout = 35000, customPageContext, } = {}) => {
|
|
2555
2558
|
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
2556
2559
|
await pageContext.waitForLoadState("load");
|
|
2557
2560
|
await Promise.all([
|
|
2558
2561
|
expect(pageContext.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({
|
|
2559
|
-
timeout:
|
|
2562
|
+
timeout: visibilityTimeout,
|
|
2560
2563
|
}),
|
|
2561
2564
|
expect(pageContext.getByTestId(COMMON_SELECTORS.spinner)).toBeHidden({
|
|
2562
|
-
timeout:
|
|
2565
|
+
timeout: visibilityTimeout,
|
|
2563
2566
|
}),
|
|
2564
2567
|
]);
|
|
2565
2568
|
};
|
|
@@ -2586,14 +2589,14 @@ class CustomCommands {
|
|
|
2586
2589
|
};
|
|
2587
2590
|
this.selectOptionFromDropdown = async ({ selectValueContainer, selectMenu, value, options = {}, }) => {
|
|
2588
2591
|
Object.assign({
|
|
2589
|
-
|
|
2592
|
+
visibilityTimeout: 2000,
|
|
2590
2593
|
textAssertionTimeout: 1000,
|
|
2591
2594
|
retryTimeout: 20000,
|
|
2592
2595
|
}, options);
|
|
2593
2596
|
await expect(async () => {
|
|
2594
2597
|
await this.page.getByTestId(selectValueContainer).click();
|
|
2595
2598
|
await expect(this.page.getByTestId(selectMenu)).toBeVisible({
|
|
2596
|
-
timeout: options.
|
|
2599
|
+
timeout: options.visibilityTimeout,
|
|
2597
2600
|
});
|
|
2598
2601
|
await this.page.getByTestId(selectMenu).getByText(value).click();
|
|
2599
2602
|
await expect(this.page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
|
|
@@ -13855,7 +13858,7 @@ const ROLES_SELECTORS = {
|
|
|
13855
13858
|
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
13856
13859
|
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
13857
13860
|
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
13858
|
-
deleteRoleButton: "
|
|
13861
|
+
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
13859
13862
|
permissionCard: "ntm-roles-permission-card",
|
|
13860
13863
|
};
|
|
13861
13864
|
|