@bigbinary/neeto-playwright-commons 1.9.10 → 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.d.ts +2550 -158
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -81,13 +81,13 @@ declare class CustomCommands {
|
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
83
|
*
|
|
84
|
-
*
|
|
84
|
+
* // wait for 3 responses
|
|
85
85
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
86
|
+
* neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
87
|
+
* responseUrl: "/login",
|
|
88
|
+
* times: 3,
|
|
89
|
+
* baseURL: "https://app.neetoauth.net",
|
|
90
|
+
* });
|
|
91
91
|
* @endexample
|
|
92
92
|
*/
|
|
93
93
|
interceptMultipleResponses: ({
|
|
@@ -98,41 +98,41 @@ declare class CustomCommands {
|
|
|
98
98
|
customPageContext,
|
|
99
99
|
timeout
|
|
100
100
|
}?: Partial<InterceptMultipleResponsesParams>) => Promise<Response[]>;
|
|
101
|
+
private recursiveMethod;
|
|
101
102
|
/**
|
|
102
103
|
*
|
|
103
|
-
*
|
|
104
|
+
* Command to check for a condition recursively until it's true, then execute a
|
|
104
105
|
*
|
|
105
106
|
* callback. This process will be repeated until the specified timeout.
|
|
106
107
|
*
|
|
107
108
|
* @example
|
|
108
109
|
*
|
|
109
|
-
*
|
|
110
|
+
* //checks if the URL contains /login for 5000 ms. If /login is found within this timeframe, the callback is executed.
|
|
110
111
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
112
|
+
* await neetoPlaywrightUtilities.executeRecursively({
|
|
113
|
+
* timeout: 5000,
|
|
114
|
+
* condition: () => this.page.url().match(/.*login/),
|
|
115
|
+
* callback: async () => {
|
|
115
116
|
* await expect("#locator").to.equal("Login");
|
|
116
|
-
*
|
|
117
|
-
*
|
|
117
|
+
* },
|
|
118
|
+
* });
|
|
118
119
|
* @endexample
|
|
119
120
|
*/
|
|
120
|
-
private recursiveMethod;
|
|
121
121
|
executeRecursively: ExecuteRecursively;
|
|
122
122
|
/**
|
|
123
123
|
*
|
|
124
|
-
* Command to assert the toastr message
|
|
124
|
+
* Command to assert the toastr message. It takes the following parameters:
|
|
125
125
|
*
|
|
126
|
-
* closeAfterVerification to close the
|
|
126
|
+
* closeAfterVerification(optional): Boolean to close the toast after verification. Default is true.
|
|
127
127
|
*
|
|
128
|
-
*
|
|
128
|
+
* message: Text that should be on toast.
|
|
129
129
|
*
|
|
130
130
|
* @example
|
|
131
131
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
132
|
+
* await neetoPlaywrightUtilities.verifySuccessToast({
|
|
133
|
+
* message: "Toastr message",
|
|
134
|
+
* closeAfterVerification: false,
|
|
135
|
+
* });
|
|
136
136
|
* @endexample
|
|
137
137
|
*/
|
|
138
138
|
verifySuccessToast: ({
|
|
@@ -145,32 +145,86 @@ declare class CustomCommands {
|
|
|
145
145
|
*
|
|
146
146
|
* @example
|
|
147
147
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
148
|
+
* // wait for 3 responses after reloading
|
|
149
|
+
* await neetoPlaywrightUtilities.reloadAndWait(3);
|
|
150
150
|
* @endexample
|
|
151
151
|
*/
|
|
152
152
|
reloadAndWait: (requestCount: number, customPageContext?: Page, interceptMultipleResponsesProps?: Partial<Omit<InterceptMultipleResponsesParams, "times">>) => Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* Command to wait until the page has no loaders or spinners.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
*
|
|
159
|
+
* await neetoPlaywrightUtilities.waitForPageLoad({
|
|
160
|
+
* visiblityTimeout = 35_000,
|
|
161
|
+
* customPageContext,
|
|
162
|
+
* });
|
|
163
|
+
* @endexample
|
|
164
|
+
*/
|
|
153
165
|
waitForPageLoad: ({
|
|
154
166
|
visibilityTimeout,
|
|
155
167
|
customPageContext
|
|
156
168
|
}?: Partial<WaitForPageLoadParams>) => Promise<void>;
|
|
157
169
|
/**
|
|
158
170
|
*
|
|
159
|
-
* Command to send
|
|
171
|
+
* Command to send an API request.
|
|
160
172
|
*
|
|
161
173
|
* @example
|
|
162
174
|
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
175
|
+
* await neetoPlaywrightUtilities.apiRequest({
|
|
176
|
+
* url: "/api/v1/tags",
|
|
177
|
+
* failOnStatusCode, // throws error for status codes other than 2xx and 3xx
|
|
178
|
+
* body, // request body
|
|
179
|
+
* method, // request method "get" | "patch" | "post" | "put" | "delete"
|
|
180
|
+
* params, // request params
|
|
181
|
+
* headers, // aditional request headers
|
|
182
|
+
* });
|
|
171
183
|
* @endexample
|
|
172
184
|
*/
|
|
173
185
|
apiRequest: ApiRequest;
|
|
186
|
+
/**
|
|
187
|
+
*
|
|
188
|
+
* Command to select an option from a select input. It retries until the select
|
|
189
|
+
*
|
|
190
|
+
* operation is completed. It takes the following parameters:
|
|
191
|
+
*
|
|
192
|
+
* selectValueContainer: is the selector for the select input container.
|
|
193
|
+
*
|
|
194
|
+
* selectMenu: is the selector for the select input menu.
|
|
195
|
+
*
|
|
196
|
+
* value: is the value to be selected.
|
|
197
|
+
*
|
|
198
|
+
* options: is an object with the following optional parameters:
|
|
199
|
+
*
|
|
200
|
+
* visiblityTimeout: is the time to wait for the select input to be visible. Default is 2000ms.
|
|
201
|
+
*
|
|
202
|
+
* textAssertionTimeout: is the time to wait for the selected value to be visible in the select input. Default is 1000ms.
|
|
203
|
+
*
|
|
204
|
+
* retryTimeout: is the time to wait until the select operation is completed. Default is 20000ms.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
*
|
|
208
|
+
* await neetoPlaywrightUtilities.selectOptionFromDropdown({
|
|
209
|
+
* selectValueContainer,
|
|
210
|
+
* selectMenu,
|
|
211
|
+
* value,
|
|
212
|
+
* options = {},
|
|
213
|
+
* });
|
|
214
|
+
* // or
|
|
215
|
+
*
|
|
216
|
+
* await neetoPlaywrightUtilities.selectOptionFromDropdown({
|
|
217
|
+
* selectValueContainer,
|
|
218
|
+
* selectMenu,
|
|
219
|
+
* value,
|
|
220
|
+
* options:{
|
|
221
|
+
* visiblityTimeout:200,
|
|
222
|
+
* textAssertionTimeout:1000,
|
|
223
|
+
* retryTimeout:20000
|
|
224
|
+
* },
|
|
225
|
+
* });
|
|
226
|
+
* @endexample
|
|
227
|
+
*/
|
|
174
228
|
selectOptionFromDropdown: ({
|
|
175
229
|
selectValueContainer,
|
|
176
230
|
selectMenu,
|
|
@@ -179,26 +233,24 @@ declare class CustomCommands {
|
|
|
179
233
|
}: SelectOptionFromDropdownParams) => Promise<void>;
|
|
180
234
|
/**
|
|
181
235
|
*
|
|
182
|
-
* Command to verify the value of a field. It can take either a single object or an
|
|
183
|
-
*
|
|
184
|
-
* array of objects, each representing a field and its expected value.
|
|
236
|
+
* Command to verify the value of a field. It can take either a single object or an array of objects, each representing a field and its expected value.
|
|
185
237
|
*
|
|
186
238
|
* @example
|
|
187
239
|
*
|
|
188
240
|
* // verifyFieldValue with an array of field-value pairs as it's parameter
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
241
|
+
* await neetoPlaywrightUtilities.verifyFieldValue([
|
|
242
|
+
* { field: COMMON_SELECTORS.submitButton, value: "Submit" },
|
|
243
|
+
* {
|
|
244
|
+
* field: COMMON_SELECTORS.cancelButton,
|
|
245
|
+
* value: "cancel",
|
|
246
|
+
* },
|
|
247
|
+
* ]);
|
|
196
248
|
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
249
|
+
* // verifyFieldValue with a field-value object as it's parameter
|
|
250
|
+
* await neetoPlaywrightUtilities.verifyFieldValue({
|
|
251
|
+
* field: COMMON_SELECTORS.submitButton,
|
|
252
|
+
* value: "Submit",
|
|
253
|
+
* });
|
|
202
254
|
* @endexample
|
|
203
255
|
*/
|
|
204
256
|
verifyFieldValue: VerifyFieldValue;
|
|
@@ -208,12 +260,12 @@ declare class CustomCommands {
|
|
|
208
260
|
*
|
|
209
261
|
* @example
|
|
210
262
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
263
|
+
* await neetoPlaywrightUtilities.searchAndVerify({
|
|
264
|
+
* searchTerm: "searchTerm",
|
|
265
|
+
* searchInputSelector: COMMON_SELECTORS.inputField,
|
|
266
|
+
* countSelector: COMMON_SELECTORS.count,
|
|
267
|
+
* countText: "43 items",
|
|
268
|
+
* });
|
|
217
269
|
* @endexample
|
|
218
270
|
*/
|
|
219
271
|
searchAndVerify: ({
|
|
@@ -224,30 +276,16 @@ declare class CustomCommands {
|
|
|
224
276
|
}: SearchAndVerifyProps) => Promise<void>;
|
|
225
277
|
/**
|
|
226
278
|
*
|
|
227
|
-
* Command to upload an image to image uploader and verify it.
|
|
279
|
+
* Command to upload an image to image uploader and verify it. It takes the following parameters:
|
|
228
280
|
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* await neetoPlaywrightUtilities.uploadImage("../assets/image.png");
|
|
232
|
-
* @endexample
|
|
233
|
-
*/
|
|
234
|
-
uploadImage: (localImagePath: string) => Promise<void>;
|
|
235
|
-
/**
|
|
236
|
-
*
|
|
237
|
-
* Command to verify the tooltip content. It takes the following parameters:
|
|
238
|
-
*
|
|
239
|
-
* triggerElement: The element that triggers the tooltip.
|
|
240
|
-
*
|
|
241
|
-
* content: The content inside the tooltip.
|
|
281
|
+
* localImagePath: Path to image.
|
|
242
282
|
*
|
|
243
283
|
* @example
|
|
244
284
|
*
|
|
245
|
-
*
|
|
246
|
-
* triggerElement: page.getByTestId("triggerElement"),
|
|
247
|
-
* content: "Tooltip content",
|
|
248
|
-
* });
|
|
285
|
+
* await neetoPlaywrightUtilities.uploadImage("../assets/image.png");
|
|
249
286
|
* @endexample
|
|
250
287
|
*/
|
|
288
|
+
uploadImage: (localImagePath: string) => Promise<void>;
|
|
251
289
|
verifyTooltip: ({
|
|
252
290
|
triggerElement,
|
|
253
291
|
content
|
|
@@ -269,11 +307,21 @@ declare class MailosaurUtils {
|
|
|
269
307
|
constructor(mailosaur: MailosaurClient);
|
|
270
308
|
/**
|
|
271
309
|
*
|
|
272
|
-
* Used to extract the email content
|
|
310
|
+
* Used to extract the email content. It takes the following parameters:
|
|
311
|
+
*
|
|
312
|
+
* email (required): The Mailosaur email to which the OTP was sent to.
|
|
313
|
+
*
|
|
314
|
+
* subjectSubstring (optional): A substring of the email subject to filter it.
|
|
315
|
+
*
|
|
316
|
+
* timeout (optional): The timeout time in milliseconds after which the method
|
|
317
|
+
*
|
|
318
|
+
* throws an error if an email is not found. Defaults to 2 minutes
|
|
319
|
+
*
|
|
320
|
+
* receivedAfter: A date object used to filter the emails based on the time of
|
|
273
321
|
*
|
|
274
|
-
*
|
|
322
|
+
* receiving it. Only emails incoming after this timestamp will be taken into
|
|
275
323
|
*
|
|
276
|
-
*
|
|
324
|
+
* account. Defaults to the timestamp of invoking this method.
|
|
277
325
|
*
|
|
278
326
|
* @example
|
|
279
327
|
*
|
|
@@ -284,7 +332,7 @@ declare class MailosaurUtils {
|
|
|
284
332
|
* timeout: 60 * 1000,
|
|
285
333
|
* receivedAfter: new Date()
|
|
286
334
|
* })
|
|
287
|
-
* }
|
|
335
|
+
* })
|
|
288
336
|
* @endexample
|
|
289
337
|
*/
|
|
290
338
|
getEmailContent: ({
|
|
@@ -295,11 +343,23 @@ declare class MailosaurUtils {
|
|
|
295
343
|
}: EmailContentParams) => Promise<mailosaur_lib_models.Message>;
|
|
296
344
|
/**
|
|
297
345
|
*
|
|
298
|
-
* Used to extract the OTP from the neeto OTP emails
|
|
346
|
+
* Used to extract the OTP from the neeto OTP emails. It takes the following parameters:
|
|
347
|
+
*
|
|
348
|
+
* email(required): The Mailosaur email to which the OTP was sent to.
|
|
349
|
+
*
|
|
350
|
+
* subjectSubstring (optional): A substring of the email subject to filter it.
|
|
351
|
+
*
|
|
352
|
+
* Defaults to "is your login code"
|
|
299
353
|
*
|
|
300
|
-
*
|
|
354
|
+
* timeout (optional): The timeout time in milliseconds after which the method
|
|
301
355
|
*
|
|
302
|
-
*
|
|
356
|
+
* throws an error if an email is not found. Defaults to 2 minutes
|
|
357
|
+
*
|
|
358
|
+
* receivedAfter: A date object used to filter the emails based on the time of
|
|
359
|
+
*
|
|
360
|
+
* receiving it. Only emails incoming after this timestamp will be taken into
|
|
361
|
+
*
|
|
362
|
+
* account. Defaults to the timestamp of invoking this method.
|
|
303
363
|
*
|
|
304
364
|
* @example
|
|
305
365
|
*
|
|
@@ -310,25 +370,19 @@ declare class MailosaurUtils {
|
|
|
310
370
|
* timeout: 60 * 1000,
|
|
311
371
|
* receivedAfter: new Date()
|
|
312
372
|
* })
|
|
313
|
-
* }
|
|
373
|
+
* })
|
|
314
374
|
* @endexample
|
|
315
|
-
* undefined
|
|
316
|
-
*
|
|
317
|
-
* A string containing the OTP value.
|
|
318
|
-
*
|
|
319
375
|
*/
|
|
320
376
|
fetchOtpFromEmail: FetchOtpFromEmail;
|
|
321
377
|
/**
|
|
322
378
|
*
|
|
323
379
|
* Used to generate a random Email ID to the Mailosaur Server.
|
|
324
380
|
*
|
|
325
|
-
* undefined
|
|
326
|
-
*
|
|
327
381
|
* @example
|
|
328
382
|
*
|
|
329
383
|
* test("sample test", async ({ mailosaurUtils }) => {
|
|
330
384
|
* const email = mailosaurUtils.generateRandomMailosaurEmail();
|
|
331
|
-
* }
|
|
385
|
+
* })
|
|
332
386
|
* @endexample
|
|
333
387
|
*/
|
|
334
388
|
generateRandomMailosaurEmail: () => string;
|
|
@@ -341,6 +395,35 @@ interface CustomFixture {
|
|
|
341
395
|
}
|
|
342
396
|
type Commands = Fixtures<CustomFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
|
|
343
397
|
declare const commands: Commands;
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* Function generates staging data for a specified product. It takes the following parameters:
|
|
401
|
+
*
|
|
402
|
+
* product (optional): A string representing the product for which staging data is being generated. Defaults to "invoice" if not provided.
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
*
|
|
406
|
+
* import { generateStagingData } from "@bigbinary/neeto-playwright-commons";
|
|
407
|
+
*
|
|
408
|
+
* // Generate staging data for the default product ("invoice")
|
|
409
|
+
* const stagingData = generateStagingData();
|
|
410
|
+
*
|
|
411
|
+
* console.log(stagingData);
|
|
412
|
+
*
|
|
413
|
+
* Output:
|
|
414
|
+
* {
|
|
415
|
+
* firstName: 'André',
|
|
416
|
+
* lastName: "O'Reilly",
|
|
417
|
+
* otp: 111111,
|
|
418
|
+
* domain: 'neetoinvoice.net',
|
|
419
|
+
* currentUserName: 'André O'Reilly', // Depends on IS_STAGING_ENV and CREDENTIALS
|
|
420
|
+
* businessName: 'cpt-invoice-0322153521234', // Timestamp will be different
|
|
421
|
+
* subdomainName: 'cpt-invoice-0322153521234', // Timestamp will be different if IS_STAGING_ENV is true, else 'spinkart'
|
|
422
|
+
* email: 'cpt12345+invoice+0322153521234@bigbinary.com' // OTP bypass key will be included if IS_STAGING_ENV is true, else CREDENTIALS.email
|
|
423
|
+
* }
|
|
424
|
+
*
|
|
425
|
+
* @endexample
|
|
426
|
+
*/
|
|
344
427
|
declare const generateStagingData: (product?: string) => {
|
|
345
428
|
firstName: string;
|
|
346
429
|
lastName: string;
|
|
@@ -414,26 +497,182 @@ declare class EmbedBase {
|
|
|
414
497
|
neetoPlaywrightUtilities,
|
|
415
498
|
appName
|
|
416
499
|
}: EmbedBasePageConstructorParams);
|
|
500
|
+
/**
|
|
501
|
+
*
|
|
502
|
+
* Initializes the embed test page. It takes the following parameters:
|
|
503
|
+
*
|
|
504
|
+
* embedType: Type of embedded content (inline, floatingPopup, elementClick).
|
|
505
|
+
*
|
|
506
|
+
* embedCode: Embed code.
|
|
507
|
+
*
|
|
508
|
+
* customElementText: Custom text for element click type (default: "Click here").
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
*
|
|
512
|
+
* await embedBase.initializeEmbedPage({
|
|
513
|
+
* embedType: "inline",
|
|
514
|
+
* embedCode: "<iframe src='example.com'></iframe>"
|
|
515
|
+
* });
|
|
516
|
+
* // OR
|
|
517
|
+
*
|
|
518
|
+
* await embedBase.initializeEmbedPage({
|
|
519
|
+
* embedType: "inline",
|
|
520
|
+
* embedCode: "<iframe src='example.com'></iframe>",
|
|
521
|
+
* customElementText:"Click here"
|
|
522
|
+
* });
|
|
523
|
+
* @endexample
|
|
524
|
+
*/
|
|
417
525
|
initializeEmbedPage: ({
|
|
418
526
|
embedType,
|
|
419
527
|
embedCode,
|
|
420
528
|
customElementText
|
|
421
529
|
}: initializeEmbedPageParams) => Promise<Page>;
|
|
530
|
+
/**
|
|
531
|
+
*
|
|
532
|
+
* Closes the embed modal and page.
|
|
533
|
+
*
|
|
534
|
+
* @example
|
|
535
|
+
*
|
|
536
|
+
* await embedBase.closeEmbedModalAndPage();
|
|
537
|
+
* @endexample
|
|
538
|
+
*/
|
|
422
539
|
closeEmbedModalAndPage: () => Promise<void>;
|
|
540
|
+
/**
|
|
541
|
+
*
|
|
542
|
+
* Clicks on the popup button.
|
|
543
|
+
*
|
|
544
|
+
* It takes the following parameters as an object:
|
|
545
|
+
*
|
|
546
|
+
* checked: Indicates whether an element is checked.
|
|
547
|
+
*
|
|
548
|
+
* disabled: Indicates whether an element is disabled.
|
|
549
|
+
*
|
|
550
|
+
* exact: Indicates whether an exact match is required.
|
|
551
|
+
*
|
|
552
|
+
* expanded: Indicates whether an element is expanded.
|
|
553
|
+
*
|
|
554
|
+
* includeHidden: Indicates whether hidden elements should be included.
|
|
555
|
+
*
|
|
556
|
+
* level: Specifies the level of the element.
|
|
557
|
+
*
|
|
558
|
+
* name: Specifies the name of the element, which can be a string or a regular expression.
|
|
559
|
+
*
|
|
560
|
+
* pressed: Indicates whether an element is pressed.
|
|
561
|
+
*
|
|
562
|
+
* selected: Indicates whether an element is selected.
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
*
|
|
566
|
+
* await embedBase.clickOnPopupButton({ name: "Popup Button" });
|
|
567
|
+
* //OR
|
|
568
|
+
* await embedBase.clickOnPopupButton({
|
|
569
|
+
* checked: true,
|
|
570
|
+
* disabled: false,
|
|
571
|
+
* exact: true,
|
|
572
|
+
* expanded: false,
|
|
573
|
+
* includeHidden: false,
|
|
574
|
+
* level: 2,
|
|
575
|
+
* name: "Popup Button",
|
|
576
|
+
* pressed: false,
|
|
577
|
+
* selected: true
|
|
578
|
+
* });
|
|
579
|
+
* @endexample
|
|
580
|
+
*/
|
|
423
581
|
clickOnPopupButton: (popUpButtonSelectorOptions: GetByRoleOptions) => Promise<void>;
|
|
582
|
+
/**
|
|
583
|
+
*
|
|
584
|
+
* Copies the embed script. It takes the following parameters:
|
|
585
|
+
*
|
|
586
|
+
* embedLabel: Label for the embed script.
|
|
587
|
+
*
|
|
588
|
+
* @example
|
|
589
|
+
*
|
|
590
|
+
* const embedScript = await embedBase.copyEmbedScript({ embedLabel: "Embed Script" });
|
|
591
|
+
* @endexample
|
|
592
|
+
*/
|
|
424
593
|
copyEmbedScript: ({
|
|
425
594
|
embedLabel
|
|
426
595
|
}: {
|
|
427
596
|
embedLabel: string;
|
|
428
597
|
}) => Promise<string>;
|
|
598
|
+
/**
|
|
599
|
+
*
|
|
600
|
+
* Selects the embed type. It takes the following parameters:
|
|
601
|
+
*
|
|
602
|
+
* embedLabel: Label for the embed type.
|
|
603
|
+
*
|
|
604
|
+
* @example
|
|
605
|
+
*
|
|
606
|
+
* await embedBase.selectEmbedType("Inline Embed");
|
|
607
|
+
* @endexample
|
|
608
|
+
*/
|
|
429
609
|
selectEmbedType: (embedLabel: string) => Promise<void>;
|
|
610
|
+
/**
|
|
611
|
+
*
|
|
612
|
+
* Verifies inline customization of embedded content. It takes the following parameters:
|
|
613
|
+
*
|
|
614
|
+
* headingTestId: Test ID of the heading element.
|
|
615
|
+
*
|
|
616
|
+
* inlineEmbedInterceptParams: Parameters for intercepting multiple responses.
|
|
617
|
+
*
|
|
618
|
+
* customizationOptions: Options for customization.
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
*
|
|
622
|
+
* await embedBase.verifyInlineCustomization({
|
|
623
|
+
* headingTestId: "heading",
|
|
624
|
+
* inlineEmbedInterceptParams: { urlRegex: /example\.com/, status: 200 },
|
|
625
|
+
* customizationOptions: { embedHeight: "100", embedWidth: "100", embedDivContainerId: "container" }
|
|
626
|
+
* });
|
|
627
|
+
* @endexample
|
|
628
|
+
*/
|
|
430
629
|
verifyInlineCustomization: ({
|
|
431
630
|
headingTestId,
|
|
432
631
|
inlineEmbedInterceptParams,
|
|
433
632
|
customizationOptions
|
|
434
633
|
}: VerifyInlineCustomizationParams) => Promise<void>;
|
|
634
|
+
/**
|
|
635
|
+
*
|
|
636
|
+
* Verifies floating popup customization of embedded content. It takes the following parameters:
|
|
637
|
+
*
|
|
638
|
+
* customizationOptions: Options for customization.
|
|
639
|
+
*
|
|
640
|
+
* @example
|
|
641
|
+
*
|
|
642
|
+
* await embedBase.verifyFloatingPopupCustomization({
|
|
643
|
+
* buttonText: "Popup Button",
|
|
644
|
+
* buttonColorHex: "#FFFFFF",
|
|
645
|
+
* buttonTextColorHex: "#000000",
|
|
646
|
+
* buttonPosition: "Bottom left"
|
|
647
|
+
* });
|
|
648
|
+
* @endexample
|
|
649
|
+
*/
|
|
435
650
|
verifyFloatingPopupCustomization: (customizationOptions: FloatingPopupCustomizationOptions) => Promise<void>;
|
|
651
|
+
/**
|
|
652
|
+
*
|
|
653
|
+
* Verifies element click customization of embedded content. It takes the following parameters:
|
|
654
|
+
*
|
|
655
|
+
* customizationOptions: Options for customization.
|
|
656
|
+
*
|
|
657
|
+
* @example
|
|
658
|
+
*
|
|
659
|
+
* await embedBase.verifyElementClickCustomization({ customId: "custom-element" });
|
|
660
|
+
* @endexample
|
|
661
|
+
*/
|
|
436
662
|
verifyElementClickCustomization: (customizationOptions: ElementClickCustomizationOptions) => Promise<void>;
|
|
663
|
+
/**
|
|
664
|
+
*
|
|
665
|
+
* Expects multiple texts to be present in the code block. It takes the following parameters:
|
|
666
|
+
*
|
|
667
|
+
* containTextOptions: Array of strings or regex patterns to be checked in the code block.
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
*
|
|
671
|
+
* await embedBase.expectMultipleTextsInCodeblock([
|
|
672
|
+
* "Text1", "Text2", /Pattern/
|
|
673
|
+
* ]);
|
|
674
|
+
* @endexample
|
|
675
|
+
*/
|
|
437
676
|
expectMultipleTextsInCodeblock: (containTextOptions: [string | RegExp, string | RegExp, ...(string | RegExp)[]]) => Promise<void>;
|
|
438
677
|
}
|
|
439
678
|
interface HelpAndProfilePageInitializerProps {
|
|
@@ -464,18 +703,85 @@ declare class HelpAndProfilePage {
|
|
|
464
703
|
private hoverOnBody;
|
|
465
704
|
openHelpCenterV2: () => Promise<void>;
|
|
466
705
|
private openLiveChatAndVerify;
|
|
706
|
+
/**
|
|
707
|
+
*
|
|
708
|
+
* The function reloads the page, opens the chat interface, closes and reopens the chat frame, initiates a new conversation, and verifies the conversation window content.
|
|
709
|
+
*
|
|
710
|
+
* @example
|
|
711
|
+
*
|
|
712
|
+
* await helpAndProfilePage.openAndVerifyChatWidgetV2();
|
|
713
|
+
* @endexample
|
|
714
|
+
*/
|
|
467
715
|
openAndVerifyChatWidgetV2: () => Promise<void>;
|
|
716
|
+
/**
|
|
717
|
+
*
|
|
718
|
+
* Opens and verifies the help articles in Help Center.
|
|
719
|
+
*
|
|
720
|
+
* @example
|
|
721
|
+
*
|
|
722
|
+
* await helpAndProfilePage.openAndVerifyHelpArticlesV2();
|
|
723
|
+
* @endexample
|
|
724
|
+
*/
|
|
468
725
|
openAndVerifyHelpArticlesV2: () => Promise<void>;
|
|
469
726
|
private openChangelogPaneV2;
|
|
727
|
+
/**
|
|
728
|
+
*
|
|
729
|
+
* Opens and verifies the changelog in Help Center.
|
|
730
|
+
*
|
|
731
|
+
* @example
|
|
732
|
+
*
|
|
733
|
+
* await helpAndProfilePage.openAndVerifyChangelogV2();
|
|
734
|
+
* @endexample
|
|
735
|
+
*/
|
|
470
736
|
openAndVerifyChangelogV2: () => Promise<void>;
|
|
471
737
|
private formatKeyboardShortcut;
|
|
738
|
+
/**
|
|
739
|
+
*
|
|
740
|
+
* Opens and verifies the keyboard shortcuts pane in Help Center. It takes the following parameters:
|
|
741
|
+
*
|
|
742
|
+
* productShortcuts: Array of objects containing description and sequence of product shortcuts.
|
|
743
|
+
*
|
|
744
|
+
* osPlatform: Platform for keyboard shortcuts ("mac" or "windows").
|
|
745
|
+
*
|
|
746
|
+
* @example
|
|
747
|
+
*
|
|
748
|
+
* await helpAndProfilePage.openAndVerifyKeyboardShortcutsPaneV2(productShortcuts, "windows");
|
|
749
|
+
* @endexample
|
|
750
|
+
*/
|
|
472
751
|
openAndVerifyKeyboardShortcutsPaneV2: (productShortcuts: {
|
|
473
752
|
description: string;
|
|
474
753
|
sequence: string;
|
|
475
754
|
}[], osPlatform?: "mac" | "windows") => Promise<void>;
|
|
755
|
+
/**
|
|
756
|
+
*
|
|
757
|
+
* Opens and verifies the app switcher in Help Center.
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
*
|
|
761
|
+
* await helpAndProfilePage.openAppSwitcherAndVerifyV2();
|
|
762
|
+
* @endexample
|
|
763
|
+
*/
|
|
476
764
|
openAppSwitcherAndVerifyV2: () => Promise<void>;
|
|
477
765
|
private openAuthLinkAndVerify;
|
|
766
|
+
/**
|
|
767
|
+
*
|
|
768
|
+
* Verifies the profile and organization links in Help Center.
|
|
769
|
+
*
|
|
770
|
+
* @example
|
|
771
|
+
*
|
|
772
|
+
* await helpAndProfilePage.verifyProfileAndOrganizationLinksV2();
|
|
773
|
+
* @endexample
|
|
774
|
+
*/
|
|
478
775
|
verifyProfileAndOrganizationLinksV2: () => Promise<void>;
|
|
776
|
+
/**
|
|
777
|
+
*
|
|
778
|
+
* Verifies logout functionality in Help Center.
|
|
779
|
+
*
|
|
780
|
+
* @example
|
|
781
|
+
*
|
|
782
|
+
* await helpAndProfilePage.verifyLogout();
|
|
783
|
+
* @endexample
|
|
784
|
+
*/
|
|
479
785
|
verifyLogoutV2: () => Promise<void>;
|
|
480
786
|
}
|
|
481
787
|
type Integration = "dailyco" | "github" | "google-calendar" | "google-analytics" | "google-sheets" | "microsoft-teams" | "neeto-chat" | "neeto-crm" | "slack" | "twilio" | "whereby" | "zapier" | "zoom";
|
|
@@ -512,10 +818,72 @@ declare class IntegrationBase {
|
|
|
512
818
|
integrationRouteIndex,
|
|
513
819
|
integrationRouteResponsesParams
|
|
514
820
|
}: IntegrationBaseParams);
|
|
821
|
+
/**
|
|
822
|
+
*
|
|
823
|
+
* Disconnects an active integration. It takes the following parameters:
|
|
824
|
+
*
|
|
825
|
+
* interceptMultipleResponsesParams: Optional parameter for intercepting multiple responses.
|
|
826
|
+
*
|
|
827
|
+
* @example
|
|
828
|
+
*
|
|
829
|
+
* await integrationBase.disconnect();
|
|
830
|
+
* // OR
|
|
831
|
+
* await integrationBase.disconnect({
|
|
832
|
+
* responseUrl: "/auth";
|
|
833
|
+
* times:1;
|
|
834
|
+
* baseUrl: "https://www.zoom.com";
|
|
835
|
+
* responseStatus: 200;
|
|
836
|
+
* });
|
|
837
|
+
* @endexample
|
|
838
|
+
*/
|
|
515
839
|
disconnect: (interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams$1) => Promise<void>;
|
|
840
|
+
/**
|
|
841
|
+
*
|
|
842
|
+
* Connects an integration. It takes the following parameters:
|
|
843
|
+
*
|
|
844
|
+
* skipGoTo: Boolean indicating whether to skip navigating to integration index (default: false).
|
|
845
|
+
*
|
|
846
|
+
* @example
|
|
847
|
+
*
|
|
848
|
+
* await integrationBase.connect();
|
|
849
|
+
* // OR
|
|
850
|
+
* await integrationBase.connect(true);
|
|
851
|
+
* @endexample
|
|
852
|
+
*/
|
|
516
853
|
connect: (skipGoTo?: boolean) => Promise<void>;
|
|
854
|
+
/**
|
|
855
|
+
*
|
|
856
|
+
* Verifies the integration status. It takes the following parameters:
|
|
857
|
+
*
|
|
858
|
+
* status: Integration status ("connected" or "disconnected") (default: "connected").
|
|
859
|
+
*
|
|
860
|
+
* @example
|
|
861
|
+
*
|
|
862
|
+
* await integrationBase.verifyIntegrationStatus();
|
|
863
|
+
* // OR
|
|
864
|
+
* await integrationBase.verifyIntegrationStatus("disconnected");
|
|
865
|
+
* @endexample
|
|
866
|
+
*/
|
|
517
867
|
verifyIntegrationStatus: (status?: IntegrationStatus) => Promise<void>;
|
|
868
|
+
/**
|
|
869
|
+
*
|
|
870
|
+
* Clicks on the integration card.
|
|
871
|
+
*
|
|
872
|
+
* @example
|
|
873
|
+
*
|
|
874
|
+
* await integrationBase.clickOnIntegrationCard();
|
|
875
|
+
* @endexample
|
|
876
|
+
*/
|
|
518
877
|
clickOnIntegrationCard: () => Promise<void>;
|
|
878
|
+
/**
|
|
879
|
+
*
|
|
880
|
+
* Navigates to the integration index route.
|
|
881
|
+
*
|
|
882
|
+
* @example
|
|
883
|
+
*
|
|
884
|
+
* await integrationBase.gotoIntegrationIndex();
|
|
885
|
+
* @endexample
|
|
886
|
+
*/
|
|
519
887
|
gotoIntegrationIndex: () => Promise<void>;
|
|
520
888
|
}
|
|
521
889
|
type AsyncNoArgsFunction = () => Promise<void>;
|
|
@@ -540,18 +908,150 @@ declare class SlackPage extends IntegrationBase {
|
|
|
540
908
|
neetoPlaywrightUtilities,
|
|
541
909
|
integrationRouteIndex
|
|
542
910
|
}: SlackPageParams);
|
|
911
|
+
/**
|
|
912
|
+
*
|
|
913
|
+
* Connects to slack integration and verifies the connection. It takes the following parameters:
|
|
914
|
+
*
|
|
915
|
+
* redirectUrl: URL to redirect after connecting.
|
|
916
|
+
*
|
|
917
|
+
* customSteps (optional): Custom steps to perform after connection.
|
|
918
|
+
*
|
|
919
|
+
* channelToConfigure (optional): Channel to configure.
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
*
|
|
923
|
+
* await slackPage.connectAndVerifyIntegration(/example\.com/, customSteps, "general");
|
|
924
|
+
* @endexample
|
|
925
|
+
*/
|
|
543
926
|
connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction, channelToConfigure?: string) => Promise<void>;
|
|
544
|
-
|
|
927
|
+
/**
|
|
928
|
+
*
|
|
929
|
+
* Disconnects from Slack integration and verifies disconnection.
|
|
930
|
+
*
|
|
931
|
+
* @example
|
|
932
|
+
*
|
|
933
|
+
* await slackPage.disconnectAndVerifyIntegration();
|
|
934
|
+
* @endexample
|
|
935
|
+
*/
|
|
936
|
+
disconnectAndVerifyIntegration: () => Promise<void>;
|
|
937
|
+
/**
|
|
938
|
+
*
|
|
939
|
+
* Updates and configures slack channel. It takes the following parameters:
|
|
940
|
+
*
|
|
941
|
+
* newSlackChannel: The name of the slack channel to which the update will be applied.
|
|
942
|
+
*
|
|
943
|
+
* interceptMultipleResponsesParams (optional): Parameters for intercepting multiple responses.
|
|
944
|
+
*
|
|
945
|
+
* refreshInterceptMultipleResponsesParams (optional): Parameters for refreshing intercepting multiple responses.
|
|
946
|
+
*
|
|
947
|
+
* refreshChannelList (optional): Whether to refresh the channel list.
|
|
948
|
+
*
|
|
949
|
+
* @example
|
|
950
|
+
*
|
|
951
|
+
* await slackPage.updateConfigureSlackChannel({
|
|
952
|
+
* newSlackChannel: "example-channel",
|
|
953
|
+
* refreshChannelList: true
|
|
954
|
+
* });
|
|
955
|
+
* //or
|
|
956
|
+
* await slackPage.updateConfigureSlackChannel({
|
|
957
|
+
* newSlackChannel: "example-channel",
|
|
958
|
+
* refreshChannelList: true,
|
|
959
|
+
* refreshInterceptMultipleResponsesParams:{
|
|
960
|
+
* responseUrl: "/auth";
|
|
961
|
+
* times:1;
|
|
962
|
+
* baseUrl: "https://www.zoom.com";
|
|
963
|
+
* responseStatus: 200;
|
|
964
|
+
* },
|
|
965
|
+
* interceptMultipleResponsesParams:{
|
|
966
|
+
* responseUrl: "/auth";
|
|
967
|
+
* times:1;
|
|
968
|
+
* baseUrl: "https://www.zoom.com";
|
|
969
|
+
* responseStatus: 200;
|
|
970
|
+
* }
|
|
971
|
+
* });
|
|
972
|
+
* @endexample
|
|
973
|
+
*/
|
|
545
974
|
updateConfigureSlackChannel: ({
|
|
546
975
|
newSlackChannel,
|
|
547
976
|
interceptMultipleResponsesParams,
|
|
548
977
|
refreshInterceptMultipleResponsesParams,
|
|
549
978
|
refreshChannelList
|
|
550
979
|
}: UpdateConfigureSlackChannelParams) => Promise<void>;
|
|
980
|
+
/**
|
|
981
|
+
*
|
|
982
|
+
* Clicks on the refresh button to update the channel list. It takes the following parameters:
|
|
983
|
+
*
|
|
984
|
+
* refreshInterceptMultipleResponsesParams (optional): Parameters for refreshing intercepting multiple responses.
|
|
985
|
+
*
|
|
986
|
+
* @example
|
|
987
|
+
*
|
|
988
|
+
* await slackPage.clickOnChannelListRefreshButton();
|
|
989
|
+
* // or
|
|
990
|
+
* await slackPage.clickOnChannelListRefreshButton({
|
|
991
|
+
* responseUrl: "/auth";
|
|
992
|
+
* times:1;
|
|
993
|
+
* baseUrl: "https://www.zoom.com";
|
|
994
|
+
* responseStatus: 200;
|
|
995
|
+
* });
|
|
996
|
+
*
|
|
997
|
+
* @endexample
|
|
998
|
+
*/
|
|
551
999
|
clickOnChannelListRefreshButton: (refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams) => Promise<void>;
|
|
1000
|
+
/**
|
|
1001
|
+
*
|
|
1002
|
+
* Logs into slack web app. It takes the following parameters:
|
|
1003
|
+
*
|
|
1004
|
+
* slackWebappPage: Playwright Page object for Slack web app.
|
|
1005
|
+
*
|
|
1006
|
+
* customCredentials (optional): Custom credentials for logging in.
|
|
1007
|
+
*
|
|
1008
|
+
* @example
|
|
1009
|
+
*
|
|
1010
|
+
* await slackPage.loginToSlackWebapp(slackWebappPageInstance);
|
|
1011
|
+
* // OR
|
|
1012
|
+
* await slackPage.loginToSlackWebapp(slackWebappPageInstance,{
|
|
1013
|
+
* loginEmail:"jhondoe@gmail.com",
|
|
1014
|
+
* loginPassword: "123456789",
|
|
1015
|
+
* workspace: "your-workspace-name",
|
|
1016
|
+
* })
|
|
1017
|
+
* @endexample
|
|
1018
|
+
*/
|
|
552
1019
|
loginToSlackWebapp: (slackWebappPage: Page, customCredentials?: Record<"workspace" | "loginPassword" | "loginEmail", string | undefined>) => Promise<void>;
|
|
1020
|
+
/**
|
|
1021
|
+
*
|
|
1022
|
+
* Logs out from slack web app.
|
|
1023
|
+
*
|
|
1024
|
+
* @example
|
|
1025
|
+
*
|
|
1026
|
+
* await slackPage.logoutFromSlackWebApp();
|
|
1027
|
+
* @endexample
|
|
1028
|
+
*/
|
|
553
1029
|
logoutFromSlackWebApp: () => Promise<void>;
|
|
1030
|
+
/**
|
|
1031
|
+
*
|
|
1032
|
+
* Navigates to a Slack channel. It takes the following parameters:
|
|
1033
|
+
*
|
|
1034
|
+
* slackChannel: Name of the Slack channel.
|
|
1035
|
+
*
|
|
1036
|
+
* @example
|
|
1037
|
+
*
|
|
1038
|
+
* await slackPage.goToSlackChannel("general");
|
|
1039
|
+
* @endexample
|
|
1040
|
+
*/
|
|
554
1041
|
goToSlackChannel: (slackChannel: string) => Promise<void>;
|
|
1042
|
+
/**
|
|
1043
|
+
*
|
|
1044
|
+
* Creates a new slack channel. It takes the following parameters:
|
|
1045
|
+
*
|
|
1046
|
+
* channelName: Name of the new Slack channel.
|
|
1047
|
+
*
|
|
1048
|
+
* kind: Type of the new Slack channel (public or private, optional).
|
|
1049
|
+
*
|
|
1050
|
+
* @example
|
|
1051
|
+
*
|
|
1052
|
+
* await slackPage.createNewSlackChannel({ channelName: "new-channel", kind: "public" });
|
|
1053
|
+
* @endexample
|
|
1054
|
+
*/
|
|
555
1055
|
createNewSlackChannel: ({
|
|
556
1056
|
channelName,
|
|
557
1057
|
kind
|
|
@@ -559,6 +1059,17 @@ declare class SlackPage extends IntegrationBase {
|
|
|
559
1059
|
channelName: string;
|
|
560
1060
|
kind?: "public" | "private" | undefined;
|
|
561
1061
|
}) => Promise<void>;
|
|
1062
|
+
/**
|
|
1063
|
+
*
|
|
1064
|
+
* Deletes a slack channel. It takes the following parameters:
|
|
1065
|
+
*
|
|
1066
|
+
* channel: Name of the Slack channel to delete.
|
|
1067
|
+
*
|
|
1068
|
+
* @example
|
|
1069
|
+
*
|
|
1070
|
+
* await slackPage.deleteSlackChannel("old-channel");
|
|
1071
|
+
* @endexample
|
|
1072
|
+
*/
|
|
562
1073
|
deleteSlackChannel: (channel: string) => Promise<void>;
|
|
563
1074
|
}
|
|
564
1075
|
interface WebhooksPageParams {
|
|
@@ -591,24 +1102,97 @@ declare class WebhooksPage {
|
|
|
591
1102
|
neetoPlaywrightUtilities,
|
|
592
1103
|
context
|
|
593
1104
|
}: WebhooksPageParams);
|
|
1105
|
+
/**
|
|
1106
|
+
*
|
|
1107
|
+
* Retrieves the webhook URL and token from a third-party site.
|
|
1108
|
+
*
|
|
1109
|
+
* Returns: Object containing webhook site URL and token.
|
|
1110
|
+
*
|
|
1111
|
+
* @example
|
|
1112
|
+
*
|
|
1113
|
+
* const { webhookSiteURL, webhookToken } = await webhooksPage.getWebhookURL();
|
|
1114
|
+
* @endexample
|
|
1115
|
+
*/
|
|
594
1116
|
getWebhookURL: () => Promise<{
|
|
595
1117
|
webhookSiteURL: string;
|
|
596
1118
|
webhookToken: string | undefined;
|
|
597
1119
|
}>;
|
|
1120
|
+
/**
|
|
1121
|
+
*
|
|
1122
|
+
* Adds a webhook using the provided webhook site URL. It takes the following parameters:
|
|
1123
|
+
*
|
|
1124
|
+
* webhookSiteURL: URL of the webhook site.
|
|
1125
|
+
*
|
|
1126
|
+
* @example
|
|
1127
|
+
*
|
|
1128
|
+
* await webhooksPage.addWebhook({ webhookSiteURL: "https://example.com/webhook" });
|
|
1129
|
+
* @endexample
|
|
1130
|
+
*/
|
|
598
1131
|
addWebhook: ({
|
|
599
1132
|
webhookSiteURL
|
|
600
1133
|
}: {
|
|
601
1134
|
webhookSiteURL: string;
|
|
602
1135
|
}) => Promise<void>;
|
|
1136
|
+
/**
|
|
1137
|
+
*
|
|
1138
|
+
* Verifies the latest webhook response. It takes the following parameters:
|
|
1139
|
+
*
|
|
1140
|
+
* callback: Callback function to execute on parsed response.
|
|
1141
|
+
*
|
|
1142
|
+
* webhookToken: Token of the webhook.
|
|
1143
|
+
*
|
|
1144
|
+
* Other parameters to be passed to the callback function.
|
|
1145
|
+
*
|
|
1146
|
+
* @example
|
|
1147
|
+
*
|
|
1148
|
+
* await webhooksPage.verifyLatestWebhookResponse({
|
|
1149
|
+
* callback: ({ parsedResponse }) => console.log(parsedResponse),
|
|
1150
|
+
* webhookToken: "exampleToken"
|
|
1151
|
+
* });
|
|
1152
|
+
* @endexample
|
|
1153
|
+
*/
|
|
603
1154
|
verifyLatestWebhookResponse: ({
|
|
604
1155
|
callback,
|
|
605
1156
|
webhookToken,
|
|
606
1157
|
...otherParams
|
|
607
1158
|
}: VerifyWebhookResponseParams) => Promise<void>;
|
|
1159
|
+
/**
|
|
1160
|
+
*
|
|
1161
|
+
* Verifies webhook deliveries. It takes the following parameters:
|
|
1162
|
+
*
|
|
1163
|
+
* callback: Callback function to execute on parsed response.
|
|
1164
|
+
*
|
|
1165
|
+
* Other parameters to be passed to the callback function.
|
|
1166
|
+
*
|
|
1167
|
+
* @example
|
|
1168
|
+
*
|
|
1169
|
+
* await webhooksPage.verifyWebhookDeliveries({
|
|
1170
|
+
* callback: ({ parsedResponse }) => console.log(parsedResponse)
|
|
1171
|
+
* });
|
|
1172
|
+
* @endexample
|
|
1173
|
+
*/
|
|
608
1174
|
verifyWebhookDeliveries: ({
|
|
609
1175
|
callback,
|
|
610
1176
|
...otherParams
|
|
611
1177
|
}: VerifyWebhookDeliveriesParams) => Promise<void>;
|
|
1178
|
+
/**
|
|
1179
|
+
*
|
|
1180
|
+
* Verifies webhook delivery by event. It takes the following parameters:
|
|
1181
|
+
*
|
|
1182
|
+
* event: Event name.
|
|
1183
|
+
*
|
|
1184
|
+
* callbackToVerifyDeliveries: Callback function to execute on parsed response.
|
|
1185
|
+
*
|
|
1186
|
+
* Other parameters to be passed to the callback function.
|
|
1187
|
+
*
|
|
1188
|
+
* @example
|
|
1189
|
+
*
|
|
1190
|
+
* await webhooksPage.verifyWebhookDeliveryByEvent({
|
|
1191
|
+
* event: "eventName",
|
|
1192
|
+
* callbackToVerifyDeliveries: ({ parsedResponse }) => console.log(parsedResponse)
|
|
1193
|
+
* });
|
|
1194
|
+
* @endexample
|
|
1195
|
+
*/
|
|
612
1196
|
verifyWebhookDeliveryByEvent: ({
|
|
613
1197
|
event,
|
|
614
1198
|
callbackToVerifyDeliveries,
|
|
@@ -628,10 +1212,71 @@ declare class ZapierPage extends IntegrationBase {
|
|
|
628
1212
|
neetoPlaywrightUtilities: CustomCommands;
|
|
629
1213
|
integrationRouteIndex?: string;
|
|
630
1214
|
});
|
|
1215
|
+
/**
|
|
1216
|
+
*
|
|
1217
|
+
* Logs into zapier web app. It takes the following parameters:
|
|
1218
|
+
*
|
|
1219
|
+
* zapierWebPage: Playwright Page object for Zapier web app.
|
|
1220
|
+
*
|
|
1221
|
+
* @example
|
|
1222
|
+
*
|
|
1223
|
+
* await zapierPage.loginToZapier(zapierWebPageInstance);
|
|
1224
|
+
* @endexample
|
|
1225
|
+
*/
|
|
631
1226
|
loginToZapier: (zapierWebPage: Page) => Promise<void>;
|
|
1227
|
+
/**
|
|
1228
|
+
*
|
|
1229
|
+
* Logs out from zapier web app.
|
|
1230
|
+
*
|
|
1231
|
+
* @example
|
|
1232
|
+
*
|
|
1233
|
+
* await zapierPage.logoutFromZapier();
|
|
1234
|
+
* @endexample
|
|
1235
|
+
*/
|
|
632
1236
|
logoutFromZapier: () => Promise<void>;
|
|
1237
|
+
/**
|
|
1238
|
+
*
|
|
1239
|
+
* Reconnects zapier account and publishes changes. It takes the following parameters:
|
|
1240
|
+
*
|
|
1241
|
+
* zapierApiKey: Zapier API key.
|
|
1242
|
+
*
|
|
1243
|
+
* @example
|
|
1244
|
+
*
|
|
1245
|
+
* await zapierPage.reconnectAccountAndPublish("your-zapier-api-key");
|
|
1246
|
+
* @endexample
|
|
1247
|
+
*/
|
|
633
1248
|
reconnectAccountAndPublish: (zapierApiKey: string) => Promise<void>;
|
|
1249
|
+
/**
|
|
1250
|
+
*
|
|
1251
|
+
* Deletes all connections in zapier. It takes the following parameters:
|
|
1252
|
+
*
|
|
1253
|
+
* zapierAppLink: Link to Zapier app.
|
|
1254
|
+
*
|
|
1255
|
+
* @example
|
|
1256
|
+
*
|
|
1257
|
+
* await zapierPage.deleteAllConnections("https://zapier.com/app/dashboard");
|
|
1258
|
+
* @endexample
|
|
1259
|
+
*/
|
|
634
1260
|
deleteAllConnections: (zapierAppLink: string) => Promise<void>;
|
|
1261
|
+
/**
|
|
1262
|
+
*
|
|
1263
|
+
* Verifies that a Zap is triggered. It takes the following parameters:
|
|
1264
|
+
*
|
|
1265
|
+
* submittedEmail: Submitted email address.
|
|
1266
|
+
*
|
|
1267
|
+
* zapTriggeredAfter: Date after which the Zap should be triggered.
|
|
1268
|
+
*
|
|
1269
|
+
* productName: Name of the product.
|
|
1270
|
+
*
|
|
1271
|
+
* @example
|
|
1272
|
+
*
|
|
1273
|
+
* await zapierPage.verifyZapIsTriggered({
|
|
1274
|
+
* submittedEmail: "example@example.com",
|
|
1275
|
+
* zapTriggeredAfter: new Date(),
|
|
1276
|
+
* productName: "neetoChat"
|
|
1277
|
+
* });
|
|
1278
|
+
* @endexample
|
|
1279
|
+
*/
|
|
635
1280
|
verifyZapIsTriggered: ({
|
|
636
1281
|
productName,
|
|
637
1282
|
submittedEmail,
|
|
@@ -641,12 +1286,43 @@ declare class ZapierPage extends IntegrationBase {
|
|
|
641
1286
|
zapTriggeredAfter: Date;
|
|
642
1287
|
productName: string;
|
|
643
1288
|
}) => Promise<mailosaur_lib_models.Message>;
|
|
1289
|
+
/**
|
|
1290
|
+
*
|
|
1291
|
+
* Skips test if Zapier task limit is exhausted.
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
*
|
|
1295
|
+
* await zapierPage.skipIfTaskLimitIsExhausted();
|
|
1296
|
+
* @endexample
|
|
1297
|
+
*/
|
|
644
1298
|
skipIfTaskLimitIsExhausted: () => Promise<void>;
|
|
1299
|
+
/**
|
|
1300
|
+
*
|
|
1301
|
+
* Connects to zapier integration and verifies the connection. It takes the following parameters:
|
|
1302
|
+
*
|
|
1303
|
+
* apiKeyLabel: Label for Zapier API key.
|
|
1304
|
+
*
|
|
1305
|
+
* Returns: Zapier API key.
|
|
1306
|
+
*
|
|
1307
|
+
* @example
|
|
1308
|
+
*
|
|
1309
|
+
* const apiKey = await zapierPage.connectAndVerify({ apiKeyLabel: "Your API Key" });
|
|
1310
|
+
* @endexample
|
|
1311
|
+
*/
|
|
645
1312
|
connectAndVerify: ({
|
|
646
1313
|
apiKeyLabel
|
|
647
1314
|
}: {
|
|
648
1315
|
apiKeyLabel: string;
|
|
649
1316
|
}) => Promise<string>;
|
|
1317
|
+
/**
|
|
1318
|
+
*
|
|
1319
|
+
* Disconnects from Zapier integration and verifies disconnection.
|
|
1320
|
+
*
|
|
1321
|
+
* @example
|
|
1322
|
+
*
|
|
1323
|
+
* await zapierPage.disconnectAndVerify();
|
|
1324
|
+
* @endexample
|
|
1325
|
+
*/
|
|
650
1326
|
disconnectAndVerify: () => Promise<void>;
|
|
651
1327
|
}
|
|
652
1328
|
interface VerifyDescriptionEditorParams {
|
|
@@ -747,13 +1423,13 @@ declare class ImageUploader {
|
|
|
747
1423
|
*
|
|
748
1424
|
* @example
|
|
749
1425
|
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
1426
|
+
* await imageUploader.cropImage({
|
|
1427
|
+
* toggleAspectRatioLock: false
|
|
1428
|
+
* aspectRatioHeight: "9",
|
|
1429
|
+
* aspectRatioWidth: "16",
|
|
1430
|
+
* width: "100",
|
|
1431
|
+
* height: "100",
|
|
1432
|
+
* })
|
|
757
1433
|
* @endexample
|
|
758
1434
|
*/
|
|
759
1435
|
cropImage: ({
|
|
@@ -783,15 +1459,15 @@ declare class ImageUploader {
|
|
|
783
1459
|
*
|
|
784
1460
|
* @example
|
|
785
1461
|
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
1462
|
+
* await imageUploader.uploadNewImageFromLibrary({
|
|
1463
|
+
* localImagePath,
|
|
1464
|
+
* toggleOrginalImage: false,
|
|
1465
|
+
* toggleAspectRatioLock: false,
|
|
1466
|
+
* aspectRatioHeight: "9",
|
|
1467
|
+
* aspectRatioWidth: "16",
|
|
1468
|
+
* width: "100",
|
|
1469
|
+
* height: "100",
|
|
1470
|
+
* })
|
|
795
1471
|
* @endexample
|
|
796
1472
|
*/
|
|
797
1473
|
uploadNewImageFromLibrary: ({
|
|
@@ -849,7 +1525,7 @@ declare class ImageUploader {
|
|
|
849
1525
|
}?: Partial<SelectImage>) => Promise<void>;
|
|
850
1526
|
/**
|
|
851
1527
|
*
|
|
852
|
-
* Used to select an image from the library and crop it if required. It takes the following parameters
|
|
1528
|
+
* Used to select an image from the library and crop it if required. It takes the following parameters:
|
|
853
1529
|
*
|
|
854
1530
|
* nthImage (optional): The index of the image to be selected. Default is 0.
|
|
855
1531
|
*
|
|
@@ -869,16 +1545,16 @@ declare class ImageUploader {
|
|
|
869
1545
|
*
|
|
870
1546
|
* @example
|
|
871
1547
|
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
1548
|
+
* await imageUploader.selectImageFromLibrary({
|
|
1549
|
+
* nthImage: 0,
|
|
1550
|
+
* searchTerm: "",
|
|
1551
|
+
* toggleOrginalImage: false,
|
|
1552
|
+
* toggleAspectRatioLock: false,
|
|
1553
|
+
* aspectRatioHeight: "9",
|
|
1554
|
+
* aspectRatioWidth: "16",
|
|
1555
|
+
* width: "100",
|
|
1556
|
+
* height: "100",
|
|
1557
|
+
* })
|
|
882
1558
|
* @endexample
|
|
883
1559
|
*/
|
|
884
1560
|
selectImageFromLibrary: ({
|
|
@@ -1234,7 +1910,48 @@ declare class OrganizationPage {
|
|
|
1234
1910
|
page: Page;
|
|
1235
1911
|
neetoPlaywrightUtilities: CustomCommands;
|
|
1236
1912
|
constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
|
|
1913
|
+
/**
|
|
1914
|
+
*
|
|
1915
|
+
* Used to generate the subdomain URL. It takes the following parameters:
|
|
1916
|
+
*
|
|
1917
|
+
* appName(required): Name of the app.
|
|
1918
|
+
*
|
|
1919
|
+
* @example
|
|
1920
|
+
*
|
|
1921
|
+
* const domain = organizationPage.baseUrlGenerator(appName)
|
|
1922
|
+
* console.log(domain) // https://${subdomainName}.${appName}.net
|
|
1923
|
+
* // "subdomainName" is the loggedIn user name
|
|
1924
|
+
* @endexample
|
|
1925
|
+
*/
|
|
1237
1926
|
baseUrlGenerator: (appName: string) => string;
|
|
1927
|
+
/**
|
|
1928
|
+
*
|
|
1929
|
+
* Used to create a new organization. It takes the following parameters:
|
|
1930
|
+
*
|
|
1931
|
+
* email: Owner emails.
|
|
1932
|
+
*
|
|
1933
|
+
* businessName: Your business name.
|
|
1934
|
+
*
|
|
1935
|
+
* subdomainName: Your subdomain.
|
|
1936
|
+
*
|
|
1937
|
+
* firstName: User first name.
|
|
1938
|
+
*
|
|
1939
|
+
* lastName: User last name.
|
|
1940
|
+
*
|
|
1941
|
+
* appName: App name
|
|
1942
|
+
*
|
|
1943
|
+
* @example
|
|
1944
|
+
*
|
|
1945
|
+
* await organizationPage.createOrganization({
|
|
1946
|
+
* email:"jhondoe@gmail.com",
|
|
1947
|
+
* businessName:"BigBinary",
|
|
1948
|
+
* subdomainName:"bigbinary",
|
|
1949
|
+
* firstName:"jhon",
|
|
1950
|
+
* lastName:"doe",
|
|
1951
|
+
* appName:"neetoChat"
|
|
1952
|
+
* })
|
|
1953
|
+
* @endexample
|
|
1954
|
+
*/
|
|
1238
1955
|
createOrganization: ({
|
|
1239
1956
|
email,
|
|
1240
1957
|
businessName,
|
|
@@ -1243,9 +1960,58 @@ declare class OrganizationPage {
|
|
|
1243
1960
|
lastName,
|
|
1244
1961
|
appName
|
|
1245
1962
|
}: CreateOrganizationProps) => Promise<void>;
|
|
1963
|
+
/**
|
|
1964
|
+
*
|
|
1965
|
+
* Used to set up an Organization. It takes the following parameters:
|
|
1966
|
+
*
|
|
1967
|
+
* product: Name of the product.
|
|
1968
|
+
*
|
|
1969
|
+
* @example
|
|
1970
|
+
*
|
|
1971
|
+
* await organizationPage.setupOrganization("Chat")
|
|
1972
|
+
* @endexample
|
|
1973
|
+
*/
|
|
1246
1974
|
setupOrganization: (product: string) => Promise<void>;
|
|
1975
|
+
/**
|
|
1976
|
+
*
|
|
1977
|
+
* Used to update already existing subdomain name. It takes the following parameters:
|
|
1978
|
+
*
|
|
1979
|
+
* appName: Name of the app.
|
|
1980
|
+
*
|
|
1981
|
+
* @example
|
|
1982
|
+
*
|
|
1983
|
+
* await organizationPage.updateSubdomainIfExists("latest subdomain")
|
|
1984
|
+
* @endexample
|
|
1985
|
+
*/
|
|
1247
1986
|
updateSubdomainIfExists: (appName: string) => Promise<void>;
|
|
1987
|
+
/**
|
|
1988
|
+
*
|
|
1989
|
+
* Used to login via SSO. It takes the following parameters:
|
|
1990
|
+
*
|
|
1991
|
+
* email (optional): A bypass email. If not provided, a random bypass email will be generated.
|
|
1992
|
+
*
|
|
1993
|
+
* @example
|
|
1994
|
+
*
|
|
1995
|
+
* await organizationPage.loginViaSSO()
|
|
1996
|
+
* @endexample
|
|
1997
|
+
*/
|
|
1248
1998
|
loginViaSSO: (email?: string) => Promise<void>;
|
|
1999
|
+
/**
|
|
2000
|
+
*
|
|
2001
|
+
* Used to fill and submit all the profile info. It takes the following parameters:
|
|
2002
|
+
*
|
|
2003
|
+
* firstName (optional): The first name of the user.
|
|
2004
|
+
*
|
|
2005
|
+
* lastName (optional): The last name of the user.
|
|
2006
|
+
*
|
|
2007
|
+
* @example
|
|
2008
|
+
*
|
|
2009
|
+
* await organizationPage.setupProfile({
|
|
2010
|
+
* firstName:"John",
|
|
2011
|
+
* lastName:"Doe"
|
|
2012
|
+
* })
|
|
2013
|
+
* @endexample
|
|
2014
|
+
*/
|
|
1249
2015
|
setupProfile: ({
|
|
1250
2016
|
firstName,
|
|
1251
2017
|
lastName
|
|
@@ -1253,12 +2019,61 @@ declare class OrganizationPage {
|
|
|
1253
2019
|
firstName?: string | undefined;
|
|
1254
2020
|
lastName?: string | undefined;
|
|
1255
2021
|
}) => Promise<void>;
|
|
2022
|
+
/**
|
|
2023
|
+
*
|
|
2024
|
+
* Used to login and onboard the user to app. It takes the following parameters:
|
|
2025
|
+
*
|
|
2026
|
+
* email: User email.
|
|
2027
|
+
*
|
|
2028
|
+
* firstName: User first name.
|
|
2029
|
+
*
|
|
2030
|
+
* lastName: User last name.
|
|
2031
|
+
*
|
|
2032
|
+
* handleOnBoard: Method to call after onboarding.
|
|
2033
|
+
*
|
|
2034
|
+
* @example
|
|
2035
|
+
*
|
|
2036
|
+
* await organizationPage.loginAndOnboard({
|
|
2037
|
+
* email:"jhondoe@gmail.com",
|
|
2038
|
+
* firstName:"jhon",
|
|
2039
|
+
* lastName:"doe",
|
|
2040
|
+
* handleOnboarding:() => methodToOnBoard
|
|
2041
|
+
* })
|
|
2042
|
+
* @endexample
|
|
2043
|
+
*/
|
|
1256
2044
|
loginAndOnboard: ({
|
|
1257
2045
|
email,
|
|
1258
2046
|
firstName,
|
|
1259
2047
|
lastName,
|
|
1260
2048
|
handleOnboarding
|
|
1261
2049
|
}: LoginAndOnboardParams) => Promise<void>;
|
|
2050
|
+
/**
|
|
2051
|
+
*
|
|
2052
|
+
* Used to signUp the user. It takes the following parameters:
|
|
2053
|
+
*
|
|
2054
|
+
* otp: (optional) OTP to verify the email.
|
|
2055
|
+
*
|
|
2056
|
+
* fetchOtpFromEmail: (optional) Method to fetch OTP from email.
|
|
2057
|
+
*
|
|
2058
|
+
* @example
|
|
2059
|
+
*
|
|
2060
|
+
* const fetchOtpFromEmail = (email,timeOut)=>Promise<void>
|
|
2061
|
+
*
|
|
2062
|
+
* const credentials = {
|
|
2063
|
+
* otp:1234,
|
|
2064
|
+
* domain:"chat.com",
|
|
2065
|
+
* currentUserName:"jhon",
|
|
2066
|
+
* businessName:"bigbinary",
|
|
2067
|
+
* subdomainName: "bigbinary"
|
|
2068
|
+
* }
|
|
2069
|
+
*
|
|
2070
|
+
* await organizationPage.signUp({
|
|
2071
|
+
* credentials,
|
|
2072
|
+
* fetchOtpFromEmail,
|
|
2073
|
+
* appName:"neetoChat"
|
|
2074
|
+
* })
|
|
2075
|
+
* @endexample
|
|
2076
|
+
*/
|
|
1262
2077
|
signUp: ({
|
|
1263
2078
|
credentials,
|
|
1264
2079
|
fetchOtpFromEmail,
|
|
@@ -1292,6 +2107,26 @@ declare class OrganizationPage {
|
|
|
1292
2107
|
};
|
|
1293
2108
|
baseURL: string | undefined;
|
|
1294
2109
|
}>;
|
|
2110
|
+
/**
|
|
2111
|
+
*
|
|
2112
|
+
* Used to fill and complete all the details of an Organization.
|
|
2113
|
+
*
|
|
2114
|
+
* @example
|
|
2115
|
+
*
|
|
2116
|
+
* const credentials = {
|
|
2117
|
+
* otp:1234,
|
|
2118
|
+
* domain:"chat.com",
|
|
2119
|
+
* currentUserName:"jhon",
|
|
2120
|
+
* businessName:"bigbinary",
|
|
2121
|
+
* subdomainName: "bigbinary"
|
|
2122
|
+
* }
|
|
2123
|
+
*
|
|
2124
|
+
* await organizationPage.fillOrganizationDetails({
|
|
2125
|
+
* credentials,
|
|
2126
|
+
* appName:"neetoChat"
|
|
2127
|
+
* })
|
|
2128
|
+
* @endexample
|
|
2129
|
+
*/
|
|
1295
2130
|
fillOrganizationDetails: ({
|
|
1296
2131
|
credentials,
|
|
1297
2132
|
appName
|
|
@@ -1305,32 +2140,193 @@ declare class SidebarSection {
|
|
|
1305
2140
|
neetoPlaywrightUtilities: CustomCommands;
|
|
1306
2141
|
t: TFunction;
|
|
1307
2142
|
constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
|
|
2143
|
+
/**
|
|
2144
|
+
*
|
|
2145
|
+
* Used to click on the sub link in the sidebar. It takes the following parameters:
|
|
2146
|
+
*
|
|
2147
|
+
* label (required): The label of the sub link.
|
|
2148
|
+
*
|
|
2149
|
+
* @example
|
|
2150
|
+
*
|
|
2151
|
+
* await sideBarPage.clickOnSubLink("open menu item")
|
|
2152
|
+
* @endexample
|
|
2153
|
+
*/
|
|
1308
2154
|
clickOnSubLink: (label: string) => Promise<void>;
|
|
2155
|
+
/**
|
|
2156
|
+
*
|
|
2157
|
+
* Used to go back to the previous page. It takes the following parameters:
|
|
2158
|
+
*
|
|
2159
|
+
* label (required): The label of the go back button.
|
|
2160
|
+
*
|
|
2161
|
+
* @example
|
|
2162
|
+
*
|
|
2163
|
+
* await sideBarPage.sidebarGoBackButton("settings")
|
|
2164
|
+
* @endexample
|
|
2165
|
+
*/
|
|
1309
2166
|
clickOnGoBackButton: (label: string) => Promise<void>;
|
|
1310
2167
|
}
|
|
2168
|
+
/**
|
|
2169
|
+
*
|
|
2170
|
+
* Constants related to different environments.
|
|
2171
|
+
*
|
|
2172
|
+
* development: Represents the development environment.
|
|
2173
|
+
*
|
|
2174
|
+
* staging: Represents the staging environment.
|
|
2175
|
+
*
|
|
2176
|
+
* review: Represents the review environment.
|
|
2177
|
+
*
|
|
2178
|
+
* @example
|
|
2179
|
+
*
|
|
2180
|
+
* if (process.env.NODE_ENV === ENVIRONMENT.development) {
|
|
2181
|
+
* // Perform actions specific to the development environment
|
|
2182
|
+
* }
|
|
2183
|
+
*
|
|
2184
|
+
* // OR
|
|
2185
|
+
*
|
|
2186
|
+
* if (process.env.NODE_ENV === ENVIRONMENT.staging) {
|
|
2187
|
+
* // Perform actions specific to the staging environment
|
|
2188
|
+
* }
|
|
2189
|
+
*
|
|
2190
|
+
* // OR
|
|
2191
|
+
*
|
|
2192
|
+
* if (process.env.NODE_ENV === ENVIRONMENT.review) {
|
|
2193
|
+
* // Perform actions specific to the review environment
|
|
2194
|
+
* }
|
|
2195
|
+
* @endexample
|
|
2196
|
+
*/
|
|
1311
2197
|
declare const ENVIRONMENT: {
|
|
1312
2198
|
development: string;
|
|
1313
2199
|
staging: string;
|
|
1314
2200
|
review: string;
|
|
1315
2201
|
};
|
|
2202
|
+
/**
|
|
2203
|
+
*
|
|
2204
|
+
* Boolean value indicating whether the current environment is staging.
|
|
2205
|
+
*
|
|
2206
|
+
* @example
|
|
2207
|
+
*
|
|
2208
|
+
* if(IS_STAGING_ENV){
|
|
2209
|
+
* // Perform actions specific to the staging environment
|
|
2210
|
+
* }
|
|
2211
|
+
* @endexample
|
|
2212
|
+
*/
|
|
1316
2213
|
declare const IS_STAGING_ENV: boolean;
|
|
2214
|
+
/**
|
|
2215
|
+
*
|
|
2216
|
+
* Path to the JSON file for storing authentication data.
|
|
2217
|
+
*
|
|
2218
|
+
*/
|
|
1317
2219
|
declare const STORAGE_STATE = "./e2e/auth/user.json";
|
|
2220
|
+
/**
|
|
2221
|
+
*
|
|
2222
|
+
* Pattern for global translations file path.
|
|
2223
|
+
*
|
|
2224
|
+
*/
|
|
1318
2225
|
declare const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
|
|
2226
|
+
/**
|
|
2227
|
+
*
|
|
2228
|
+
* Path to project-specific translations file.
|
|
2229
|
+
*
|
|
2230
|
+
*/
|
|
1319
2231
|
declare const PROJECT_TRANSLATIONS_PATH = "../app/javascript/src/translations/en.json";
|
|
2232
|
+
/**
|
|
2233
|
+
*
|
|
2234
|
+
* Default credentials for testing purposes.
|
|
2235
|
+
*
|
|
2236
|
+
*/
|
|
1320
2237
|
declare const CREDENTIALS: {
|
|
1321
2238
|
name: string;
|
|
1322
2239
|
email: string;
|
|
1323
2240
|
password: string;
|
|
1324
2241
|
};
|
|
2242
|
+
/**
|
|
2243
|
+
*
|
|
2244
|
+
* Pattern for the subject of OTP emails.
|
|
2245
|
+
*
|
|
2246
|
+
*/
|
|
1325
2247
|
declare const OTP_EMAIL_PATTERN = "is your login code";
|
|
2248
|
+
/**
|
|
2249
|
+
*
|
|
2250
|
+
* Default Slack channel.
|
|
2251
|
+
*
|
|
2252
|
+
*/
|
|
1326
2253
|
declare const SLACK_DEFAULT_CHANNEL = "general";
|
|
2254
|
+
/**
|
|
2255
|
+
*
|
|
2256
|
+
* Function to generate Zapier test email address based on the product. It takes the following parameters:
|
|
2257
|
+
*
|
|
2258
|
+
* product: Product name.
|
|
2259
|
+
*
|
|
2260
|
+
* @example
|
|
2261
|
+
*
|
|
2262
|
+
* const testEmail = ZAPIER_TEST_EMAIL("neetoChat");
|
|
2263
|
+
*
|
|
2264
|
+
* console.log(testEmail) // `neeto-neetoChat-zapier-test@${process.env.INTEGRATION_MAILOSAUR_SERVER_ID}.mailosaur.net`
|
|
2265
|
+
* @endexample
|
|
2266
|
+
*/
|
|
1327
2267
|
declare const ZAPIER_TEST_EMAIL: (product: string) => string;
|
|
1328
2268
|
declare const USER_AGENTS: {
|
|
1329
2269
|
windows: string;
|
|
1330
2270
|
mac: string;
|
|
1331
2271
|
};
|
|
2272
|
+
/**
|
|
2273
|
+
*
|
|
2274
|
+
* Description: Base URL for API endpoints.
|
|
2275
|
+
*
|
|
2276
|
+
* Value: "/api/v1"
|
|
2277
|
+
*
|
|
2278
|
+
* @example
|
|
2279
|
+
*
|
|
2280
|
+
* import { BASE_URL } from "@bigbinary/neeto-playwright-commons";
|
|
2281
|
+
* @endexample
|
|
2282
|
+
*/
|
|
1332
2283
|
declare const BASE_URL = "/api/v1";
|
|
1333
2284
|
declare const NEETO_AUTH_BASE_URL: (subdomain?: string) => string;
|
|
2285
|
+
/**
|
|
2286
|
+
*
|
|
2287
|
+
* Object containing various route URLs.
|
|
2288
|
+
*
|
|
2289
|
+
* @example
|
|
2290
|
+
*
|
|
2291
|
+
* import { ROUTES } from "@bigbinary/neeto-playwright-commons";
|
|
2292
|
+
* @endexample
|
|
2293
|
+
* neetoAuthSignup: URL for Neeto Auth signup page.
|
|
2294
|
+
*
|
|
2295
|
+
* neetoAuth: Base URL for Neeto Auth.
|
|
2296
|
+
*
|
|
2297
|
+
* loginLink: URL for login page.
|
|
2298
|
+
*
|
|
2299
|
+
* profile: URL for user profile page.
|
|
2300
|
+
*
|
|
2301
|
+
* admin: URL for admin page.
|
|
2302
|
+
*
|
|
2303
|
+
* myProfile: URL for personal profile page.
|
|
2304
|
+
*
|
|
2305
|
+
* authSettings: URL for authentication settings page.
|
|
2306
|
+
*
|
|
2307
|
+
* webhooks: URL for webhooks page.
|
|
2308
|
+
*
|
|
2309
|
+
* login: URL for login API endpoint.
|
|
2310
|
+
*
|
|
2311
|
+
* signup: URL for signup API endpoint.
|
|
2312
|
+
*
|
|
2313
|
+
* subdomainAvailability: URL for checking subdomain availability API endpoint.
|
|
2314
|
+
*
|
|
2315
|
+
* countries: URL for countries API endpoint.
|
|
2316
|
+
*
|
|
2317
|
+
* neetoApps: URL for Neeto Apps API endpoint.
|
|
2318
|
+
*
|
|
2319
|
+
* teamMembers: Object containing URLs related to team members.
|
|
2320
|
+
*
|
|
2321
|
+
* all: URL for retrieving all team members.
|
|
2322
|
+
*
|
|
2323
|
+
* bulkUpdate: URL for bulk updating team members.
|
|
2324
|
+
*
|
|
2325
|
+
* index: URL for team members index.
|
|
2326
|
+
*
|
|
2327
|
+
* show(id): Method to generate URL for showing a specific team member's details.
|
|
2328
|
+
*
|
|
2329
|
+
*/
|
|
1334
2330
|
declare const ROUTES: {
|
|
1335
2331
|
neetoAuthSignup: string;
|
|
1336
2332
|
neetoAuth: string;
|
|
@@ -1354,6 +2350,23 @@ declare const ROUTES: {
|
|
|
1354
2350
|
};
|
|
1355
2351
|
attachment: string;
|
|
1356
2352
|
};
|
|
2353
|
+
/**
|
|
2354
|
+
*
|
|
2355
|
+
* Object containing API route URLs.
|
|
2356
|
+
*
|
|
2357
|
+
* @example
|
|
2358
|
+
*
|
|
2359
|
+
* import { API_ROUTES } from "@bigbinary/neeto-playwright-commons";
|
|
2360
|
+
* @endexample
|
|
2361
|
+
* teamMembers: Object containing URLs related to team members (similar structure to ROUTES).
|
|
2362
|
+
*
|
|
2363
|
+
* integrations: Object containing URLs for integrations.
|
|
2364
|
+
*
|
|
2365
|
+
* zapier: Object containing URLs specific to Zapier integration.
|
|
2366
|
+
*
|
|
2367
|
+
* api_keys: URL for Zapier API keys.
|
|
2368
|
+
*
|
|
2369
|
+
*/
|
|
1357
2370
|
declare const API_ROUTES: {
|
|
1358
2371
|
teamMembers: {
|
|
1359
2372
|
all: string;
|
|
@@ -1367,6 +2380,39 @@ declare const API_ROUTES: {
|
|
|
1367
2380
|
};
|
|
1368
2381
|
};
|
|
1369
2382
|
};
|
|
2383
|
+
/**
|
|
2384
|
+
*
|
|
2385
|
+
* Object containing URLs for third-party services.
|
|
2386
|
+
*
|
|
2387
|
+
* @example
|
|
2388
|
+
*
|
|
2389
|
+
* import { THIRD_PARTY_ROUTES } from "@bigbinary/neeto-playwright-commons";
|
|
2390
|
+
* @endexample
|
|
2391
|
+
* webhooks: Object containing URLs for webhook services.
|
|
2392
|
+
*
|
|
2393
|
+
* site: Base URL for webhook.site.
|
|
2394
|
+
*
|
|
2395
|
+
* slack: Object containing URLs for Slack.
|
|
2396
|
+
*
|
|
2397
|
+
* loginWithPassword(workspace): Method to generate URL for logging into Slack workspace using password.
|
|
2398
|
+
*
|
|
2399
|
+
* @example
|
|
2400
|
+
*
|
|
2401
|
+
* THIRD_PARTY_ROUTES.slack.loginWithPassword("example") // Outputs: "https://example.slack.com/sign_in_with_password"
|
|
2402
|
+
* @endexample
|
|
2403
|
+
* zapier: Object containing URLs for Zapier.
|
|
2404
|
+
*
|
|
2405
|
+
* login: URL for Zapier login.
|
|
2406
|
+
*
|
|
2407
|
+
* logOut: URL for Zapier logout.
|
|
2408
|
+
*
|
|
2409
|
+
* zapEditor(zapId): Method to generate URL for Zapier Zap editor.
|
|
2410
|
+
*
|
|
2411
|
+
* @example
|
|
2412
|
+
*
|
|
2413
|
+
* THIRD_PARTY_ROUTES.zapier.zapEditor("123") // Outputs: "https://zapier.com/editor/123"
|
|
2414
|
+
* @endexample
|
|
2415
|
+
*/
|
|
1370
2416
|
declare const THIRD_PARTY_ROUTES: {
|
|
1371
2417
|
webhooks: {
|
|
1372
2418
|
site: string;
|
|
@@ -1386,18 +2432,144 @@ declare const NEETO_ROUTES: {
|
|
|
1386
2432
|
declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling", Protocol.Network.emulateNetworkConditionsParameters>;
|
|
1387
2433
|
/**
|
|
1388
2434
|
*
|
|
1389
|
-
*
|
|
1390
|
-
*
|
|
1391
|
-
* neetoUI components.
|
|
1392
|
-
*
|
|
1393
|
-
* undefined
|
|
2435
|
+
* Common selectors for UI elements.
|
|
1394
2436
|
*
|
|
1395
2437
|
* @example
|
|
1396
2438
|
*
|
|
1397
2439
|
* import { COMMON_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
1398
|
-
*
|
|
1399
|
-
* cy.get(COMMON_SELECTORS.alertTitle).should("be.visible");
|
|
1400
2440
|
* @endexample
|
|
2441
|
+
* copyButton: Selector for the copy button.
|
|
2442
|
+
*
|
|
2443
|
+
* spinner: Selector for spinners.
|
|
2444
|
+
*
|
|
2445
|
+
* subheaderText: Selector to get the subheader text.
|
|
2446
|
+
*
|
|
2447
|
+
* alertTitle: Selector for alert titles.
|
|
2448
|
+
*
|
|
2449
|
+
* alertModalMessage: Selector for alert modal messages.
|
|
2450
|
+
*
|
|
2451
|
+
* alertModalSubmitButton: to get the submit button of the neetoUI Alert component.
|
|
2452
|
+
*
|
|
2453
|
+
* checkbox: Selector for checkboxes.
|
|
2454
|
+
*
|
|
2455
|
+
* checkboxLabel: Selector for checkbox labels.
|
|
2456
|
+
*
|
|
2457
|
+
* dropdownContainer: Selector for dropdown containers.
|
|
2458
|
+
*
|
|
2459
|
+
* dropdownIcon: Selector for dropdown icons.
|
|
2460
|
+
*
|
|
2461
|
+
* heading: Selector for headings.
|
|
2462
|
+
*
|
|
2463
|
+
* paneBody: Selector for pane bodies.
|
|
2464
|
+
*
|
|
2465
|
+
* paneHeader: Selector for pane headers.
|
|
2466
|
+
*
|
|
2467
|
+
* profileSidebar: Selector for profile sidebars.
|
|
2468
|
+
*
|
|
2469
|
+
* selectOption(label: string): Method that generates a selector for select options based on the label.
|
|
2470
|
+
*
|
|
2471
|
+
* radioLabel(embedLabel: string): Method that generates a selector for radio labels based on the embedded label.
|
|
2472
|
+
*
|
|
2473
|
+
* toastMessage: To get the neetoUI Toastr message.
|
|
2474
|
+
*
|
|
2475
|
+
* toastCloseButton: To get the neetoUI Toastr close icon.
|
|
2476
|
+
*
|
|
2477
|
+
* windowAlert: Selector for window alerts.
|
|
2478
|
+
*
|
|
2479
|
+
* body: Selector for the body.
|
|
2480
|
+
*
|
|
2481
|
+
* toastIcon: To get the neetoUI Toastr icon.
|
|
2482
|
+
*
|
|
2483
|
+
* paneModalCrossIcon: Selector for pane modal cross icons.
|
|
2484
|
+
*
|
|
2485
|
+
* inputField: Selector to get neetoUI input field.
|
|
2486
|
+
*
|
|
2487
|
+
* alertConfirmationText: Selector for alert confirmation text.
|
|
2488
|
+
*
|
|
2489
|
+
* alertCancelButton: Selector for alert cancel buttons.
|
|
2490
|
+
*
|
|
2491
|
+
* alertModalCrossIcon: Selector for alert modal cross icons.
|
|
2492
|
+
*
|
|
2493
|
+
* saveChangesButton: Selector for save changes buttons.
|
|
2494
|
+
*
|
|
2495
|
+
* cancelButton: Selector for cancel buttons.
|
|
2496
|
+
*
|
|
2497
|
+
* inputFieldError: Selector for input field errors.
|
|
2498
|
+
*
|
|
2499
|
+
* selectDropDownError: Selector for select dropdown errors.
|
|
2500
|
+
*
|
|
2501
|
+
* subTitleHeading: Selector for subtitle headings.
|
|
2502
|
+
*
|
|
2503
|
+
* noDataTitle: Selector for no data titles.
|
|
2504
|
+
*
|
|
2505
|
+
* noDataDescription: Selector for no data descriptions.
|
|
2506
|
+
*
|
|
2507
|
+
* backdrop: Selector for backdrops.
|
|
2508
|
+
*
|
|
2509
|
+
* menuBarHeading: Selector for menu bar headings.
|
|
2510
|
+
*
|
|
2511
|
+
* dropdownWrapper: Selector for dropdown wrappers.
|
|
2512
|
+
*
|
|
2513
|
+
* toggleButton: Selector for toggle buttons.
|
|
2514
|
+
*
|
|
2515
|
+
* tooltip: Selector for tooltips.
|
|
2516
|
+
*
|
|
2517
|
+
* articlePageTitle: Selector for article page titles.
|
|
2518
|
+
*
|
|
2519
|
+
* tabItem: Selector for tab items.
|
|
2520
|
+
*
|
|
2521
|
+
* labelInputError: Selector for label input errors.
|
|
2522
|
+
*
|
|
2523
|
+
* urlInputError: Selector for URL input errors.
|
|
2524
|
+
*
|
|
2525
|
+
* noDataPrimaryButton: Selector for no data primary buttons.
|
|
2526
|
+
*
|
|
2527
|
+
* modalHeader: Selector for modal headers.
|
|
2528
|
+
*
|
|
2529
|
+
* nameInputError: Selector for name input errors.
|
|
2530
|
+
*
|
|
2531
|
+
* selectContainer: to get the select container.
|
|
2532
|
+
*
|
|
2533
|
+
* selectValueContainer: Selector for select value containers.
|
|
2534
|
+
*
|
|
2535
|
+
* dropdownMenu: Selector for dropdown menus.
|
|
2536
|
+
*
|
|
2537
|
+
* sidebarToggle: Selector for sidebar toggles.
|
|
2538
|
+
*
|
|
2539
|
+
* subheader: Selector for subheaders.
|
|
2540
|
+
*
|
|
2541
|
+
* settingsLink: Selector for settings links.
|
|
2542
|
+
*
|
|
2543
|
+
* ticketFieldTextInput(label: string | number): Method that generates a selector for ticket field text inputs based on the label.
|
|
2544
|
+
*
|
|
2545
|
+
* appSwitcherButton: Selector for app switcher buttons.
|
|
2546
|
+
*
|
|
2547
|
+
* appSwitcherWrapper: Selector for app switcher wrappers.
|
|
2548
|
+
*
|
|
2549
|
+
* tableSpinner: Selector to get the spinner when the table is loading.
|
|
2550
|
+
*
|
|
2551
|
+
* pageLoader: Selector to get the spinner when the page element is loading.
|
|
2552
|
+
*
|
|
2553
|
+
* homeButton: Selector for home buttons.
|
|
2554
|
+
*
|
|
2555
|
+
* neetoUiSwitch: Selector for Neeto UI switches.
|
|
2556
|
+
*
|
|
2557
|
+
* floatingActionMenuButton: Selector for floating action menu buttons.
|
|
2558
|
+
*
|
|
2559
|
+
* columnsDropdownContainer: Selector for columns dropdown containers.
|
|
2560
|
+
*
|
|
2561
|
+
* columnsDropdownButton: Selector for columns dropdown buttons.
|
|
2562
|
+
*
|
|
2563
|
+
* breadcrumbHeader: Selector for breadcrumb headers.
|
|
2564
|
+
*
|
|
2565
|
+
* header: Selector to get the page header.
|
|
2566
|
+
*
|
|
2567
|
+
* sidebarSubLink(label: string): Method that generates a selector for sidebar sub-links based on the label.
|
|
2568
|
+
*
|
|
2569
|
+
* sidebarGoBackButton(label: string): Method that generates a selector for sidebar go-back buttons based on the label.
|
|
2570
|
+
*
|
|
2571
|
+
* selectSingleValue: Selector for select single values.
|
|
2572
|
+
*
|
|
1401
2573
|
*/
|
|
1402
2574
|
declare const COMMON_SELECTORS: {
|
|
1403
2575
|
emailInputError: string;
|
|
@@ -1473,6 +2645,57 @@ declare const COMMON_SELECTORS: {
|
|
|
1473
2645
|
takeActionDropdown: string;
|
|
1474
2646
|
columnsSearchInput: string;
|
|
1475
2647
|
};
|
|
2648
|
+
/**
|
|
2649
|
+
*
|
|
2650
|
+
* Selectors for Neeto editor components.
|
|
2651
|
+
*
|
|
2652
|
+
* @example
|
|
2653
|
+
*
|
|
2654
|
+
* import { NEETO_EDITOR_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
2655
|
+
* @endexample
|
|
2656
|
+
* boldOption: Selector for the bold option.
|
|
2657
|
+
*
|
|
2658
|
+
* italicOption: Selector for the italic option.
|
|
2659
|
+
*
|
|
2660
|
+
* underlineOption: Selector for the underline option.
|
|
2661
|
+
*
|
|
2662
|
+
* strikeOption: Selector for the strike option.
|
|
2663
|
+
*
|
|
2664
|
+
* codeBlockOption: Selector for the code block option.
|
|
2665
|
+
*
|
|
2666
|
+
* highlightOption: Selector for the highlight option.
|
|
2667
|
+
*
|
|
2668
|
+
* linkInput: Selector for the link input.
|
|
2669
|
+
*
|
|
2670
|
+
* linkSubmitButton: Selector for the link submit button.
|
|
2671
|
+
*
|
|
2672
|
+
* commandList(index: number): Method that generates a selector for command list items based on the index.
|
|
2673
|
+
*
|
|
2674
|
+
* imageUploadUrlSubmitButton: Selector for the image upload URL submit button.
|
|
2675
|
+
*
|
|
2676
|
+
* imageUploadUrlInputTextField: Selector for the image upload URL input text field.
|
|
2677
|
+
*
|
|
2678
|
+
* uploadInput: Selector for the upload input.
|
|
2679
|
+
*
|
|
2680
|
+
* editorMenuBarWrapper: Selector for the editor menu bar wrapper.
|
|
2681
|
+
*
|
|
2682
|
+
* undoOption: Selector for the undo option.
|
|
2683
|
+
*
|
|
2684
|
+
* redoOption: Selector for the redo option.
|
|
2685
|
+
*
|
|
2686
|
+
* imageWrapper: Selector for the image wrapper.
|
|
2687
|
+
*
|
|
2688
|
+
* contentField: Selector for the content field.
|
|
2689
|
+
*
|
|
2690
|
+
* addLinkButton: Selector for the add link button.
|
|
2691
|
+
*
|
|
2692
|
+
* addLinkTextField: Selector for the add link text input field.
|
|
2693
|
+
*
|
|
2694
|
+
* addURLTextField: Selector for the add URL input field.
|
|
2695
|
+
*
|
|
2696
|
+
* submitLinkButton: Selector for the submit link button.
|
|
2697
|
+
*
|
|
2698
|
+
*/
|
|
1476
2699
|
declare const NEETO_EDITOR_SELECTORS: {
|
|
1477
2700
|
boldOption: string;
|
|
1478
2701
|
italicOption: string;
|
|
@@ -1542,6 +2765,47 @@ declare const FONT_SIZE_SELECTORS: {
|
|
|
1542
2765
|
h4: string;
|
|
1543
2766
|
h5: string;
|
|
1544
2767
|
};
|
|
2768
|
+
/**
|
|
2769
|
+
*
|
|
2770
|
+
* Selectors for Neeto filters components.
|
|
2771
|
+
*
|
|
2772
|
+
* @example
|
|
2773
|
+
*
|
|
2774
|
+
* import { NEETO_FILTERS_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
2775
|
+
* @endexample
|
|
2776
|
+
* emailSelectContainer: Selector for the email select container wrapper.
|
|
2777
|
+
*
|
|
2778
|
+
* filterPaneHeading: Selector for the Neeto filters pane header.
|
|
2779
|
+
*
|
|
2780
|
+
* neetoFiltersEmailBlock: Selector for the Neeto filters email block.
|
|
2781
|
+
*
|
|
2782
|
+
* neetoFiltersRoleBlock: Selector for the Neeto filters role block.
|
|
2783
|
+
*
|
|
2784
|
+
* neetoFiltersBarClearButton: Selector for the Neeto filters bar clear button.
|
|
2785
|
+
*
|
|
2786
|
+
* neetoFiltersNameFilterField: Selector for the Neeto filters name filter field.
|
|
2787
|
+
*
|
|
2788
|
+
* neetoFilterNameBlock: Selector for the Neeto filter name block.
|
|
2789
|
+
*
|
|
2790
|
+
* roleSelectContainer: Selector for the role select container wrapper.
|
|
2791
|
+
*
|
|
2792
|
+
* filterButton: Selector for the Neeto filters toggle button.
|
|
2793
|
+
*
|
|
2794
|
+
* filtersClearButton: Selector for the Neeto filters clear button.
|
|
2795
|
+
*
|
|
2796
|
+
* filterDoneButton: Selector for the Neeto filters done button.
|
|
2797
|
+
*
|
|
2798
|
+
* filteredMembersCount: Selector for the filtered members count.
|
|
2799
|
+
*
|
|
2800
|
+
* allMenubarBlock: Selector for the all menubar block.
|
|
2801
|
+
*
|
|
2802
|
+
* filtersEmailFilter: Selector for the Neeto filters email filter.
|
|
2803
|
+
*
|
|
2804
|
+
* paneModalCrossIcon: Selector for the Neeto filters pane modal cross icon.
|
|
2805
|
+
*
|
|
2806
|
+
* searchTermBlock: Selector for the Neeto filters search term block.
|
|
2807
|
+
*
|
|
2808
|
+
*/
|
|
1545
2809
|
declare const NEETO_FILTERS_SELECTORS: {
|
|
1546
2810
|
emailSelectContainer: string;
|
|
1547
2811
|
filterPaneHeading: string;
|
|
@@ -1560,6 +2824,33 @@ declare const NEETO_FILTERS_SELECTORS: {
|
|
|
1560
2824
|
paneModalCrossIcon: string;
|
|
1561
2825
|
searchTermBlock: string;
|
|
1562
2826
|
};
|
|
2827
|
+
/**
|
|
2828
|
+
*
|
|
2829
|
+
* Selectors for Help Center components.
|
|
2830
|
+
*
|
|
2831
|
+
* @example
|
|
2832
|
+
*
|
|
2833
|
+
* import { HELP_CENTER_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
2834
|
+
* @endexample
|
|
2835
|
+
* helpButton: Selector for the help button.
|
|
2836
|
+
*
|
|
2837
|
+
* documentationButton: Selector for the documentation button.
|
|
2838
|
+
*
|
|
2839
|
+
* keyboardShortcutButton: Selector for the keyboard shortcut button.
|
|
2840
|
+
*
|
|
2841
|
+
* chatButton: Selector for the chat button.
|
|
2842
|
+
*
|
|
2843
|
+
* whatsNewButton: Selector for the "What's New" button.
|
|
2844
|
+
*
|
|
2845
|
+
* whatsNewWidgetInfo: Selector for the "What's New" widget info.
|
|
2846
|
+
*
|
|
2847
|
+
* whatsNewWidgetCloseButton: Selector for the "What's New" widget close button.
|
|
2848
|
+
*
|
|
2849
|
+
* keyboardShortcutPaneHeading: Selector for the keyboard shortcut pane heading.
|
|
2850
|
+
*
|
|
2851
|
+
* keyboardShortcutPaneCrossIcon: Selector for the keyboard shortcut pane cross icon.
|
|
2852
|
+
*
|
|
2853
|
+
*/
|
|
1563
2854
|
declare const HELP_CENTER_SELECTORS: {
|
|
1564
2855
|
helpButton: string;
|
|
1565
2856
|
documentationButton: string;
|
|
@@ -1571,6 +2862,33 @@ declare const HELP_CENTER_SELECTORS: {
|
|
|
1571
2862
|
keyboardShortcutPaneHeading: string;
|
|
1572
2863
|
keyboardShortcutPaneCrossIcon: string;
|
|
1573
2864
|
};
|
|
2865
|
+
/**
|
|
2866
|
+
*
|
|
2867
|
+
* Selectors for login components.
|
|
2868
|
+
*
|
|
2869
|
+
* @example
|
|
2870
|
+
*
|
|
2871
|
+
* import { LOGIN_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
2872
|
+
* @endexample
|
|
2873
|
+
* appleAuthenticationButton: Selector for the Apple authentication button.
|
|
2874
|
+
*
|
|
2875
|
+
* emailTextField: Selector to get the email field.
|
|
2876
|
+
*
|
|
2877
|
+
* googleAuthenticationButton: Selector for the Google authentication button.
|
|
2878
|
+
*
|
|
2879
|
+
* githubAuthenticationButton: Selector for the GitHub authentication button.
|
|
2880
|
+
*
|
|
2881
|
+
* loginViaEmailButton: Selector for the login via email button.
|
|
2882
|
+
*
|
|
2883
|
+
* passwordTextField: Selector for the password text field.
|
|
2884
|
+
*
|
|
2885
|
+
* rememberMeCheckBox: Selector for the remember me check box.
|
|
2886
|
+
*
|
|
2887
|
+
* submitButton: Selector for the submit button.
|
|
2888
|
+
*
|
|
2889
|
+
* twitterAuthenticationButton: Selector for the Twitter authentication button.
|
|
2890
|
+
*
|
|
2891
|
+
*/
|
|
1574
2892
|
declare const LOGIN_SELECTORS: {
|
|
1575
2893
|
appleAuthenticationButton: string;
|
|
1576
2894
|
emailTextField: string;
|
|
@@ -1582,6 +2900,61 @@ declare const LOGIN_SELECTORS: {
|
|
|
1582
2900
|
submitButton: string;
|
|
1583
2901
|
twitterAuthenticationButton: string;
|
|
1584
2902
|
};
|
|
2903
|
+
/**
|
|
2904
|
+
*
|
|
2905
|
+
* Selectors for member components.
|
|
2906
|
+
*
|
|
2907
|
+
* @example
|
|
2908
|
+
*
|
|
2909
|
+
* import { MEMBER_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
2910
|
+
* @endexample
|
|
2911
|
+
* membersTab: Selector for the members tab.
|
|
2912
|
+
*
|
|
2913
|
+
* newButton: Selector for the "New" button to add a new member.
|
|
2914
|
+
*
|
|
2915
|
+
* continueButton: Selector for the "Continue" button.
|
|
2916
|
+
*
|
|
2917
|
+
* submitButton: Selector for the "Submit" button.
|
|
2918
|
+
*
|
|
2919
|
+
* searchTextField: Selector for the search text field.
|
|
2920
|
+
*
|
|
2921
|
+
* deactivatedAgentsButton: Selector for the deactivated agents button.
|
|
2922
|
+
*
|
|
2923
|
+
* activatedMembersButton: Selector for the activated members button.
|
|
2924
|
+
*
|
|
2925
|
+
* columnCheckBox: Selector to get the neetoUI checkbox.
|
|
2926
|
+
*
|
|
2927
|
+
* roleLabel(role: string): Method that generates a selector for role labels based on the role.
|
|
2928
|
+
*
|
|
2929
|
+
* dropDownIcon: Selector to get the neetoUI Dropdown icon button.
|
|
2930
|
+
*
|
|
2931
|
+
* editButton: Selector for the edit button.
|
|
2932
|
+
*
|
|
2933
|
+
* menuBarHeading: Selector for the menu bar heading.
|
|
2934
|
+
*
|
|
2935
|
+
* activateOrDeactivateMember: Selector for the activate or deactivate member button.
|
|
2936
|
+
*
|
|
2937
|
+
* columnsButton: Selector for the columns button.
|
|
2938
|
+
*
|
|
2939
|
+
* columnsDropdownContainer: Selector for the columns dropdown container.
|
|
2940
|
+
*
|
|
2941
|
+
* emailDropdownItemLabel: Selector for the email dropdown item label.
|
|
2942
|
+
*
|
|
2943
|
+
* roleDropdownItemLabel: Selector for the role dropdown item label.
|
|
2944
|
+
*
|
|
2945
|
+
* inviteStatusDropdownItemLabel: Selector for the invite status dropdown item label.
|
|
2946
|
+
*
|
|
2947
|
+
* heading: Selector for the manage members pane header.
|
|
2948
|
+
*
|
|
2949
|
+
* activateButton: Selector for the activate members button.
|
|
2950
|
+
*
|
|
2951
|
+
* deactivateButton: Selector for the deactivate members button.
|
|
2952
|
+
*
|
|
2953
|
+
* rolesButton: Selector for the manage member roles button.
|
|
2954
|
+
*
|
|
2955
|
+
* statusTag: Selector for the member status tag.
|
|
2956
|
+
*
|
|
2957
|
+
*/
|
|
1585
2958
|
declare const MEMBER_SELECTORS: {
|
|
1586
2959
|
membersTab: string;
|
|
1587
2960
|
newButton: string;
|
|
@@ -1611,6 +2984,27 @@ declare const MEMBER_SELECTORS: {
|
|
|
1611
2984
|
takeActionStateOption: (option?: string) => string;
|
|
1612
2985
|
checkboxLabel: (label: string) => string;
|
|
1613
2986
|
};
|
|
2987
|
+
/**
|
|
2988
|
+
*
|
|
2989
|
+
* Selectors for member form components.
|
|
2990
|
+
*
|
|
2991
|
+
* @example
|
|
2992
|
+
*
|
|
2993
|
+
* import { MEMBER_FORM_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
2994
|
+
* @endexample
|
|
2995
|
+
* emailTextField: Selector for the email text field in the member form.
|
|
2996
|
+
*
|
|
2997
|
+
* firstNameTextField: Selector for the first name text field in the member form.
|
|
2998
|
+
*
|
|
2999
|
+
* lastNameTextField: Selector for the last name text field in the member form.
|
|
3000
|
+
*
|
|
3001
|
+
* emailInput: Selector for the email input in the member form.
|
|
3002
|
+
*
|
|
3003
|
+
* emailErrorField: Selector for the email error field in the member form.
|
|
3004
|
+
*
|
|
3005
|
+
* cancelButton: Selector for the cancel button in the member form.
|
|
3006
|
+
*
|
|
3007
|
+
*/
|
|
1614
3008
|
declare const MEMBER_FORM_SELECTORS: {
|
|
1615
3009
|
emailTextField: string;
|
|
1616
3010
|
firstNameTextField: string;
|
|
@@ -1619,6 +3013,52 @@ declare const MEMBER_FORM_SELECTORS: {
|
|
|
1619
3013
|
emailErrorField: string;
|
|
1620
3014
|
cancelButton: string;
|
|
1621
3015
|
};
|
|
3016
|
+
/**
|
|
3017
|
+
*
|
|
3018
|
+
* Selectors for roles components.
|
|
3019
|
+
*
|
|
3020
|
+
* @example
|
|
3021
|
+
*
|
|
3022
|
+
* import {
|
|
3023
|
+
* ROLES_SELECTORS
|
|
3024
|
+
* } from "@bigbinary/neeto-playwright-commons";
|
|
3025
|
+
*
|
|
3026
|
+
* @endexample
|
|
3027
|
+
* newButton: Selector for the "New" button to add a new role.
|
|
3028
|
+
*
|
|
3029
|
+
* proceedButton: Selector for the "Proceed" button.
|
|
3030
|
+
*
|
|
3031
|
+
* cancelButton: Selector for the "Cancel" button.
|
|
3032
|
+
*
|
|
3033
|
+
* tableHeaderRoleName: Selector for the table header role name.
|
|
3034
|
+
*
|
|
3035
|
+
* nameTextField: Selector for the name text field when adding or updating a role.
|
|
3036
|
+
*
|
|
3037
|
+
* searchTextField: Selector for the search text field for roles.
|
|
3038
|
+
*
|
|
3039
|
+
* updateRolePaneHeading: Selector for the heading when updating a role.
|
|
3040
|
+
*
|
|
3041
|
+
* updateRoleCancelButton: Selector for the cancel button when updating a role.
|
|
3042
|
+
*
|
|
3043
|
+
* descriptionTextField: Selector for the description text field when adding or updating a role.
|
|
3044
|
+
*
|
|
3045
|
+
* permissionCategoryTitle: Selector for the title of the permission category.
|
|
3046
|
+
*
|
|
3047
|
+
* headerColumn: Selector for the header column of the roles table.
|
|
3048
|
+
*
|
|
3049
|
+
* dropDownIcon: Selector for the dropdown icon in the roles table header.
|
|
3050
|
+
*
|
|
3051
|
+
* tableHeaderRoleTitle: Selector for the title in the roles table header.
|
|
3052
|
+
*
|
|
3053
|
+
* permissionCheckbox: Selector for the permission checkbox.
|
|
3054
|
+
*
|
|
3055
|
+
* editRoleButton: Selector for the edit role button in the roles table.
|
|
3056
|
+
*
|
|
3057
|
+
* deleteRoleButton: Selector for the delete role button in the roles table.
|
|
3058
|
+
*
|
|
3059
|
+
* permissionCard: Selector for the permission card.
|
|
3060
|
+
*
|
|
3061
|
+
*/
|
|
1622
3062
|
declare const ROLES_SELECTORS: {
|
|
1623
3063
|
newButton: string;
|
|
1624
3064
|
proceedButton: string;
|
|
@@ -1639,19 +3079,39 @@ declare const ROLES_SELECTORS: {
|
|
|
1639
3079
|
permissionCard: string;
|
|
1640
3080
|
};
|
|
1641
3081
|
/**
|
|
1642
|
-
*
|
|
1643
|
-
* This constant contains the commonly used selectors for getting elements from
|
|
1644
|
-
*
|
|
1645
|
-
* signup page in neetoAuth.
|
|
1646
|
-
*
|
|
1647
|
-
* undefined
|
|
1648
3082
|
*
|
|
1649
3083
|
* @example
|
|
1650
3084
|
*
|
|
1651
3085
|
* import { SIGNUP_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
1652
|
-
*
|
|
1653
|
-
* cy.get(SIGNUP_SELECTORS.emailTextField).should("be.visible");
|
|
1654
3086
|
* @endexample
|
|
3087
|
+
* Selectors for signup components.
|
|
3088
|
+
*
|
|
3089
|
+
* emailTextField: Selector for the email text field in the signup form.
|
|
3090
|
+
*
|
|
3091
|
+
* firstNameTextField: Selector for the first name text field in the signup form.
|
|
3092
|
+
*
|
|
3093
|
+
* lastNameTextField: Selector for the last name text field in the signup form.
|
|
3094
|
+
*
|
|
3095
|
+
* organizationNameTextField: Selector for the organization name text field in the signup form.
|
|
3096
|
+
*
|
|
3097
|
+
* organizationSubmitButton: Selector for the organization submit button in the signup form.
|
|
3098
|
+
*
|
|
3099
|
+
* otpTextBox: Selector for the OTP input text box in the signup form.
|
|
3100
|
+
*
|
|
3101
|
+
* profileSubmitButton: Selector for the profile submit button in the signup form.
|
|
3102
|
+
*
|
|
3103
|
+
* signupViaEmailButton: Selector for the signup via email button.
|
|
3104
|
+
*
|
|
3105
|
+
* submitButton: Selector for the submit button in the signup form.
|
|
3106
|
+
*
|
|
3107
|
+
* subdomainNameTextField: Selector for the subdomain name text field in the signup form.
|
|
3108
|
+
*
|
|
3109
|
+
* subdomainError: Selector for the subdomain input error message in the signup form.
|
|
3110
|
+
*
|
|
3111
|
+
* tryFreeButton: Selector for the "Try Free" button.
|
|
3112
|
+
*
|
|
3113
|
+
* unregisterdEmailError: Selector for the error message when using an unregistered email in the signup form.
|
|
3114
|
+
*
|
|
1655
3115
|
*/
|
|
1656
3116
|
declare const SIGNUP_SELECTORS: {
|
|
1657
3117
|
emailTextField: string;
|
|
@@ -1668,6 +3128,31 @@ declare const SIGNUP_SELECTORS: {
|
|
|
1668
3128
|
tryFreeButton: string;
|
|
1669
3129
|
unregisterdEmailError: string;
|
|
1670
3130
|
};
|
|
3131
|
+
/**
|
|
3132
|
+
*
|
|
3133
|
+
* Selectors for tags components.
|
|
3134
|
+
*
|
|
3135
|
+
* @example
|
|
3136
|
+
*
|
|
3137
|
+
* import { TAGS_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3138
|
+
* @endexample
|
|
3139
|
+
* newTagButton: Selector for the "New Tag" button.
|
|
3140
|
+
*
|
|
3141
|
+
* tagNameTextField: Selector for the tag name text field.
|
|
3142
|
+
*
|
|
3143
|
+
* editButton: Selector for the edit button for tags.
|
|
3144
|
+
*
|
|
3145
|
+
* deleteButton: Selector for the delete button for tags.
|
|
3146
|
+
*
|
|
3147
|
+
* cancelButton: Selector for the cancel button when managing tags.
|
|
3148
|
+
*
|
|
3149
|
+
* submitButton: Selector for the submit button when managing tags.
|
|
3150
|
+
*
|
|
3151
|
+
* searchTextField: Selector for the search text field for tags.
|
|
3152
|
+
*
|
|
3153
|
+
* descriptionTextArea: Selector for the description text area for tags.
|
|
3154
|
+
*
|
|
3155
|
+
*/
|
|
1671
3156
|
declare const TAGS_SELECTORS: {
|
|
1672
3157
|
newTagButton: string;
|
|
1673
3158
|
tagNameTextField: string;
|
|
@@ -1678,6 +3163,33 @@ declare const TAGS_SELECTORS: {
|
|
|
1678
3163
|
searchTextField: string;
|
|
1679
3164
|
descriptionTextArea: string;
|
|
1680
3165
|
};
|
|
3166
|
+
/**
|
|
3167
|
+
*
|
|
3168
|
+
* Selectors for merging tags components.
|
|
3169
|
+
*
|
|
3170
|
+
* @example
|
|
3171
|
+
*
|
|
3172
|
+
* import { MERGE_TAGS_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3173
|
+
* @endexample
|
|
3174
|
+
* mergeTagsButton: Selector for the "Merge Tags" button.
|
|
3175
|
+
*
|
|
3176
|
+
* mergeButton: Selector for the merge button.
|
|
3177
|
+
*
|
|
3178
|
+
* sourceSearchTextField: Selector for the search text field in the source tags section.
|
|
3179
|
+
*
|
|
3180
|
+
* sourceTagsList: Selector for the list of source tags.
|
|
3181
|
+
*
|
|
3182
|
+
* destinationTagsList: Selector for the list of destination tags.
|
|
3183
|
+
*
|
|
3184
|
+
* destinationSearchTextField: Selector for the search text field in the destination tags section.
|
|
3185
|
+
*
|
|
3186
|
+
* cancelButton: Selector for the cancel button when merging tags.
|
|
3187
|
+
*
|
|
3188
|
+
* proceedButton: Selector for the proceed button when merging tags.
|
|
3189
|
+
*
|
|
3190
|
+
* disabledTag: Selector for disabled tags.
|
|
3191
|
+
*
|
|
3192
|
+
*/
|
|
1681
3193
|
declare const MERGE_TAGS_SELECTORS: {
|
|
1682
3194
|
mergeTagsButton: string;
|
|
1683
3195
|
mergeButton: string;
|
|
@@ -1689,6 +3201,29 @@ declare const MERGE_TAGS_SELECTORS: {
|
|
|
1689
3201
|
proceedButton: string;
|
|
1690
3202
|
disabledTag: string;
|
|
1691
3203
|
};
|
|
3204
|
+
/**
|
|
3205
|
+
*
|
|
3206
|
+
* Selectors for the chat widget components.
|
|
3207
|
+
*
|
|
3208
|
+
* @example
|
|
3209
|
+
*
|
|
3210
|
+
* import { CHAT_WIDGET_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3211
|
+
* @endexample
|
|
3212
|
+
* iframe: Selector for the chat widget iframe.
|
|
3213
|
+
*
|
|
3214
|
+
* spinner: Selector for the spinner in the chat widget.
|
|
3215
|
+
*
|
|
3216
|
+
* helpButton: Selector for the help button in the chat widget.
|
|
3217
|
+
*
|
|
3218
|
+
* preChatEmailInput: Selector for the email input in the pre-chat section of the chat widget.
|
|
3219
|
+
*
|
|
3220
|
+
* preChatSubmitButton: Selector for the submit button in the pre-chat section of the chat widget.
|
|
3221
|
+
*
|
|
3222
|
+
* chatBubble: Selector for the chat message bubble in the chat widget.
|
|
3223
|
+
*
|
|
3224
|
+
* closeChat: Selector for the close button in the chat widget.
|
|
3225
|
+
*
|
|
3226
|
+
*/
|
|
1692
3227
|
declare const CHAT_WIDGET_SELECTORS: {
|
|
1693
3228
|
iframe: string;
|
|
1694
3229
|
spinner: string;
|
|
@@ -1698,16 +3233,69 @@ declare const CHAT_WIDGET_SELECTORS: {
|
|
|
1698
3233
|
chatBubble: string;
|
|
1699
3234
|
closeChat: string;
|
|
1700
3235
|
};
|
|
3236
|
+
/**
|
|
3237
|
+
*
|
|
3238
|
+
* @example
|
|
3239
|
+
*
|
|
3240
|
+
* import { CHANGELOG_WIDGET_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3241
|
+
* @endexample
|
|
3242
|
+
* Selectors for the changelog widget components.
|
|
3243
|
+
*
|
|
3244
|
+
* changelogWrapper: Selector for the wrapper of the changelog widget.
|
|
3245
|
+
*
|
|
3246
|
+
* closeButton: Selector for the close button in the changelog widget.
|
|
3247
|
+
*
|
|
3248
|
+
* publicUrlLink: Selector for the public URL link in the changelog widget.
|
|
3249
|
+
*
|
|
3250
|
+
*/
|
|
1701
3251
|
declare const CHANGELOG_WIDGET_SELECTORS: {
|
|
1702
3252
|
changelogWrapper: string;
|
|
1703
3253
|
closeButton: string;
|
|
1704
3254
|
publicUrlLink: string;
|
|
1705
3255
|
};
|
|
3256
|
+
/**
|
|
3257
|
+
*
|
|
3258
|
+
* Selectors for the keyboard shortcuts pane components.
|
|
3259
|
+
*
|
|
3260
|
+
* @example
|
|
3261
|
+
*
|
|
3262
|
+
* import { KEYBOARD_SHORTCUTS_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3263
|
+
* @endexample
|
|
3264
|
+
* keyboardShortcutsPane: Selector for the keyboard shortcuts pane.
|
|
3265
|
+
*
|
|
3266
|
+
* closePaneButton: Selector for the close button in the keyboard shortcuts pane.
|
|
3267
|
+
*
|
|
3268
|
+
* hotKeyItem: Selector for the hotkey item in the keyboard shortcuts pane.
|
|
3269
|
+
*
|
|
3270
|
+
*/
|
|
1706
3271
|
declare const KEYBOARD_SHORTCUTS_SELECTORS: {
|
|
1707
3272
|
keyboardShortcutsPane: string;
|
|
1708
3273
|
closePaneButton: string;
|
|
1709
3274
|
hotKeyItem: string;
|
|
1710
3275
|
};
|
|
3276
|
+
/**
|
|
3277
|
+
*
|
|
3278
|
+
* Selectors for profile section components.
|
|
3279
|
+
*
|
|
3280
|
+
* @example
|
|
3281
|
+
*
|
|
3282
|
+
* import { PROFILE_SECTION_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3283
|
+
* @endexample
|
|
3284
|
+
* profileSectionButton: Selector for the profile section button.
|
|
3285
|
+
*
|
|
3286
|
+
* profilePopup: Selector for the profile popup.
|
|
3287
|
+
*
|
|
3288
|
+
* myProfileButton: Selector for the "My Profile" button.
|
|
3289
|
+
*
|
|
3290
|
+
* profileOrganizationSettingsButton: Selector for the profile organization settings button.
|
|
3291
|
+
*
|
|
3292
|
+
* logoutButton: Selector for the logout button.
|
|
3293
|
+
*
|
|
3294
|
+
* neetoAuthLink: Selector for the Neeto authentication link button.
|
|
3295
|
+
*
|
|
3296
|
+
* profileSidebarCancelButton: Selector for the profile sidebar cancel button.
|
|
3297
|
+
*
|
|
3298
|
+
*/
|
|
1711
3299
|
declare const PROFILE_SECTION_SELECTORS: {
|
|
1712
3300
|
profileSectionButton: string;
|
|
1713
3301
|
profilePopup: string;
|
|
@@ -1717,6 +3305,43 @@ declare const PROFILE_SECTION_SELECTORS: {
|
|
|
1717
3305
|
neetoAuthLink: string;
|
|
1718
3306
|
profileSidebarCancelButton: string;
|
|
1719
3307
|
};
|
|
3308
|
+
/**
|
|
3309
|
+
*
|
|
3310
|
+
* Selectors for Slack components.
|
|
3311
|
+
*
|
|
3312
|
+
* @example
|
|
3313
|
+
*
|
|
3314
|
+
* import { SLACK_SELECTORS} from "@bigbinary/neeto-playwright-commons";
|
|
3315
|
+
* @endexample
|
|
3316
|
+
* messageContainer: Selector for the message container.
|
|
3317
|
+
*
|
|
3318
|
+
* loginEmail: Selector for the login email input.
|
|
3319
|
+
*
|
|
3320
|
+
* loginPassword: Selector for the login password input.
|
|
3321
|
+
*
|
|
3322
|
+
* signInButton: Selector for the sign-in button.
|
|
3323
|
+
*
|
|
3324
|
+
* teamPicketButtonContent: Selector for the team picker button content.
|
|
3325
|
+
*
|
|
3326
|
+
* redirectOpenInBrowser: Selector for the redirect "open in browser" button.
|
|
3327
|
+
*
|
|
3328
|
+
* workspaceActionsButton: Selector for the workspace actions button.
|
|
3329
|
+
*
|
|
3330
|
+
* teamMenuTrigger: Selector for the team menu trigger.
|
|
3331
|
+
*
|
|
3332
|
+
* menuItemButton: Selector for the menu item button.
|
|
3333
|
+
*
|
|
3334
|
+
* threadsFlexpane: Selector for the threads flexpane.
|
|
3335
|
+
*
|
|
3336
|
+
* replyBar: Selector for the reply bar.
|
|
3337
|
+
*
|
|
3338
|
+
* markdownElement: Selector for the markdown element.
|
|
3339
|
+
*
|
|
3340
|
+
* virtualListItem: Selector for the virtual list item.
|
|
3341
|
+
*
|
|
3342
|
+
* channelItems: Selector for channel items.
|
|
3343
|
+
*
|
|
3344
|
+
*/
|
|
1720
3345
|
declare const SLACK_SELECTORS: {
|
|
1721
3346
|
messageContainer: string;
|
|
1722
3347
|
loginEmail: string;
|
|
@@ -1733,6 +3358,39 @@ declare const SLACK_SELECTORS: {
|
|
|
1733
3358
|
virtualListItem: string;
|
|
1734
3359
|
channelItems: string;
|
|
1735
3360
|
};
|
|
3361
|
+
/**
|
|
3362
|
+
*
|
|
3363
|
+
* Selectors for Slack components using 'data-qa' attributes.
|
|
3364
|
+
*
|
|
3365
|
+
* @example
|
|
3366
|
+
*
|
|
3367
|
+
* import { SLACK_DATA_QA_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3368
|
+
* @endexample
|
|
3369
|
+
* sectionHeadingButton: Selector for the section heading button.
|
|
3370
|
+
*
|
|
3371
|
+
* channelSectionSubmenuCreate: Selector for the channel section submenu create button.
|
|
3372
|
+
*
|
|
3373
|
+
* channelSectionMenuCreateChannel: Selector for the channel section menu create channel button.
|
|
3374
|
+
*
|
|
3375
|
+
* skModalContent: Selector for the modal content.
|
|
3376
|
+
*
|
|
3377
|
+
* infiniteSpinner: Selector for the infinite spinner.
|
|
3378
|
+
*
|
|
3379
|
+
* channelNameOptionsList: Selector for the channel name options list.
|
|
3380
|
+
*
|
|
3381
|
+
* channelNameInput: Selector for the channel name input.
|
|
3382
|
+
*
|
|
3383
|
+
* createChannelNextButton: Selector for the create channel next button.
|
|
3384
|
+
*
|
|
3385
|
+
* inviteToWorkspaceSkipButton: Selector for the invite to workspace skip button.
|
|
3386
|
+
*
|
|
3387
|
+
* menuItems: Selector for the menu items.
|
|
3388
|
+
*
|
|
3389
|
+
* channelDetailsModal: Selector for the channel details modal.
|
|
3390
|
+
*
|
|
3391
|
+
* channelDetailsSettingsTab: Selector for the channel details settings tab.
|
|
3392
|
+
*
|
|
3393
|
+
*/
|
|
1736
3394
|
declare const SLACK_DATA_QA_SELECTORS: {
|
|
1737
3395
|
sectionHeadingButton: string;
|
|
1738
3396
|
channelSectionSubmenuCreate: string;
|
|
@@ -1747,6 +3405,25 @@ declare const SLACK_DATA_QA_SELECTORS: {
|
|
|
1747
3405
|
channelDetailsModal: string;
|
|
1748
3406
|
channelDetailsSettingsTab: string;
|
|
1749
3407
|
};
|
|
3408
|
+
/**
|
|
3409
|
+
*
|
|
3410
|
+
* Selectors for integration components.
|
|
3411
|
+
*
|
|
3412
|
+
* @example
|
|
3413
|
+
*
|
|
3414
|
+
* import { INTEGRATION_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3415
|
+
* @endexample
|
|
3416
|
+
* integrationCard(integration: string): Method that generates a selector for the integration card based on the integration name. Accepts a string parameter representing the integration name.
|
|
3417
|
+
*
|
|
3418
|
+
* connectButton: Selector for the connect button.
|
|
3419
|
+
*
|
|
3420
|
+
* integrationStatusTag: Selector for the integration status tag.
|
|
3421
|
+
*
|
|
3422
|
+
* disconnectButton: Selector for the disconnect button.
|
|
3423
|
+
*
|
|
3424
|
+
* manageButton: Selector for the manage button.
|
|
3425
|
+
*
|
|
3426
|
+
*/
|
|
1750
3427
|
declare const INTEGRATION_SELECTORS: {
|
|
1751
3428
|
integrationCard: (integration: string) => string;
|
|
1752
3429
|
connectButton: string;
|
|
@@ -1754,6 +3431,47 @@ declare const INTEGRATION_SELECTORS: {
|
|
|
1754
3431
|
disconnectButton: string;
|
|
1755
3432
|
manageButton: string;
|
|
1756
3433
|
};
|
|
3434
|
+
/**
|
|
3435
|
+
*
|
|
3436
|
+
* Selectors for Zapier components.
|
|
3437
|
+
*
|
|
3438
|
+
* @example
|
|
3439
|
+
*
|
|
3440
|
+
* import { ZAPIER_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3441
|
+
* @endexample
|
|
3442
|
+
* zapTriggerStep(zapId: string): Method that generates a selector for the Zap trigger step based on the Zap ID. Accepts a string parameter representing the Zap ID.
|
|
3443
|
+
*
|
|
3444
|
+
* zapAccountSubstep: Selector for the Zap account substep.
|
|
3445
|
+
*
|
|
3446
|
+
* zapOpenSubstepContainer: Selector for the container to open substeps.
|
|
3447
|
+
*
|
|
3448
|
+
* modal: Selector for modals.
|
|
3449
|
+
*
|
|
3450
|
+
* fmPrettytext: Selector for pretty text.
|
|
3451
|
+
*
|
|
3452
|
+
* spinner: Selector for spinners.
|
|
3453
|
+
*
|
|
3454
|
+
* skeletonBlock: Selector for skeleton blocks.
|
|
3455
|
+
*
|
|
3456
|
+
* accountsLoader: Selector for accounts loader.
|
|
3457
|
+
*
|
|
3458
|
+
* floatingBox: Selector for floating boxes.
|
|
3459
|
+
*
|
|
3460
|
+
* connection: Selector for connections.
|
|
3461
|
+
*
|
|
3462
|
+
* deleteConnectionModal: Selector for the delete connection modal.
|
|
3463
|
+
*
|
|
3464
|
+
* deleteConnectionDropdownButton: Selector for the dropdown button to delete a connection.
|
|
3465
|
+
*
|
|
3466
|
+
* usageAmounts: Selector for usage amounts.
|
|
3467
|
+
*
|
|
3468
|
+
* universalSidebar: Selector for the universal sidebar.
|
|
3469
|
+
*
|
|
3470
|
+
* sidebarFooter: Selector for the sidebar footer.
|
|
3471
|
+
*
|
|
3472
|
+
* contextualSideBar: Selector for the contextual sidebar.
|
|
3473
|
+
*
|
|
3474
|
+
*/
|
|
1757
3475
|
declare const ZAPIER_SELECTORS: {
|
|
1758
3476
|
zapTriggerStep: (zapId: string) => string;
|
|
1759
3477
|
zapAccountSubstep: string;
|
|
@@ -1772,6 +3490,55 @@ declare const ZAPIER_SELECTORS: {
|
|
|
1772
3490
|
sidebarFooter: string;
|
|
1773
3491
|
contextualSideBar: string;
|
|
1774
3492
|
};
|
|
3493
|
+
/**
|
|
3494
|
+
*
|
|
3495
|
+
* Selectors for embed components.
|
|
3496
|
+
*
|
|
3497
|
+
* @example
|
|
3498
|
+
*
|
|
3499
|
+
* import { EMBED_SELECTORS } from "@bigbinary/neeto-playwright-commons";
|
|
3500
|
+
* @endexample
|
|
3501
|
+
* iframe(appName: string): Method that generates a selector for the iframe based on the app name.
|
|
3502
|
+
*
|
|
3503
|
+
* modal(appName: string): Method that generates a selector for the modal based on the app name.
|
|
3504
|
+
*
|
|
3505
|
+
* close(appName: string): Method that generates a selector for the close button based on the app name.
|
|
3506
|
+
*
|
|
3507
|
+
* loader(appName: string): Method that generates a selector for the loader based on the app name.
|
|
3508
|
+
*
|
|
3509
|
+
* inlineHeightInput: Selector for the inline height input field.
|
|
3510
|
+
*
|
|
3511
|
+
* inlineWidthInput: Selector for the inline width input field.
|
|
3512
|
+
*
|
|
3513
|
+
* inlineElementIdInput: Selector for the inline element ID input field.
|
|
3514
|
+
*
|
|
3515
|
+
* codeBlock: Selector for the code block.
|
|
3516
|
+
*
|
|
3517
|
+
* previewTab: Selector for the preview tab.
|
|
3518
|
+
*
|
|
3519
|
+
* htmlTab: Selector for the HTML tab.
|
|
3520
|
+
*
|
|
3521
|
+
* buttonTextInput: Selector for the button text input field.
|
|
3522
|
+
*
|
|
3523
|
+
* buttonPositionSelectContainer: Selector for the button position select container.
|
|
3524
|
+
*
|
|
3525
|
+
* buttonPositionSelectMenu: Selector for the button position select menu.
|
|
3526
|
+
*
|
|
3527
|
+
* buttonColorLabel: Selector for the button color label.
|
|
3528
|
+
*
|
|
3529
|
+
* buttonTextColorLabel: Selector for the button text color label.
|
|
3530
|
+
*
|
|
3531
|
+
* colorPickerTarget: Selector for the color picker target.
|
|
3532
|
+
*
|
|
3533
|
+
* colorpickerEditableInput: Selector for the color picker editable input.
|
|
3534
|
+
*
|
|
3535
|
+
* showIconCheckbox: Selector for the show icon checkbox.
|
|
3536
|
+
*
|
|
3537
|
+
* elementIdInput: Selector for the element ID input field.
|
|
3538
|
+
*
|
|
3539
|
+
* previewElementPopupButton: Selector for the preview element popup button.
|
|
3540
|
+
*
|
|
3541
|
+
*/
|
|
1775
3542
|
declare const EMBED_SELECTORS: {
|
|
1776
3543
|
iframe: (appName: string) => string;
|
|
1777
3544
|
modal: (appName: string) => string;
|
|
@@ -1821,10 +3588,22 @@ declare const NEETO_IMAGE_UPLOADER_SELECTORS: {
|
|
|
1821
3588
|
widthInputField: string;
|
|
1822
3589
|
heightInputField: string;
|
|
1823
3590
|
};
|
|
3591
|
+
/**
|
|
3592
|
+
*
|
|
3593
|
+
* newConversation: Text for initiating a new conversation.
|
|
3594
|
+
*
|
|
3595
|
+
* welcomeChatBubble: Text for the welcome message displayed in the chat bubble.
|
|
3596
|
+
*
|
|
3597
|
+
*/
|
|
1824
3598
|
declare const CHAT_WIDGET_TEXTS: {
|
|
1825
3599
|
newConversation: string;
|
|
1826
3600
|
welcomeChatBubble: string;
|
|
1827
3601
|
};
|
|
3602
|
+
/**
|
|
3603
|
+
*
|
|
3604
|
+
* agent: Text representing an agent.
|
|
3605
|
+
*
|
|
3606
|
+
*/
|
|
1828
3607
|
declare const MEMBER_TEXTS: {
|
|
1829
3608
|
agent: string;
|
|
1830
3609
|
admin: string;
|
|
@@ -1832,10 +3611,34 @@ declare const MEMBER_TEXTS: {
|
|
|
1832
3611
|
hide: string;
|
|
1833
3612
|
show: string;
|
|
1834
3613
|
};
|
|
3614
|
+
/**
|
|
3615
|
+
*
|
|
3616
|
+
* connectHeader(integration): Method to generate text for connecting an integration account.
|
|
3617
|
+
*
|
|
3618
|
+
* connectedHeader(integration): Method to generate text indicating a successful connection to an integration.
|
|
3619
|
+
*
|
|
3620
|
+
*/
|
|
1835
3621
|
declare const INTEGRATIONS_TEXTS: {
|
|
1836
3622
|
connectHeader: (integration: string) => string;
|
|
1837
3623
|
connectedHeader: (integration: string) => string;
|
|
1838
3624
|
};
|
|
3625
|
+
/**
|
|
3626
|
+
*
|
|
3627
|
+
* signOut: Text for signing out.
|
|
3628
|
+
*
|
|
3629
|
+
* allow: Text for allowing.
|
|
3630
|
+
*
|
|
3631
|
+
* loadingThread: Text indicating thread loading.
|
|
3632
|
+
*
|
|
3633
|
+
* name: Text for name.
|
|
3634
|
+
*
|
|
3635
|
+
* deleteThisChannel: Text for deleting a channel.
|
|
3636
|
+
*
|
|
3637
|
+
* permanentlyDeleteTheChannel: Text for confirming permanent deletion of a channel.
|
|
3638
|
+
*
|
|
3639
|
+
* deleteChannel: Text for deleting a channel.
|
|
3640
|
+
*
|
|
3641
|
+
*/
|
|
1839
3642
|
declare const SLACK_WEB_TEXTS: {
|
|
1840
3643
|
signOut: string;
|
|
1841
3644
|
allow: string;
|
|
@@ -1845,6 +3648,51 @@ declare const SLACK_WEB_TEXTS: {
|
|
|
1845
3648
|
permanentlyDeleteTheChannel: string;
|
|
1846
3649
|
deleteChannel: string;
|
|
1847
3650
|
};
|
|
3651
|
+
/**
|
|
3652
|
+
*
|
|
3653
|
+
* account: Text for account.
|
|
3654
|
+
*
|
|
3655
|
+
* email: Text for email.
|
|
3656
|
+
*
|
|
3657
|
+
* continue: Text for continue.
|
|
3658
|
+
*
|
|
3659
|
+
* statusLabel: Text for status label.
|
|
3660
|
+
*
|
|
3661
|
+
* editExistingDraft: Text for editing an existing draft.
|
|
3662
|
+
*
|
|
3663
|
+
* signInTo: Text for signing into Zapier.
|
|
3664
|
+
*
|
|
3665
|
+
* yesContinueTo: Text for confirming continuation to a specific destination.
|
|
3666
|
+
*
|
|
3667
|
+
* testTrigger: Text for testing a trigger.
|
|
3668
|
+
*
|
|
3669
|
+
* editStep: Text for editing a step.
|
|
3670
|
+
*
|
|
3671
|
+
* continueWithSelectedRecord: Text for continuing with a selected record.
|
|
3672
|
+
*
|
|
3673
|
+
* publish: Text for publishing.
|
|
3674
|
+
*
|
|
3675
|
+
* delete: Text for deleting.
|
|
3676
|
+
*
|
|
3677
|
+
* loading: Text indicating loading.
|
|
3678
|
+
*
|
|
3679
|
+
* subdomain: Text for subdomain.
|
|
3680
|
+
*
|
|
3681
|
+
* apiKey: Text for API key.
|
|
3682
|
+
*
|
|
3683
|
+
* publishingZapHeading: Text heading for preparing Zap to go live.
|
|
3684
|
+
*
|
|
3685
|
+
* connectionListMenu: Text for connection list item menu.
|
|
3686
|
+
*
|
|
3687
|
+
* usageRegExp: Text for usage reset information.
|
|
3688
|
+
*
|
|
3689
|
+
* trialEndsRegExp: Text for trial end date.
|
|
3690
|
+
*
|
|
3691
|
+
* testCurrentlyInQueue: Text indicating test currently in queue.
|
|
3692
|
+
*
|
|
3693
|
+
* welcomeText(zapierLoginEmail): Method to generate welcome text for Zapier login.
|
|
3694
|
+
*
|
|
3695
|
+
*/
|
|
1848
3696
|
declare const ZAPIER_WEB_TEXTS: {
|
|
1849
3697
|
account: string;
|
|
1850
3698
|
email: string;
|
|
@@ -1869,9 +3717,19 @@ declare const ZAPIER_WEB_TEXTS: {
|
|
|
1869
3717
|
testCurrentlyInQueue: string;
|
|
1870
3718
|
welcomeText: (zapierLoginEmail: string) => string;
|
|
1871
3719
|
};
|
|
3720
|
+
/**
|
|
3721
|
+
*
|
|
3722
|
+
* zapierApiKeyGenerated: Message indicating successful generation of Zapier API key.
|
|
3723
|
+
*
|
|
3724
|
+
*/
|
|
1872
3725
|
declare const TOASTR_MESSAGES: {
|
|
1873
3726
|
zapierApiKeyGenerated: string;
|
|
1874
3727
|
};
|
|
3728
|
+
/**
|
|
3729
|
+
*
|
|
3730
|
+
* Text indicating that Zapier's free task limit is exhausted and the test will be aborted.
|
|
3731
|
+
*
|
|
3732
|
+
*/
|
|
1875
3733
|
declare const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
|
|
1876
3734
|
declare const EMOJI_PICKER_LABEL = "Smileys & People";
|
|
1877
3735
|
declare const ATTACHMENT_DELETION_TOASTR_MESSAGE = "Attachment has been successfully deleted.";
|
|
@@ -1916,7 +3774,7 @@ declare const LIST_MODIFIER_TAGS: {
|
|
|
1916
3774
|
*
|
|
1917
3775
|
* @example
|
|
1918
3776
|
*
|
|
1919
|
-
*
|
|
3777
|
+
* initializeCredentials("invoice");
|
|
1920
3778
|
* @endexample
|
|
1921
3779
|
*/
|
|
1922
3780
|
declare const initializeCredentials: (product: string) => void;
|
|
@@ -1938,43 +3796,152 @@ type UpdateCredentials = ({
|
|
|
1938
3796
|
type ClearCredentials = () => void;
|
|
1939
3797
|
type Hyphenize = (input: number | string) => string;
|
|
1940
3798
|
type JoinHyphenCase = (args: string) => string;
|
|
3799
|
+
/**
|
|
3800
|
+
*
|
|
3801
|
+
* Joins multiple strings with an optional separator. It takes the following parameters:
|
|
3802
|
+
*
|
|
3803
|
+
* string1: The first string to join.
|
|
3804
|
+
*
|
|
3805
|
+
* string2: The second string to join.
|
|
3806
|
+
*
|
|
3807
|
+
* string3 (optional): The third string to join.
|
|
3808
|
+
*
|
|
3809
|
+
* separator (optional): The separator to use between strings. Default is an empty string.
|
|
3810
|
+
*
|
|
3811
|
+
* @example
|
|
3812
|
+
*
|
|
3813
|
+
* const result = joinString("Open", "AI", "is", "-");
|
|
3814
|
+
* console.log(result); // Output: Open-AI-is
|
|
3815
|
+
* @endexample
|
|
3816
|
+
*/
|
|
1941
3817
|
declare const joinString: JoinString;
|
|
3818
|
+
/**
|
|
3819
|
+
*
|
|
3820
|
+
* Reads the contents of a JSON file synchronously if it exists, otherwise returns an empty object. It takes the following parameters:
|
|
3821
|
+
*
|
|
3822
|
+
* path (optional): The path of the file to read. Default is STORAGE_STATE.
|
|
3823
|
+
*
|
|
3824
|
+
* @example
|
|
3825
|
+
*
|
|
3826
|
+
* readFileSyncIfExists()
|
|
3827
|
+
* @endexample
|
|
3828
|
+
*/
|
|
1942
3829
|
declare const readFileSyncIfExists: ReadFileSyncIfExists;
|
|
3830
|
+
/**
|
|
3831
|
+
*
|
|
3832
|
+
* Returns the current logged in user info.
|
|
3833
|
+
*
|
|
3834
|
+
* @example
|
|
3835
|
+
*
|
|
3836
|
+
* const user = getGlobalUserState()
|
|
3837
|
+
* @endexample
|
|
3838
|
+
*/
|
|
1943
3839
|
declare const getGlobalUserState: () => Record<string, string>;
|
|
3840
|
+
/**
|
|
3841
|
+
*
|
|
3842
|
+
* Writes data to STORAGE_STATE file. It takes the following parameters:
|
|
3843
|
+
*
|
|
3844
|
+
* data: The data to write to the file.
|
|
3845
|
+
*
|
|
3846
|
+
* @example
|
|
3847
|
+
*
|
|
3848
|
+
* writeDataToFile("neeto")
|
|
3849
|
+
* @endexample
|
|
3850
|
+
*/
|
|
1944
3851
|
declare const writeDataToFile: WriteDataToFile;
|
|
1945
3852
|
/**
|
|
1946
3853
|
*
|
|
1947
|
-
*
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
3854
|
+
* Updates credentials with a new key-value pair in the STORAGE_STATE json file. It takes the following parameters:
|
|
3855
|
+
*
|
|
3856
|
+
* key: The key of the credential to update.
|
|
3857
|
+
*
|
|
3858
|
+
* value: The new value to assign to the credential.
|
|
3859
|
+
*
|
|
3860
|
+
* @example
|
|
3861
|
+
*
|
|
3862
|
+
* updateCredentials({
|
|
3863
|
+
* key:"name",
|
|
3864
|
+
* value:'oliver'
|
|
3865
|
+
* })
|
|
3866
|
+
* @endexample
|
|
3867
|
+
*/
|
|
3868
|
+
declare const updateCredentials: UpdateCredentials;
|
|
3869
|
+
/**
|
|
3870
|
+
*
|
|
3871
|
+
* Used to remove or delete all the credentials
|
|
1950
3872
|
*
|
|
1951
3873
|
* @example
|
|
1952
3874
|
*
|
|
1953
|
-
*
|
|
1954
|
-
* updateCredentials({
|
|
1955
|
-
* key: "subdomainName",
|
|
1956
|
-
* value: newOrganizationName,
|
|
1957
|
-
* });
|
|
3875
|
+
* removeCredentialFile()
|
|
1958
3876
|
* @endexample
|
|
1959
3877
|
*/
|
|
1960
|
-
declare const updateCredentials: UpdateCredentials;
|
|
1961
3878
|
declare const removeCredentialFile: ClearCredentials;
|
|
1962
3879
|
declare const clearCredentials: ClearCredentials;
|
|
3880
|
+
/**
|
|
3881
|
+
*
|
|
3882
|
+
* Used to hyphenize the strings. It takes the following parameters:
|
|
3883
|
+
*
|
|
3884
|
+
* input: The string that need to hyphenized.
|
|
3885
|
+
*
|
|
3886
|
+
* @example
|
|
3887
|
+
*
|
|
3888
|
+
* import {hyphenize} from "@bigbinary/neeto-playwright-commons"
|
|
3889
|
+
* const name = hyphenize("hello world")
|
|
3890
|
+
* console.log(name) // hello-world
|
|
3891
|
+
* @endexample
|
|
3892
|
+
*/
|
|
1963
3893
|
declare const hyphenize: Hyphenize;
|
|
3894
|
+
/**
|
|
3895
|
+
*
|
|
3896
|
+
* Joins multiple strings into a hyphen-separated lowercase string. It takes the following parameters:
|
|
3897
|
+
*
|
|
3898
|
+
* ...args (string[]): The strings to join.
|
|
3899
|
+
*
|
|
3900
|
+
* @example
|
|
3901
|
+
*
|
|
3902
|
+
* const result1 = joinHyphenCase("Hello", "World");
|
|
3903
|
+
* console.log(result1); // Output: hello-world
|
|
3904
|
+
* @endexample
|
|
3905
|
+
*/
|
|
1964
3906
|
declare const joinHyphenCase: JoinHyphenCase;
|
|
1965
3907
|
/**
|
|
1966
3908
|
*
|
|
1967
|
-
*
|
|
3909
|
+
* Provides functions to skip tests based on the environment.
|
|
3910
|
+
*
|
|
3911
|
+
* forDevelopmentEnv: Skips the test if the environment is development.
|
|
3912
|
+
*
|
|
3913
|
+
* forReviewEnv: Skips the test if the environment is review.
|
|
3914
|
+
*
|
|
3915
|
+
* forAllExceptStagingEnv: Skips the test if the environment is not staging.
|
|
3916
|
+
*
|
|
3917
|
+
* forNonNightlyRun: Skips the test if it's not a nightly run in the staging environment.
|
|
1968
3918
|
*
|
|
1969
|
-
*
|
|
3919
|
+
* ifNotWithinAllowedNightlyHours: Skips the test if it's not within the allowed nightly run hours.
|
|
3920
|
+
*
|
|
3921
|
+
* reason: The reason for skipping the test.
|
|
3922
|
+
*
|
|
3923
|
+
* allowedNightlyRunHours (optional): An array of numbers representing the allowed hours for nightly runs. Default is [0, 6, 12, 18].
|
|
1970
3924
|
*
|
|
1971
3925
|
* @example
|
|
1972
3926
|
*
|
|
1973
|
-
*
|
|
3927
|
+
* // Example usage forDevelopmentEnv:
|
|
3928
|
+
* skipTest.forDevelopmentEnv();
|
|
3929
|
+
*
|
|
3930
|
+
* // Example usage forReviewEnv:
|
|
3931
|
+
* skipTest.forReviewEnv();
|
|
3932
|
+
*
|
|
3933
|
+
* // Example usage forAllExceptStagingEnv:
|
|
3934
|
+
* skipTest.forAllExceptStagingEnv();
|
|
1974
3935
|
*
|
|
1975
|
-
*
|
|
1976
|
-
*
|
|
1977
|
-
*
|
|
3936
|
+
* // Example usage forNonNightlyRun:
|
|
3937
|
+
* skipTest.forNonNightlyRun();
|
|
3938
|
+
*
|
|
3939
|
+
*
|
|
3940
|
+
* // Example usage ifNotWithinAllowedNightlyHours:
|
|
3941
|
+
* skipTest.ifNotWithinAllowedNightlyHours({
|
|
3942
|
+
* reason: "outside allowed nightly run hours",
|
|
3943
|
+
* allowedNightlyRunHours: [0, 6, 12, 18]
|
|
3944
|
+
* })
|
|
1978
3945
|
* @endexample
|
|
1979
3946
|
*/
|
|
1980
3947
|
declare const skipTest: {
|
|
@@ -1990,20 +3957,119 @@ declare const skipTest: {
|
|
|
1990
3957
|
allowedNightlyRunHours?: number[] | undefined;
|
|
1991
3958
|
}) => void;
|
|
1992
3959
|
};
|
|
3960
|
+
/**
|
|
3961
|
+
*
|
|
3962
|
+
* Checks whether setup and teardown should be skipped.
|
|
3963
|
+
*
|
|
3964
|
+
* @example
|
|
3965
|
+
*
|
|
3966
|
+
* const shouldSkip = shouldSkipSetupAndTeardown()
|
|
3967
|
+
* @endexample
|
|
3968
|
+
*/
|
|
1993
3969
|
declare const shouldSkipSetupAndTeardown: () => boolean | "";
|
|
3970
|
+
/**
|
|
3971
|
+
*
|
|
3972
|
+
* Trims and replaces multiple whitespace characters in a string with a single space. It takes the following parameters:
|
|
3973
|
+
*
|
|
3974
|
+
* text: The text that need to be squished.
|
|
3975
|
+
*
|
|
3976
|
+
* @example
|
|
3977
|
+
*
|
|
3978
|
+
* const textWithExtraSpaces = " Hello world ";
|
|
3979
|
+
* const squishedText = squish(textWithExtraSpaces);
|
|
3980
|
+
*
|
|
3981
|
+
* console.log(squishedText); // Output will be "Hello world"
|
|
3982
|
+
* @endexample
|
|
3983
|
+
*/
|
|
1994
3984
|
declare const squish: (text: string) => string;
|
|
3985
|
+
/**
|
|
3986
|
+
*
|
|
3987
|
+
* Converts a string to camel case. It takes the following parameters:
|
|
3988
|
+
*
|
|
3989
|
+
* text: The text that need to be converted to camel case.
|
|
3990
|
+
*
|
|
3991
|
+
* @example
|
|
3992
|
+
*
|
|
3993
|
+
* const inputString = "hello_world";
|
|
3994
|
+
* const camelCaseString = toCamelCase(inputString);
|
|
3995
|
+
*
|
|
3996
|
+
* console.log(camelCaseString); // Output will be "helloWorld"
|
|
3997
|
+
* @endexample
|
|
3998
|
+
*/
|
|
1995
3999
|
declare const toCamelCase: (string: string) => string;
|
|
4000
|
+
/**
|
|
4001
|
+
*
|
|
4002
|
+
* Creates a function to locate elements by the data-qa attribute on a page.
|
|
4003
|
+
*
|
|
4004
|
+
* @example
|
|
4005
|
+
*
|
|
4006
|
+
* // Using getByDataQA to find an element with a single data-qa attribute
|
|
4007
|
+
* getByDataQA(page, 'some_data_qa_value');
|
|
4008
|
+
*
|
|
4009
|
+
*
|
|
4010
|
+
* // Using getByDataQA to find a nested element with two data-qa attributes
|
|
4011
|
+
* const findElementByNestedDataQA = getByDataQA(page, ['parent_data_qa_value', 'child_data_qa_value']);
|
|
4012
|
+
*
|
|
4013
|
+
* // Now you can use the located elements as needed
|
|
4014
|
+
* await findElementBySingleDataQA.click();
|
|
4015
|
+
* await findElementByNestedDataQA.hover();
|
|
4016
|
+
* @endexample
|
|
4017
|
+
*/
|
|
1996
4018
|
declare const getByDataQA: ts_toolbelt_out_Function_Curry.Curry<(page: Page, dataQa: string | [string, string]) => playwright_core.Locator>;
|
|
1997
4019
|
interface LoginProps {
|
|
1998
4020
|
page: Page;
|
|
1999
4021
|
neetoPlaywrightUtilities: CustomCommands;
|
|
2000
4022
|
loginPath?: string;
|
|
2001
4023
|
}
|
|
4024
|
+
/**
|
|
4025
|
+
*
|
|
4026
|
+
* Used to login by using email and password. It takes the following parameters:
|
|
4027
|
+
*
|
|
4028
|
+
* loginPath (optional): The path to which the user should be redirected for login.
|
|
4029
|
+
*
|
|
4030
|
+
* page: A page object
|
|
4031
|
+
*
|
|
4032
|
+
* neetoPlaywrightUtilities: An object of type NeetoPlaywrightUtilities
|
|
4033
|
+
*
|
|
4034
|
+
* @example
|
|
4035
|
+
*
|
|
4036
|
+
* import { loginWithoutSSO } from "@bigbinary/neeto-playwright-commons"
|
|
4037
|
+
*
|
|
4038
|
+
* await loginWithoutSSO({
|
|
4039
|
+
* page,
|
|
4040
|
+
* neetoPlaywrightUtilities,
|
|
4041
|
+
* loginPath:"/home"
|
|
4042
|
+
* })
|
|
4043
|
+
* @endexample
|
|
4044
|
+
*/
|
|
2002
4045
|
declare const loginWithoutSSO: ({
|
|
2003
4046
|
page,
|
|
2004
4047
|
neetoPlaywrightUtilities,
|
|
2005
4048
|
loginPath
|
|
2006
4049
|
}: LoginProps) => Promise<void>;
|
|
4050
|
+
/**
|
|
4051
|
+
*
|
|
4052
|
+
* Used to Login to App
|
|
4053
|
+
*
|
|
4054
|
+
* Only works in staging environment. It takes the following parameters:
|
|
4055
|
+
*
|
|
4056
|
+
* loginPath (optional): The path to which the user should be redirected for login. Default is /
|
|
4057
|
+
*
|
|
4058
|
+
* page: A page object
|
|
4059
|
+
*
|
|
4060
|
+
* neetoPlaywrightUtilities: An object of type NeetoPlaywrightUtilities
|
|
4061
|
+
*
|
|
4062
|
+
* @example
|
|
4063
|
+
*
|
|
4064
|
+
* import { login } from "@bigbinary/neeto-playwright-commons"
|
|
4065
|
+
*
|
|
4066
|
+
* login({
|
|
4067
|
+
* page,
|
|
4068
|
+
* neetoPlaywrightUtilities,
|
|
4069
|
+
* loginPath:"/home"
|
|
4070
|
+
* })
|
|
4071
|
+
* @endexample
|
|
4072
|
+
*/
|
|
2007
4073
|
declare const login: ({
|
|
2008
4074
|
page,
|
|
2009
4075
|
neetoPlaywrightUtilities,
|
|
@@ -2015,16 +4081,23 @@ declare const login: ({
|
|
|
2015
4081
|
*
|
|
2016
4082
|
* neeto products.
|
|
2017
4083
|
*
|
|
2018
|
-
* Usage
|
|
2019
|
-
*
|
|
2020
4084
|
* @example
|
|
2021
4085
|
*
|
|
2022
|
-
*
|
|
4086
|
+
* import { generateRandomBypassEmail } from "@bigbinary/neeto-playwright-commons";
|
|
2023
4087
|
*
|
|
2024
|
-
*
|
|
4088
|
+
* const bypassEmail = generateRandomBypassEmail();
|
|
2025
4089
|
* @endexample
|
|
2026
4090
|
*/
|
|
2027
4091
|
declare const generateRandomBypassEmail: () => string;
|
|
4092
|
+
/**
|
|
4093
|
+
*
|
|
4094
|
+
* Used to extract subdomain from the error message.
|
|
4095
|
+
*
|
|
4096
|
+
* @example
|
|
4097
|
+
*
|
|
4098
|
+
* extractSubdomainFromError("https://wwww.bb.neetoChat.com") // bb
|
|
4099
|
+
* @endexample
|
|
4100
|
+
*/
|
|
2028
4101
|
declare const extractSubdomainFromError: (errorString: string) => string;
|
|
2029
4102
|
interface AddMemberProps {
|
|
2030
4103
|
email: string;
|
|
@@ -2047,12 +4120,84 @@ interface DeactiveMemberProps {
|
|
|
2047
4120
|
requestCount?: number;
|
|
2048
4121
|
}
|
|
2049
4122
|
declare const memberUtils: {
|
|
4123
|
+
/**
|
|
4124
|
+
*
|
|
4125
|
+
* Adds a member to the team via API request. It takes the following parameters:
|
|
4126
|
+
*
|
|
4127
|
+
* email: Email of the member to be added.
|
|
4128
|
+
*
|
|
4129
|
+
* role: Role of the member (default: "Agent").
|
|
4130
|
+
*
|
|
4131
|
+
* appName: Name of the application.
|
|
4132
|
+
*
|
|
4133
|
+
* neetoPlaywrightUtilities: Custom utility functions for API requests.
|
|
4134
|
+
*
|
|
4135
|
+
* requestCount (optional): Specify the number of requests.
|
|
4136
|
+
*
|
|
4137
|
+
* @example
|
|
4138
|
+
*
|
|
4139
|
+
* import { memberUtils } from "@bigbinary/neeto-playwright-commons";
|
|
4140
|
+
*
|
|
4141
|
+
* await memberUtils.addMemberViaRequest({
|
|
4142
|
+
* email: "example@example.com",
|
|
4143
|
+
* appName: "MyApp",
|
|
4144
|
+
* neetoPlaywrightUtilities: myCustomPlaywrightUtilities,
|
|
4145
|
+
* });
|
|
4146
|
+
*
|
|
4147
|
+
* // OR
|
|
4148
|
+
*
|
|
4149
|
+
* await memberUtils.addMemberViaRequest({
|
|
4150
|
+
* email: "example@example.com",
|
|
4151
|
+
* appName: "MyApp",
|
|
4152
|
+
* neetoPlaywrightUtilities: myCustomPlaywrightUtilities,
|
|
4153
|
+
* requestCount:10
|
|
4154
|
+
* });
|
|
4155
|
+
* @endexample
|
|
4156
|
+
*/
|
|
2050
4157
|
addMemberViaRequest: ({
|
|
2051
4158
|
email,
|
|
2052
4159
|
role,
|
|
2053
4160
|
appName,
|
|
2054
4161
|
neetoPlaywrightUtilities
|
|
2055
4162
|
}: AddMemberProps) => Promise<playwright_core.APIResponse | undefined>;
|
|
4163
|
+
/**
|
|
4164
|
+
*
|
|
4165
|
+
* Edits a member's details via API request. It takes the following parameters:
|
|
4166
|
+
*
|
|
4167
|
+
* email: Email of the member to be edited.
|
|
4168
|
+
*
|
|
4169
|
+
* firstName (optional): New first name of the member.
|
|
4170
|
+
*
|
|
4171
|
+
* lastName (optional): New last name of the member.
|
|
4172
|
+
*
|
|
4173
|
+
* newRole (optional): New role of the member.
|
|
4174
|
+
*
|
|
4175
|
+
* neetoPlaywrightUtilities: Custom utility functions for API requests.
|
|
4176
|
+
*
|
|
4177
|
+
* requestCount (optional): Specify the number of requests.
|
|
4178
|
+
*
|
|
4179
|
+
* @example
|
|
4180
|
+
*
|
|
4181
|
+
* import { memberUtils } from "@bigbinary/neeto-playwright-commons";
|
|
4182
|
+
*
|
|
4183
|
+
* await memberUtils.editMemberViaRequest({
|
|
4184
|
+
* email: "example@example.com",
|
|
4185
|
+
* firstName: "John",
|
|
4186
|
+
* lastName: "Doe",
|
|
4187
|
+
* newRole: "Admin",
|
|
4188
|
+
* neetoPlaywrightUtilities: myCustomPlaywrightUtilities,
|
|
4189
|
+
* });
|
|
4190
|
+
*
|
|
4191
|
+
* await memberUtils.editMemberViaRequest({
|
|
4192
|
+
* email: "example@example.com",
|
|
4193
|
+
* firstName: "John",
|
|
4194
|
+
* lastName: "Doe",
|
|
4195
|
+
* newRole: "Admin",
|
|
4196
|
+
* neetoPlaywrightUtilities: myCustomPlaywrightUtilities,
|
|
4197
|
+
* requestCount:10
|
|
4198
|
+
* })
|
|
4199
|
+
* @endexample
|
|
4200
|
+
*/
|
|
2056
4201
|
editMemberViaRequest: ({
|
|
2057
4202
|
email,
|
|
2058
4203
|
firstName,
|
|
@@ -2060,6 +4205,34 @@ declare const memberUtils: {
|
|
|
2060
4205
|
newRole,
|
|
2061
4206
|
neetoPlaywrightUtilities
|
|
2062
4207
|
}: EditMemberProps) => Promise<void>;
|
|
4208
|
+
/**
|
|
4209
|
+
*
|
|
4210
|
+
* Deactivates a member via API request. It takes the following parameters:
|
|
4211
|
+
*
|
|
4212
|
+
* email: Email of the member to be deactivated.
|
|
4213
|
+
*
|
|
4214
|
+
* neetoPlaywrightUtilities: Custom utility functions for API requests.
|
|
4215
|
+
*
|
|
4216
|
+
* requestCount (optional): Specify the number of requests.
|
|
4217
|
+
*
|
|
4218
|
+
* @example
|
|
4219
|
+
*
|
|
4220
|
+
* import { memberUtils } from "@bigbinary/neeto-playwright-commons";
|
|
4221
|
+
*
|
|
4222
|
+
* await memberUtils.deactivateMemberViaRequest({
|
|
4223
|
+
* email: "example@example.com",
|
|
4224
|
+
* neetoPlaywrightUtilities: myCustomPlaywrightUtilities,
|
|
4225
|
+
* });
|
|
4226
|
+
*
|
|
4227
|
+
* // OR
|
|
4228
|
+
*
|
|
4229
|
+
* await memberUtils.deactivateMemberViaRequest({
|
|
4230
|
+
* email: "example@example.com",
|
|
4231
|
+
* neetoPlaywrightUtilities: myCustomPlaywrightUtilities,
|
|
4232
|
+
* requestCount:2
|
|
4233
|
+
* });
|
|
4234
|
+
* @endexample
|
|
4235
|
+
*/
|
|
2063
4236
|
deactivateMemberViaRequest: ({
|
|
2064
4237
|
email,
|
|
2065
4238
|
neetoPlaywrightUtilities
|
|
@@ -2088,6 +4261,24 @@ interface ToggleColumnCheckboxAndVerifyVisibilityProps {
|
|
|
2088
4261
|
shouldBeChecked: boolean;
|
|
2089
4262
|
}
|
|
2090
4263
|
declare const tableUtils: {
|
|
4264
|
+
/**
|
|
4265
|
+
*
|
|
4266
|
+
* Used to check if columns exist in table or not. It takes the following parameters:
|
|
4267
|
+
*
|
|
4268
|
+
* page: A page object.
|
|
4269
|
+
*
|
|
4270
|
+
* columnNames: Array of column names to be checked.
|
|
4271
|
+
*
|
|
4272
|
+
* @example
|
|
4273
|
+
*
|
|
4274
|
+
* import { tableUtils } from "@bigbinary/neeto-playwright-commons"
|
|
4275
|
+
*
|
|
4276
|
+
* await tableUtils.verifyTableColumnsExistence({
|
|
4277
|
+
* page,
|
|
4278
|
+
* columnNames,
|
|
4279
|
+
* });
|
|
4280
|
+
* @endexample
|
|
4281
|
+
*/
|
|
2091
4282
|
verifyTableColumnsExistence: ({
|
|
2092
4283
|
page,
|
|
2093
4284
|
columnNames
|
|
@@ -2095,11 +4286,53 @@ declare const tableUtils: {
|
|
|
2095
4286
|
page: Page;
|
|
2096
4287
|
columnNames: string[];
|
|
2097
4288
|
}) => Promise<void>;
|
|
4289
|
+
/**
|
|
4290
|
+
*
|
|
4291
|
+
* Used to check if the provided column matches the given visibility option. It takes the following parameters:
|
|
4292
|
+
*
|
|
4293
|
+
* page: A page object.
|
|
4294
|
+
*
|
|
4295
|
+
* columnName: Name of the column.
|
|
4296
|
+
*
|
|
4297
|
+
* shouldBeVisible: Status of the column checkbox.
|
|
4298
|
+
*
|
|
4299
|
+
* @example
|
|
4300
|
+
*
|
|
4301
|
+
* import { tableUtils } from "@bigbinary/neeto-playwright-commons"
|
|
4302
|
+
*
|
|
4303
|
+
* await tableUtils.assertColumnHeaderVisibility({
|
|
4304
|
+
* page,
|
|
4305
|
+
* columnName,
|
|
4306
|
+
* shouldBeVisible :true,
|
|
4307
|
+
* });
|
|
4308
|
+
* @endexample
|
|
4309
|
+
*/
|
|
2098
4310
|
assertColumnHeaderVisibility: ({
|
|
2099
4311
|
page,
|
|
2100
4312
|
columnName,
|
|
2101
4313
|
shouldBeVisible
|
|
2102
4314
|
}: AssertColumnHeaderVisibilityProps) => Promise<void>;
|
|
4315
|
+
/**
|
|
4316
|
+
*
|
|
4317
|
+
* Used to toggle columns from the subheader's show/hide columns button. The columns are then verified in the table. It takes the following parameters:
|
|
4318
|
+
*
|
|
4319
|
+
* page: A page object.
|
|
4320
|
+
*
|
|
4321
|
+
* tableColumns: Array of column names to be toggled.
|
|
4322
|
+
*
|
|
4323
|
+
* shouldBeChecked : Status of the column checkbox.
|
|
4324
|
+
*
|
|
4325
|
+
* @example
|
|
4326
|
+
*
|
|
4327
|
+
* import { tableUtils } from "@bigbinary/neeto-playwright-commons"
|
|
4328
|
+
*
|
|
4329
|
+
* await tableUtils.toggleColumnCheckboxAndVerifyVisibility({
|
|
4330
|
+
* page,
|
|
4331
|
+
* tableColumns,
|
|
4332
|
+
* shouldBeChecked: false,
|
|
4333
|
+
* });
|
|
4334
|
+
* @endexample
|
|
4335
|
+
*/
|
|
2103
4336
|
toggleColumnCheckboxAndVerifyVisibility: ({
|
|
2104
4337
|
page,
|
|
2105
4338
|
tableColumns,
|
|
@@ -2115,12 +4348,78 @@ interface VerifyBreadcrumbProps {
|
|
|
2115
4348
|
titlesAndRoutes: BreadcrumbTitleAndRoute[];
|
|
2116
4349
|
}
|
|
2117
4350
|
declare const headerUtils: {
|
|
4351
|
+
/**
|
|
4352
|
+
*
|
|
4353
|
+
* Verifies the breadcrumbs in the header of a web page. It takes the following parameters:
|
|
4354
|
+
*
|
|
4355
|
+
* page: An instance of the Playwright Page class representing the web page where the breadcrumbs are located.
|
|
4356
|
+
*
|
|
4357
|
+
* titlesAndRoutes: An array of objects containing the titles and routes of the breadcrumbs to verify.
|
|
4358
|
+
*
|
|
4359
|
+
* @example
|
|
4360
|
+
*
|
|
4361
|
+
* import { Page } from "@playwright/test";
|
|
4362
|
+
* import { headerUtils } from "@bigbinary/neeto-playwright-commons";
|
|
4363
|
+
*
|
|
4364
|
+
* const breadcrumbs = [
|
|
4365
|
+
* { title: "Home", route: "/" },
|
|
4366
|
+
* { title: "Category", route: "/category" },
|
|
4367
|
+
* { title: "Subcategory", route: "/category/subcategory" }
|
|
4368
|
+
* ];
|
|
4369
|
+
*
|
|
4370
|
+
* await headerUtils.verifyBreadcrumbs({
|
|
4371
|
+
* page,
|
|
4372
|
+
* titlesAndRoutes: breadcrumbs
|
|
4373
|
+
* });
|
|
4374
|
+
* @endexample
|
|
4375
|
+
*/
|
|
2118
4376
|
verifyBreadcrumbs: ({
|
|
2119
4377
|
page,
|
|
2120
4378
|
titlesAndRoutes
|
|
2121
4379
|
}: VerifyBreadcrumbProps) => Promise<void>;
|
|
2122
4380
|
};
|
|
4381
|
+
/**
|
|
4382
|
+
*
|
|
4383
|
+
* Decodes a QR code from an image file and returns the decoded string.
|
|
4384
|
+
*
|
|
4385
|
+
* filePath: A string representing the path to the image file containing the QR code.
|
|
4386
|
+
*
|
|
4387
|
+
* Returns: A string representing the decoded content of the QR code, or undefined if decoding fails.
|
|
4388
|
+
*
|
|
4389
|
+
* @example
|
|
4390
|
+
*
|
|
4391
|
+
* import { decodeQRCodeFromFile } from "@bigbinary/neeto-playwright-commons";
|
|
4392
|
+
*
|
|
4393
|
+
* const filePath = "path/to/qrCodeImage.png";
|
|
4394
|
+
*
|
|
4395
|
+
* const decodedString = await decodeQRCodeFromFile(filePath);
|
|
4396
|
+
* @endexample
|
|
4397
|
+
*/
|
|
2123
4398
|
declare const decodeQRCodeFromFile: (filePath: string) => Promise<string | undefined>;
|
|
4399
|
+
/**
|
|
4400
|
+
*
|
|
4401
|
+
* Initializes TOTP authentication by creating a TOTP instance with the specified issuer and secret. It takes the following parameters:
|
|
4402
|
+
*
|
|
4403
|
+
* issuer: A string representing the issuer name for TOTP authentication.
|
|
4404
|
+
*
|
|
4405
|
+
* secret: A string or a Secret object representing the secret key for TOTP generation.
|
|
4406
|
+
*
|
|
4407
|
+
* Returns: A TOTP object initialized with the provided issuer, algorithm, digits, period, and secret.
|
|
4408
|
+
*
|
|
4409
|
+
* @example
|
|
4410
|
+
*
|
|
4411
|
+
* import { initializeTotp } from "@bigbinary/neeto-playwright-commons";
|
|
4412
|
+
*
|
|
4413
|
+
* // Initialize TOTP with issuer and secret
|
|
4414
|
+
* const issuer = "MyApp";
|
|
4415
|
+
* const secret = "my_secret_key";
|
|
4416
|
+
* const totp = initializeTotp({ issuer, secret });
|
|
4417
|
+
*
|
|
4418
|
+
* // Generate TOTP token
|
|
4419
|
+
* const token = totp.generate();
|
|
4420
|
+
* console.log("TOTP Token:", token);
|
|
4421
|
+
* @endexample
|
|
4422
|
+
*/
|
|
2124
4423
|
declare const initializeTotp: ({
|
|
2125
4424
|
issuer,
|
|
2126
4425
|
secret
|
|
@@ -2133,6 +4432,59 @@ type NetworkThrottlingUsingCdpParams = {
|
|
|
2133
4432
|
cdpSession: CDPSession;
|
|
2134
4433
|
emulateNetworkConditionsParameters?: EmulateNetworkConditionsParameters;
|
|
2135
4434
|
};
|
|
4435
|
+
/**
|
|
4436
|
+
*
|
|
4437
|
+
* Throttles network conditions using CDP. It takes the following parameters:
|
|
4438
|
+
*
|
|
4439
|
+
* cdpSession: A CDPSession instance for sending CDP commands.
|
|
4440
|
+
*
|
|
4441
|
+
* emulateNetworkConditionsParameters (optional): An object representing the network conditions to emulate. Default is "Fast 3G" conditions.
|
|
4442
|
+
*
|
|
4443
|
+
* Throttles CPU usage using CDP. It takes the following parameters:
|
|
4444
|
+
*
|
|
4445
|
+
* cdpSession: A CDPSession instance for sending CDP commands.
|
|
4446
|
+
*
|
|
4447
|
+
* rate (optional): A number representing the throttling rate as a slowdown factor. Default is 1.25.
|
|
4448
|
+
*
|
|
4449
|
+
* @example
|
|
4450
|
+
*
|
|
4451
|
+
* import { cpuThrottlingUsingCDP } from "@bigbinary/neeto-playwright-commons";
|
|
4452
|
+
*
|
|
4453
|
+
* cpuThrottlingUsingCDP({
|
|
4454
|
+
* cdpSession
|
|
4455
|
+
* })
|
|
4456
|
+
* @endexample
|
|
4457
|
+
* Executes code with throttled network and/or CPU resources. It takes the following parameters:
|
|
4458
|
+
*
|
|
4459
|
+
* code: A function representing the code to execute.
|
|
4460
|
+
*
|
|
4461
|
+
* kind (optional): A string specifying the type of throttling to apply. Can be "both" (default), "network", or "cpu".
|
|
4462
|
+
*
|
|
4463
|
+
* networkCondition (optional): An object representing the network conditions to emulate.
|
|
4464
|
+
*
|
|
4465
|
+
* cpuThrottlingRate (optional): A number representing the CPU throttling rate as a slowdown factor.
|
|
4466
|
+
*
|
|
4467
|
+
* cdpSession: A CDPSession instance for sending CDP commands.
|
|
4468
|
+
*
|
|
4469
|
+
* @example
|
|
4470
|
+
*
|
|
4471
|
+
* import { networkConditions } from "@constants/networkConditions";
|
|
4472
|
+
* import { executeWithThrottledResources } from "@bigbinary/neeto-playwright-commons";
|
|
4473
|
+
*
|
|
4474
|
+
* const emulateNetworkConditionsParameters = networkConditions["Fast 3G"];
|
|
4475
|
+
* const cpuThrottlingRate = 2;
|
|
4476
|
+
*
|
|
4477
|
+
* await executeWithThrottledResources({
|
|
4478
|
+
* code: async () => {
|
|
4479
|
+
* // Your code to emulate network and CPU throttling
|
|
4480
|
+
* },
|
|
4481
|
+
* kind: "both",
|
|
4482
|
+
* networkCondition: emulateNetworkConditionsParameters,
|
|
4483
|
+
* cpuThrottlingRate,
|
|
4484
|
+
* cdpSession, // Provide the CDPSession instance
|
|
4485
|
+
* });
|
|
4486
|
+
* @endexample
|
|
4487
|
+
*/
|
|
2136
4488
|
declare const networkThrottlingUsingCDP: ({
|
|
2137
4489
|
cdpSession,
|
|
2138
4490
|
emulateNetworkConditionsParameters
|
|
@@ -2163,10 +4515,52 @@ declare const executeWithThrottledResources: ({
|
|
|
2163
4515
|
*
|
|
2164
4516
|
* Function to generate a basic HTML content with the given body.
|
|
2165
4517
|
*
|
|
4518
|
+
* @example
|
|
4519
|
+
*
|
|
4520
|
+
* basicHTMLContent(`
|
|
4521
|
+
* <h1>Hello world</h1>
|
|
4522
|
+
* `)
|
|
4523
|
+
*
|
|
4524
|
+
* @endexample
|
|
2166
4525
|
*/
|
|
2167
4526
|
declare const basicHTMLContent: (content: string) => string;
|
|
4527
|
+
/**
|
|
4528
|
+
*
|
|
4529
|
+
* This function converts a hexadecimal color code to its RGB equivalent.
|
|
4530
|
+
*
|
|
4531
|
+
* hex: A string representing the hexadecimal color code to be converted to RGB.
|
|
4532
|
+
*
|
|
4533
|
+
* @example
|
|
4534
|
+
*
|
|
4535
|
+
* import { hexToRGB } from "@bigbinary/neeto-playwright-commons";
|
|
4536
|
+
*
|
|
4537
|
+
* // Convert hexadecimal color code to RGB
|
|
4538
|
+
* const rgbColor = hexToRGB("#ff0000");
|
|
4539
|
+
*
|
|
4540
|
+
* console.log(rgbColor); // Output: 'rgb(255, 0, 0)'
|
|
4541
|
+
*
|
|
4542
|
+
* // Convert another hexadecimal color code to RGB
|
|
4543
|
+
* const anotherRGBColor = hexToRGB("#00ff00");
|
|
4544
|
+
*
|
|
4545
|
+
* console.log(anotherRGBColor); // Output: 'rgb(0, 255, 0)'
|
|
4546
|
+
* @endexample
|
|
4547
|
+
*/
|
|
2168
4548
|
declare const hexToRGB: (hex: string) => string;
|
|
2169
4549
|
declare const filterUtils: {
|
|
4550
|
+
/**
|
|
4551
|
+
*
|
|
4552
|
+
* Opens the filter pane on page.
|
|
4553
|
+
*
|
|
4554
|
+
* page: An instance of the Playwright Page class representing the web page where the filter pane should be opened.
|
|
4555
|
+
*
|
|
4556
|
+
* @example
|
|
4557
|
+
*
|
|
4558
|
+
* import { Page } from "@playwright/test";
|
|
4559
|
+
* import { filterUtils } from "@bigbinary/neeto-playwright-commons";
|
|
4560
|
+
*
|
|
4561
|
+
* await filterUtils.openFilterPane(page);
|
|
4562
|
+
* @endexample
|
|
4563
|
+
*/
|
|
2170
4564
|
openFilterPane: (page: Page) => Promise<void>;
|
|
2171
4565
|
clearFiltersFromActionBlock: (page: Page) => Promise<void>;
|
|
2172
4566
|
};
|
|
@@ -2176,9 +4570,9 @@ declare const filterUtils: {
|
|
|
2176
4570
|
*
|
|
2177
4571
|
* @example
|
|
2178
4572
|
*
|
|
2179
|
-
*
|
|
4573
|
+
* import { getImagePathAndName } from "@bigbinary/neeto-playwright-commons";
|
|
2180
4574
|
*
|
|
2181
|
-
*
|
|
4575
|
+
* const { imagePath, imageName } = getImagePathAndName("../assets/images/image.png");
|
|
2182
4576
|
* @endexample
|
|
2183
4577
|
*/
|
|
2184
4578
|
declare const getImagePathAndName: (localImagePath: string) => {
|
|
@@ -2201,15 +4595,13 @@ interface Overrides {
|
|
|
2201
4595
|
*
|
|
2202
4596
|
* used to extend the default playwright configuration object in the host project.
|
|
2203
4597
|
*
|
|
2204
|
-
* Usage:
|
|
2205
|
-
*
|
|
2206
4598
|
* @example
|
|
2207
4599
|
*
|
|
2208
|
-
*
|
|
4600
|
+
* import { definePlaywrightConfig } from "@bigbinary/neeto-playwright-commons";
|
|
2209
4601
|
*
|
|
2210
|
-
*
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
4602
|
+
* export default definePlaywrightConfig({
|
|
4603
|
+
* currentsOverrides: { projectId: "******" },
|
|
4604
|
+
* });
|
|
2213
4605
|
* @endexample
|
|
2214
4606
|
*/
|
|
2215
4607
|
declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
|