@bigbinary/neeto-playwright-commons 1.9.9 → 1.9.11
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/configs/scripts/jsdoc-builder/utils.mjs +35 -6
- package/index.cjs.js +9 -7
- package/index.cjs.js.map +1 -1
- package/index.d.ts +2550 -158
- package/index.js +9 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ import _traverse from "@babel/traverse";
|
|
|
28
28
|
import _generate from "@babel/generator";
|
|
29
29
|
|
|
30
30
|
import { matches } from "@bigbinary/neeto-cist";
|
|
31
|
+
import { endsWith } from "ramda";
|
|
31
32
|
|
|
32
33
|
const traverse = _traverse.default;
|
|
33
34
|
const generate = _generate.default;
|
|
@@ -79,7 +80,9 @@ const getParagraphChildrenText = node => {
|
|
|
79
80
|
const children = node.children;
|
|
80
81
|
if (children.length === 1) return children[0].value;
|
|
81
82
|
|
|
82
|
-
return children
|
|
83
|
+
return children
|
|
84
|
+
.map(child => child.value || child.children?.[0]?.value)
|
|
85
|
+
.join("");
|
|
83
86
|
};
|
|
84
87
|
|
|
85
88
|
const transformParagraph = node => {
|
|
@@ -206,14 +209,15 @@ export const defaultTypeFileTraverser = options => {
|
|
|
206
209
|
export const findVariableDeclarationName = node =>
|
|
207
210
|
node?.declarations?.[0]?.id?.name || node?.declaration?.id?.name;
|
|
208
211
|
|
|
212
|
+
export const isUtil = entityName => endsWith("Utils", entityName);
|
|
213
|
+
|
|
209
214
|
export const findClassPropertyName = node => node?.key?.name;
|
|
210
215
|
|
|
211
|
-
export const
|
|
216
|
+
export const handleEntity = (
|
|
212
217
|
node,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const entityName = extractEntityName(node);
|
|
218
|
+
entityTitleToDescMapOfAllFiles,
|
|
219
|
+
entityName
|
|
220
|
+
) => {
|
|
217
221
|
const entityDesc = entityTitleToDescMapOfAllFiles[entityName];
|
|
218
222
|
|
|
219
223
|
if (!entityName || !entityDesc) {
|
|
@@ -221,6 +225,31 @@ export const handleNode = ({
|
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
babelTypes.addComment(node, "leading", entityDesc);
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export const handleUtilityMethods = (node, entityTitleToDescMapOfAllFiles) => {
|
|
231
|
+
const members =
|
|
232
|
+
node?.declarations?.[0]?.id?.typeAnnotation?.typeAnnotation?.members;
|
|
233
|
+
|
|
234
|
+
members.map(methodNode => {
|
|
235
|
+
handleEntity(
|
|
236
|
+
methodNode,
|
|
237
|
+
entityTitleToDescMapOfAllFiles,
|
|
238
|
+
methodNode.key.name
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export const handleNode = ({
|
|
244
|
+
node,
|
|
245
|
+
extractEntityName,
|
|
246
|
+
options: { entityTitleToDescMapOfAllFiles, typeFileName, typeFileAST },
|
|
247
|
+
}) => {
|
|
248
|
+
const entityName = extractEntityName(node);
|
|
249
|
+
|
|
250
|
+
isUtil(entityName)
|
|
251
|
+
? handleUtilityMethods(node, entityTitleToDescMapOfAllFiles)
|
|
252
|
+
: handleEntity(node, entityTitleToDescMapOfAllFiles, entityName);
|
|
224
253
|
|
|
225
254
|
const { code } = generate(typeFileAST, {});
|
|
226
255
|
|
package/index.cjs.js
CHANGED
|
@@ -12813,14 +12813,18 @@ class HelpAndProfilePage {
|
|
|
12813
12813
|
await test$1.expect(this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton)).toBeVisible();
|
|
12814
12814
|
}).toPass({ timeout: 15000 });
|
|
12815
12815
|
};
|
|
12816
|
-
this.openLiveChatAndVerify = async () => {
|
|
12816
|
+
this.openLiveChatAndVerify = async (widgetVisibilityTimeout = 10000) => {
|
|
12817
12817
|
await test$1.expect(async () => {
|
|
12818
12818
|
await this.openHelpCenterV2();
|
|
12819
12819
|
await this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton).click();
|
|
12820
|
-
await test$1.expect(this.neetoChatWidget).toBeVisible(
|
|
12820
|
+
await test$1.expect(this.neetoChatWidget).toBeVisible({
|
|
12821
|
+
timeout: widgetVisibilityTimeout,
|
|
12822
|
+
});
|
|
12821
12823
|
await test$1.expect(this.neetoChatSpinner).toBeHidden({ timeout: 20 * 1000 });
|
|
12822
|
-
await test$1.expect(this.neetoChatWidget).toBeVisible(
|
|
12823
|
-
|
|
12824
|
+
await test$1.expect(this.neetoChatWidget).toBeVisible({
|
|
12825
|
+
timeout: widgetVisibilityTimeout,
|
|
12826
|
+
});
|
|
12827
|
+
}).toPass({ timeout: 35000 + widgetVisibilityTimeout * 2 });
|
|
12824
12828
|
};
|
|
12825
12829
|
this.openAndVerifyChatWidgetV2 = async () => {
|
|
12826
12830
|
const chatInitializationApis = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
@@ -12947,9 +12951,7 @@ class HelpAndProfilePage {
|
|
|
12947
12951
|
this.openAppSwitcherAndVerifyV2 = async () => {
|
|
12948
12952
|
await test$1.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test$1.expect(async () => {
|
|
12949
12953
|
await this.openHelpCenterV2();
|
|
12950
|
-
await this.page
|
|
12951
|
-
.getByTestId(COMMON_SELECTORS.appSwitcherButton)
|
|
12952
|
-
.hover();
|
|
12954
|
+
await this.page.getByTestId(COMMON_SELECTORS.appSwitcherButton).hover();
|
|
12953
12955
|
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
|
|
12954
12956
|
}).toPass({ timeout: 45000 }));
|
|
12955
12957
|
};
|