@bigbinary/neeto-playwright-commons 1.8.48 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -8,25 +8,24 @@ import { Protocol } from 'playwright-core/types/protocol';
8
8
  import * as ts_toolbelt_out_Function_Curry from 'ts-toolbelt/out/Function/Curry';
9
9
  import * as playwright_core from 'playwright-core';
10
10
  import { Secret, TOTP } from 'otpauth';
11
-
12
11
  interface InterceptMultipleResponsesParams {
13
- responseUrl: string;
14
- times: number;
15
- baseUrl: string;
16
- customPageContext: Page | undefined;
17
- timeout: number;
18
- responseStatus: number;
12
+ responseUrl: string;
13
+ times: number;
14
+ baseUrl: string;
15
+ customPageContext: Page | undefined;
16
+ timeout: number;
17
+ responseStatus: number;
19
18
  }
20
19
  type GenericCallback = (...params: any[]) => Promise<unknown> | unknown;
21
20
  interface ExecuteRecursivelyParams {
22
- callback: GenericCallback;
23
- condition: GenericCallback;
24
- timeout: number;
21
+ callback: GenericCallback;
22
+ condition: GenericCallback;
23
+ timeout: number;
25
24
  }
26
25
  type ExecuteRecursively = (params: ExecuteRecursivelyParams) => Promise<void>;
27
26
  interface VerifySuccessToastParams {
28
- message: string;
29
- closeAfterVerification: boolean;
27
+ message: string;
28
+ closeAfterVerification: boolean;
30
29
  }
31
30
  type ConditionProps = Record<string, string>[];
32
31
  type FilterProps = Record<string, ConditionProps>;
@@ -35,881 +34,1158 @@ type BasicTypesInterface = Record<string, number | string | boolean>;
35
34
  type ParamProps = Record<string, number | string | boolean | ParamFilters>;
36
35
  type HttpMethods = "get" | "patch" | "post" | "put" | "delete";
37
36
  interface ApiRequestProps {
38
- url: string;
39
- failOnStatusCode?: boolean;
40
- headers?: BasicTypesInterface;
41
- data?: Record<string, unknown>;
42
- method?: HttpMethods;
43
- params?: ParamProps;
37
+ url: string;
38
+ failOnStatusCode?: boolean;
39
+ headers?: BasicTypesInterface;
40
+ data?: Record<string, unknown>;
41
+ method?: HttpMethods;
42
+ params?: ParamProps;
44
43
  }
45
44
  interface WaitForPageLoadParams {
46
- visiblityTimeout: number;
47
- retryTimeout: number;
48
- customPageContext: Page | undefined;
45
+ visiblityTimeout: number;
46
+ retryTimeout: number;
47
+ customPageContext: Page | undefined;
49
48
  }
50
49
  type ApiRequest = (props: ApiRequestProps & Record<string, unknown>) => Promise<APIResponse | undefined>;
51
50
  interface FieldValue {
52
- field: string;
53
- value: string;
51
+ field: string;
52
+ value: string;
54
53
  }
55
54
  type VerifyFieldValue = (values: FieldValue | FieldValue[]) => Promise<void> | Promise<void[]>;
56
55
  interface SelectOptionFromDropdownParams {
57
- selectValueContainer: string;
58
- selectMenu: string;
59
- value: string;
60
- options?: Partial<{
61
- visiblityTimeout: number;
62
- textAssertionTimeout: number;
63
- retryTimeout: number;
64
- }>;
56
+ selectValueContainer: string;
57
+ selectMenu: string;
58
+ value: string;
59
+ options?: Partial<{
60
+ visiblityTimeout: number;
61
+ textAssertionTimeout: number;
62
+ retryTimeout: number;
63
+ }>;
65
64
  }
66
65
  declare class CustomCommands {
67
- page: Page;
68
- responses: string[];
69
- request: APIRequestContext;
70
- baseURL: string | undefined;
71
- constructor(page: Page, request: APIRequestContext, baseURL?: string | undefined);
72
- interceptMultipleResponses: ({ responseUrl, responseStatus, times, baseUrl, customPageContext, timeout, }?: Partial<InterceptMultipleResponsesParams>) => Promise<Response[]>;
73
- private recursiveMethod;
74
- executeRecursively: ExecuteRecursively;
75
- verifySuccessToast: ({ message, closeAfterVerification, }?: Partial<VerifySuccessToastParams>) => Promise<void>;
76
- reloadAndWait: (requestCount: number, customPageContext?: Page, interceptMultipleResponsesProps?: Partial<Omit<InterceptMultipleResponsesParams, "times">>) => Promise<void>;
77
- waitForPageLoad: ({ visiblityTimeout, customPageContext, }: WaitForPageLoadParams) => Promise<void>;
78
- apiRequest: ApiRequest;
79
- selectOptionFromDropdown: ({ selectValueContainer, selectMenu, value, options, }: SelectOptionFromDropdownParams) => Promise<void>;
80
- verifyFieldValue: VerifyFieldValue;
66
+ page: Page;
67
+ responses: string[];
68
+ request: APIRequestContext;
69
+ baseURL: string | undefined;
70
+ constructor(page: Page, request: APIRequestContext, baseURL?: string | undefined);
71
+ /**
72
+ *
73
+ * Command to wait until a response with URL responseUrl is found. Optionally,
74
+ *
75
+ * provide a base URL if it differs from the home URL of the project's host.
76
+ *
77
+ * @example
78
+ *
79
+ * // wait for 3 responses
80
+ *
81
+ * neetoPlaywrightUtilities.interceptMultipleResponses({
82
+ * responseUrl: "/login",
83
+ * times: 3,
84
+ * baseURL: "https://app.neetoauth.net",
85
+ * });
86
+ * @endexample
87
+ */
88
+ interceptMultipleResponses: ({
89
+ responseUrl,
90
+ responseStatus,
91
+ times,
92
+ baseUrl,
93
+ customPageContext,
94
+ timeout
95
+ }?: Partial<InterceptMultipleResponsesParams>) => Promise<Response[]>;
96
+ /**
97
+ *
98
+ * Comand to check for a condition recursively until it's true, then execute a
99
+ *
100
+ * callback. This process will be repeated until the specified timeout.
101
+ *
102
+ * @example
103
+ *
104
+ * // checks if the URL contains /login for 5000 ms. If /login is found within this timeframe, the callback is executed.
105
+ *
106
+ * await neetoPlaywrightUtilities.executeRecursively({
107
+ * timeout: 5000,
108
+ * condition: () => this.page.url().match(/.*login/),
109
+ * callback: async () => {
110
+ * await expect("#locator").to.equal("Login");
111
+ * },
112
+ * });
113
+ * @endexample
114
+ */
115
+ private recursiveMethod;
116
+ executeRecursively: ExecuteRecursively;
117
+ /**
118
+ *
119
+ * Command to assert the toastr message or icon. Optionaly provide
120
+ *
121
+ * closeAfterVerification to close the toastr after verification.
122
+ *
123
+ * closeAfterVerification is set to true by default
124
+ *
125
+ * @example
126
+ *
127
+ * await neetoPlaywrightUtilities.verifySuccessToast({
128
+ * message: "Toastr message",
129
+ * closeAfterVerification: false,
130
+ * });
131
+ * @endexample
132
+ */
133
+ verifySuccessToast: ({
134
+ message,
135
+ closeAfterVerification
136
+ }?: Partial<VerifySuccessToastParams>) => Promise<void>;
137
+ /**
138
+ *
139
+ * Command to reload and wait for the API responses.
140
+ *
141
+ * @example
142
+ *
143
+ * // wait for 3 responses after reloading
144
+ * await neetoPlaywrightUtilities.reloadAndWait(3);
145
+ * @endexample
146
+ */
147
+ reloadAndWait: (requestCount: number, customPageContext?: Page, interceptMultipleResponsesProps?: Partial<Omit<InterceptMultipleResponsesParams, "times">>) => Promise<void>;
148
+ waitForPageLoad: ({
149
+ visiblityTimeout,
150
+ customPageContext
151
+ }: WaitForPageLoadParams) => Promise<void>;
152
+ /**
153
+ *
154
+ * Command to send a request.
155
+ *
156
+ * @example
157
+ *
158
+ * await neetoPlaywrightUtilities.apiRequest({
159
+ * url: "/api/v1/tags",
160
+ * failOnStatusCode, // throws error for status codes other than 2xx and 3xx
161
+ * body, // request body
162
+ * method, // request method
163
+ * params, // request params
164
+ * headers, // aditional request headers
165
+ * });
166
+ * @endexample
167
+ */
168
+ apiRequest: ApiRequest;
169
+ selectOptionFromDropdown: ({
170
+ selectValueContainer,
171
+ selectMenu,
172
+ value,
173
+ options
174
+ }: SelectOptionFromDropdownParams) => Promise<void>;
175
+ /**
176
+ *
177
+ * Command to verify the value of a field. It can take either a single object or an
178
+ *
179
+ * array of objects, each representing a field and its expected value.
180
+ *
181
+ * @example
182
+ *
183
+ * // verifyFieldValue with an array of field-value pairs as it's parameter
184
+ * await neetoPlaywrightUtilities.verifyFieldValue([
185
+ * { field: COMMON_SELECTORS.submitButton, value: "Submit" },
186
+ * {
187
+ * field: COMMON_SELECTORS.cancelButton,
188
+ * value: "cancel",
189
+ * },
190
+ * ]);
191
+ *
192
+ * // verifyFieldValue with a field-value object as it's parameter
193
+ * await neetoPlaywrightUtilities.verifyFieldValue({
194
+ * field: COMMON_SELECTORS.submitButton,
195
+ * value: "Submit",
196
+ * });
197
+ * @endexample
198
+ */
199
+ verifyFieldValue: VerifyFieldValue;
81
200
  }
82
-
83
201
  interface EmailContentParams {
84
- email: string;
85
- subjectSubstring?: string;
86
- timeout?: number;
87
- receivedAfter?: Date;
202
+ email: string;
203
+ subjectSubstring?: string;
204
+ timeout?: number;
205
+ receivedAfter?: Date;
88
206
  }
89
207
  type FetchOtpFromEmail = (props: EmailContentParams) => Promise<string | undefined>;
90
208
  declare class MailosaurUtils {
91
- mailosaur: MailosaurClient;
92
- serverId: string;
93
- constructor(mailosaur: MailosaurClient);
94
- getEmailContent: ({ email, subjectSubstring, timeout, receivedAfter, }: EmailContentParams) => Promise<mailosaur_lib_models.Message>;
95
- fetchOtpFromEmail: FetchOtpFromEmail;
96
- generateRandomMailosaurEmail: () => string;
209
+ mailosaur: MailosaurClient;
210
+ serverId: string;
211
+ constructor(mailosaur: MailosaurClient);
212
+ /**
213
+ *
214
+ * Used to extract the email content
215
+ *
216
+ * undefined
217
+ *
218
+ * undefined
219
+ *
220
+ * @example
221
+ *
222
+ * test("sample test", async ({ mailosaurUtils }) => {
223
+ * const email = mailosaurUtils.getEmailContent({
224
+ * email: `someone@${process.env.MAILOSAUR_SERVER_ID}.mailosaur.net`,
225
+ * subjectSubstring: "is your OTP",
226
+ * timeout: 60 * 1000,
227
+ * receivedAfter: new Date()
228
+ * })
229
+ * }
230
+ * @endexample
231
+ */
232
+ getEmailContent: ({
233
+ email,
234
+ subjectSubstring,
235
+ timeout,
236
+ receivedAfter
237
+ }: EmailContentParams) => Promise<mailosaur_lib_models.Message>;
238
+ /**
239
+ *
240
+ * Used to extract the OTP from the neeto OTP emails
241
+ *
242
+ * undefined
243
+ *
244
+ * undefined
245
+ *
246
+ * @example
247
+ *
248
+ * test("sample test", async ({ mailosaurUtils }) => {
249
+ * mailosaurUtils.fetchOtpFromEmail({
250
+ * email: `someone@${process.env.MAILOSAUR_SERVER_ID}.mailosaur.net`,
251
+ * subjectSubstring: "is your OTP",
252
+ * timeout: 60 * 1000,
253
+ * receivedAfter: new Date()
254
+ * })
255
+ * }
256
+ * @endexample
257
+ * undefined
258
+ *
259
+ * A string containing the OTP value.
260
+ *
261
+ */
262
+ fetchOtpFromEmail: FetchOtpFromEmail;
263
+ /**
264
+ *
265
+ * Used to generate a random Email ID to the Mailosaur Server.
266
+ *
267
+ * undefined
268
+ *
269
+ * @example
270
+ *
271
+ * test("sample test", async ({ mailosaurUtils }) => {
272
+ * const email = mailosaurUtils.generateRandomMailosaurEmail();
273
+ * }
274
+ * @endexample
275
+ */
276
+ generateRandomMailosaurEmail: () => string;
97
277
  }
98
-
99
278
  interface CustomFixture {
100
- neetoPlaywrightUtilities: CustomCommands;
101
- page: Page;
102
- mailosaur: MailosaurClient;
103
- mailosaurUtils: MailosaurUtils;
279
+ neetoPlaywrightUtilities: CustomCommands;
280
+ page: Page;
281
+ mailosaur: MailosaurClient;
282
+ mailosaurUtils: MailosaurUtils;
104
283
  }
105
284
  type Commands = Fixtures<CustomFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
106
285
  declare const commands: Commands;
107
-
108
286
  declare const generateStagingData: (product?: string) => {
109
- firstName: string;
110
- lastName: string;
111
- otp: number;
112
- domain: string;
113
- currentUserName: string;
114
- businessName: string;
115
- subdomainName: string;
116
- email: string;
287
+ firstName: string;
288
+ lastName: string;
289
+ otp: number;
290
+ domain: string;
291
+ currentUserName: string;
292
+ businessName: string;
293
+ subdomainName: string;
294
+ email: string;
117
295
  };
118
-
119
296
  declare const _default: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & Browser, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
120
-
121
297
  declare const i18nFixture: Fixtures<I18nPlaywrightFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
122
-
123
298
  type EmbedType = "inline" | "floatingPopup" | "elementClick";
124
299
  type GetByRoleOptions = {
125
- checked?: boolean;
126
- disabled?: boolean;
127
- exact?: boolean;
128
- expanded?: boolean;
129
- includeHidden?: boolean;
130
- level?: number;
131
- name?: string | RegExp;
132
- pressed?: boolean;
133
- selected?: boolean;
300
+ checked?: boolean;
301
+ disabled?: boolean;
302
+ exact?: boolean;
303
+ expanded?: boolean;
304
+ includeHidden?: boolean;
305
+ level?: number;
306
+ name?: string | RegExp;
307
+ pressed?: boolean;
308
+ selected?: boolean;
134
309
  };
135
310
  type InlineCustomizationOptions = {
136
- embedHeight: string;
137
- embedWidth: string;
138
- embedDivContainerId: string;
311
+ embedHeight: string;
312
+ embedWidth: string;
313
+ embedDivContainerId: string;
139
314
  };
140
315
  type VerifyInlineCustomizationParams = {
141
- headingTestId: string;
142
- inlineEmbedInterceptParams: Partial<InterceptMultipleResponsesParams>;
143
- customizationOptions: InlineCustomizationOptions;
316
+ headingTestId: string;
317
+ inlineEmbedInterceptParams: Partial<InterceptMultipleResponsesParams>;
318
+ customizationOptions: InlineCustomizationOptions;
144
319
  };
145
320
  type FloatingPopupCustomizationOptions = {
146
- buttonText: string;
147
- buttonColorHex: string;
148
- buttonTextColorHex: string;
149
- buttonPosition: "Bottom left" | "Bottom right";
150
- showIcon?: boolean;
321
+ buttonText: string;
322
+ buttonColorHex: string;
323
+ buttonTextColorHex: string;
324
+ buttonPosition: "Bottom left" | "Bottom right";
325
+ showIcon?: boolean;
151
326
  };
152
327
  type ElementClickCustomizationOptions = {
153
- customId: string;
328
+ customId: string;
154
329
  };
155
330
  type initializeEmbedPageParams = {
156
- embedType: EmbedType;
157
- embedCode: string;
158
- customElementText?: string;
331
+ embedType: EmbedType;
332
+ embedCode: string;
333
+ customElementText?: string;
159
334
  };
160
335
  type EmbedBasePageConstructorParams = {
161
- context: BrowserContext;
162
- page: Page;
163
- neetoPlaywrightUtilities: CustomCommands;
164
- appName: string;
336
+ context: BrowserContext;
337
+ page: Page;
338
+ neetoPlaywrightUtilities: CustomCommands;
339
+ appName: string;
165
340
  };
166
341
  declare class EmbedBase {
167
- context: BrowserContext;
168
- page: Page;
169
- neetoPlaywrightUtilities: CustomCommands;
170
- appName: string;
171
- t: TFunction;
172
- embedTestPage: Page;
173
- embedTestPageType: EmbedType;
174
- embeddedFrame: FrameLocator;
175
- filePath: string;
176
- codeBlock: Locator;
177
- previewTab: Locator;
178
- constructor({ context, page, neetoPlaywrightUtilities, appName, }: EmbedBasePageConstructorParams);
179
- initializeEmbedPage: ({ embedType, embedCode, customElementText, }: initializeEmbedPageParams) => Promise<Page>;
180
- closeEmbedModalAndPage: () => Promise<void>;
181
- clickOnPopupButton: (popUpButtonSelectorOptions: GetByRoleOptions) => Promise<void>;
182
- copyEmbedScript: ({ embedLabel }: {
183
- embedLabel: string;
184
- }) => Promise<string>;
185
- selectEmbedType: (embedLabel: string) => Promise<void>;
186
- verifyInlineCustomization: ({ headingTestId, inlineEmbedInterceptParams, customizationOptions, }: VerifyInlineCustomizationParams) => Promise<void>;
187
- verifyFloatingPopupCustomization: (customizationOptions: FloatingPopupCustomizationOptions) => Promise<void>;
188
- verifyElementClickCustomization: (customizationOptions: ElementClickCustomizationOptions) => Promise<void>;
189
- expectMultipleTextsInCodeblock: (containTextOptions: [
190
- string | RegExp,
191
- string | RegExp,
192
- ...(string | RegExp)[]
193
- ]) => Promise<void>;
342
+ context: BrowserContext;
343
+ page: Page;
344
+ neetoPlaywrightUtilities: CustomCommands;
345
+ appName: string;
346
+ t: TFunction;
347
+ embedTestPage: Page;
348
+ embedTestPageType: EmbedType;
349
+ embeddedFrame: FrameLocator;
350
+ filePath: string;
351
+ codeBlock: Locator;
352
+ previewTab: Locator;
353
+ constructor({
354
+ context,
355
+ page,
356
+ neetoPlaywrightUtilities,
357
+ appName
358
+ }: EmbedBasePageConstructorParams);
359
+ initializeEmbedPage: ({
360
+ embedType,
361
+ embedCode,
362
+ customElementText
363
+ }: initializeEmbedPageParams) => Promise<Page>;
364
+ closeEmbedModalAndPage: () => Promise<void>;
365
+ clickOnPopupButton: (popUpButtonSelectorOptions: GetByRoleOptions) => Promise<void>;
366
+ copyEmbedScript: ({
367
+ embedLabel
368
+ }: {
369
+ embedLabel: string;
370
+ }) => Promise<string>;
371
+ selectEmbedType: (embedLabel: string) => Promise<void>;
372
+ verifyInlineCustomization: ({
373
+ headingTestId,
374
+ inlineEmbedInterceptParams,
375
+ customizationOptions
376
+ }: VerifyInlineCustomizationParams) => Promise<void>;
377
+ verifyFloatingPopupCustomization: (customizationOptions: FloatingPopupCustomizationOptions) => Promise<void>;
378
+ verifyElementClickCustomization: (customizationOptions: ElementClickCustomizationOptions) => Promise<void>;
379
+ expectMultipleTextsInCodeblock: (containTextOptions: [string | RegExp, string | RegExp, ...(string | RegExp)[]]) => Promise<void>;
194
380
  }
195
-
196
381
  interface HelpAndProfilePageInitializerProps {
197
- page: Page;
198
- neetoPlaywrightUtilities: CustomCommands;
199
- chatApiBaseURL: string;
200
- kbDocsBaseURL: string;
201
- changelogBaseURL: string;
382
+ page: Page;
383
+ neetoPlaywrightUtilities: CustomCommands;
384
+ chatApiBaseURL: string;
385
+ kbDocsBaseURL: string;
386
+ changelogBaseURL: string;
202
387
  }
203
388
  declare class HelpAndProfilePage {
204
- page: Page;
205
- neetoPlaywrightUtilities: CustomCommands;
206
- chatApiBaseURL: string;
207
- kbDocsBaseURL: string;
208
- changelogBaseURL: string;
209
- neetoChatWidget: Locator;
210
- neetoChatFrame: FrameLocator;
211
- neetoChatSpinner: Locator;
212
- t: TFunction;
213
- profileSectionButton: Locator;
214
- constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }: HelpAndProfilePageInitializerProps);
215
- private hoverOnBody;
216
- openHelpCenterV2: () => Promise<void>;
217
- private openLiveChatAndVerify;
218
- openAndVerifyChatWidgetV2: () => Promise<void>;
219
- openAndVerifyHelpArticlesV2: () => Promise<void>;
220
- private openChangelogPaneV2;
221
- openAndVerifyChangelogV2: () => Promise<void>;
222
- private formatKeyboardShortcut;
223
- openAndVerifyKeyboardShortcutsPaneV2: (productShortcuts: {
224
- description: string;
225
- sequence: string;
226
- }[], osPlatform?: "mac" | "windows") => Promise<void>;
227
- openAppSwitcherAndVerifyV2: () => Promise<void>;
228
- private openAuthLinkAndVerify;
229
- verifyProfileAndOrganizationLinksV2: () => Promise<void>;
230
- verifyLogoutV2: () => Promise<void>;
389
+ page: Page;
390
+ neetoPlaywrightUtilities: CustomCommands;
391
+ chatApiBaseURL: string;
392
+ kbDocsBaseURL: string;
393
+ changelogBaseURL: string;
394
+ neetoChatWidget: Locator;
395
+ neetoChatFrame: FrameLocator;
396
+ neetoChatSpinner: Locator;
397
+ t: TFunction;
398
+ profileSectionButton: Locator;
399
+ constructor({
400
+ page,
401
+ neetoPlaywrightUtilities,
402
+ chatApiBaseURL,
403
+ kbDocsBaseURL,
404
+ changelogBaseURL
405
+ }: HelpAndProfilePageInitializerProps);
406
+ private hoverOnBody;
407
+ openHelpCenterV2: () => Promise<void>;
408
+ private openLiveChatAndVerify;
409
+ openAndVerifyChatWidgetV2: () => Promise<void>;
410
+ openAndVerifyHelpArticlesV2: () => Promise<void>;
411
+ private openChangelogPaneV2;
412
+ openAndVerifyChangelogV2: () => Promise<void>;
413
+ private formatKeyboardShortcut;
414
+ openAndVerifyKeyboardShortcutsPaneV2: (productShortcuts: {
415
+ description: string;
416
+ sequence: string;
417
+ }[], osPlatform?: "mac" | "windows") => Promise<void>;
418
+ openAppSwitcherAndVerifyV2: () => Promise<void>;
419
+ private openAuthLinkAndVerify;
420
+ verifyProfileAndOrganizationLinksV2: () => Promise<void>;
421
+ verifyLogoutV2: () => Promise<void>;
231
422
  }
232
-
233
423
  type Integration = "dailyco" | "github" | "google-calendar" | "google-analytics" | "google-sheets" | "microsoft-teams" | "neeto-chat" | "neeto-crm" | "slack" | "twilio" | "whereby" | "zapier" | "zoom";
234
424
  type IntegrationStatus = "connected" | "disconnected";
235
425
  type PartialInterceptMultipleResponsesParams$1 = Partial<InterceptMultipleResponsesParams>;
236
426
  interface IntegrationBaseParams {
237
- page: Page;
238
- neetoPlaywrightUtilities: CustomCommands;
239
- integration: Integration;
240
- connectedHeader?: string;
241
- connectHeader?: string;
242
- pageloaderTimeout?: number;
243
- integrationRouteIndex?: string;
244
- integrationRouteResponsesParams?: PartialInterceptMultipleResponsesParams$1;
427
+ page: Page;
428
+ neetoPlaywrightUtilities: CustomCommands;
429
+ integration: Integration;
430
+ connectedHeader?: string;
431
+ connectHeader?: string;
432
+ pageloaderTimeout?: number;
433
+ integrationRouteIndex?: string;
434
+ integrationRouteResponsesParams?: PartialInterceptMultipleResponsesParams$1;
245
435
  }
246
436
  declare class IntegrationBase {
247
- readonly page: Page;
248
- readonly neetoPlaywrightUtilities: CustomCommands;
249
- readonly t: TFunction;
250
- readonly integration: Integration;
251
- readonly integrationCard: Locator;
252
- readonly connectHeader: string;
253
- readonly connectedHeader: string;
254
- pageloaderTimeout: number;
255
- integrationRouteIndex: string;
256
- integrationRouteResponsesParams: PartialInterceptMultipleResponsesParams$1;
257
- constructor({ page, neetoPlaywrightUtilities, integration, connectHeader, connectedHeader, pageloaderTimeout, integrationRouteIndex, integrationRouteResponsesParams, }: IntegrationBaseParams);
258
- disconnect: (interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams$1) => Promise<void>;
259
- connect: (skipGoTo?: boolean) => Promise<void>;
260
- verifyIntegrationStatus: (status?: IntegrationStatus) => Promise<void>;
261
- clickOnIntegrationCard: () => Promise<void>;
262
- gotoIntegrationIndex: () => Promise<void>;
437
+ readonly page: Page;
438
+ readonly neetoPlaywrightUtilities: CustomCommands;
439
+ readonly t: TFunction;
440
+ readonly integration: Integration;
441
+ readonly integrationCard: Locator;
442
+ readonly connectHeader: string;
443
+ readonly connectedHeader: string;
444
+ pageloaderTimeout: number;
445
+ integrationRouteIndex: string;
446
+ integrationRouteResponsesParams: PartialInterceptMultipleResponsesParams$1;
447
+ constructor({
448
+ page,
449
+ neetoPlaywrightUtilities,
450
+ integration,
451
+ connectHeader,
452
+ connectedHeader,
453
+ pageloaderTimeout,
454
+ integrationRouteIndex,
455
+ integrationRouteResponsesParams
456
+ }: IntegrationBaseParams);
457
+ disconnect: (interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams$1) => Promise<void>;
458
+ connect: (skipGoTo?: boolean) => Promise<void>;
459
+ verifyIntegrationStatus: (status?: IntegrationStatus) => Promise<void>;
460
+ clickOnIntegrationCard: () => Promise<void>;
461
+ gotoIntegrationIndex: () => Promise<void>;
263
462
  }
264
-
265
463
  type AsyncNoArgsFunction = () => Promise<void>;
266
464
  type RedirectUrl = string | RegExp | ((url: URL) => boolean);
267
465
  type PartialInterceptMultipleResponsesParams = Partial<InterceptMultipleResponsesParams>;
268
466
  type UpdateConfigureSlackChannelParams = {
269
- newSlackChannel: string;
270
- interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams;
271
- refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams;
272
- refreshChannelList?: boolean;
467
+ newSlackChannel: string;
468
+ interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams;
469
+ refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams;
470
+ refreshChannelList?: boolean;
273
471
  };
274
472
  type SlackPageParams = {
275
- page: Page;
276
- neetoPlaywrightUtilities: CustomCommands;
277
- integrationRouteIndex?: string;
473
+ page: Page;
474
+ neetoPlaywrightUtilities: CustomCommands;
475
+ integrationRouteIndex?: string;
278
476
  };
279
477
  declare class SlackPage extends IntegrationBase {
280
- slackWebappPage: Page;
281
- slackWebappPageDataQa: (dataQa: string | [string, string]) => Locator;
282
- constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, }: SlackPageParams);
283
- connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction, channelToConfigure?: string) => Promise<void>;
284
- disconnectAndVerifyIntegration: () => Promise<void>;
285
- updateConfigureSlackChannel: ({ newSlackChannel, interceptMultipleResponsesParams, refreshInterceptMultipleResponsesParams, refreshChannelList, }: UpdateConfigureSlackChannelParams) => Promise<void>;
286
- clickOnChannelListRefreshButton: (refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams) => Promise<void>;
287
- loginToSlackWebapp: (slackWebappPage: Page, customCredentials?: Record<"workspace" | "loginPassword" | "loginEmail", string | undefined>) => Promise<void>;
288
- logoutFromSlackWebApp: () => Promise<void>;
289
- goToSlackChannel: (slackChannel: string) => Promise<void>;
290
- createNewSlackChannel: ({ channelName, kind, }: {
291
- channelName: string;
292
- kind?: "public" | "private" | undefined;
293
- }) => Promise<void>;
294
- deleteSlackChannel: (channel: string) => Promise<void>;
478
+ slackWebappPage: Page;
479
+ slackWebappPageDataQa: (dataQa: string | [string, string]) => Locator;
480
+ constructor({
481
+ page,
482
+ neetoPlaywrightUtilities,
483
+ integrationRouteIndex
484
+ }: SlackPageParams);
485
+ connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction, channelToConfigure?: string) => Promise<void>;
486
+ disconnectAndVerifyIntegration: () => Promise<void>;
487
+ updateConfigureSlackChannel: ({
488
+ newSlackChannel,
489
+ interceptMultipleResponsesParams,
490
+ refreshInterceptMultipleResponsesParams,
491
+ refreshChannelList
492
+ }: UpdateConfigureSlackChannelParams) => Promise<void>;
493
+ clickOnChannelListRefreshButton: (refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams) => Promise<void>;
494
+ loginToSlackWebapp: (slackWebappPage: Page, customCredentials?: Record<"workspace" | "loginPassword" | "loginEmail", string | undefined>) => Promise<void>;
495
+ logoutFromSlackWebApp: () => Promise<void>;
496
+ goToSlackChannel: (slackChannel: string) => Promise<void>;
497
+ createNewSlackChannel: ({
498
+ channelName,
499
+ kind
500
+ }: {
501
+ channelName: string;
502
+ kind?: "public" | "private" | undefined;
503
+ }) => Promise<void>;
504
+ deleteSlackChannel: (channel: string) => Promise<void>;
295
505
  }
296
-
297
506
  interface WebhooksPageParams {
298
- page: Page;
299
- request: APIRequestContext;
300
- neetoPlaywrightUtilities: CustomCommands;
301
- context: BrowserContext;
507
+ page: Page;
508
+ request: APIRequestContext;
509
+ neetoPlaywrightUtilities: CustomCommands;
510
+ context: BrowserContext;
302
511
  }
303
512
  type CallbackFunction = (args: Record<string, unknown>) => void;
304
513
  interface VerifyWebhookResponseParams extends Record<string, unknown> {
305
- callback?: CallbackFunction;
306
- webhookToken: string;
514
+ callback?: CallbackFunction;
515
+ webhookToken: string;
307
516
  }
308
517
  interface VerifyWebhookDeliveriesParams extends Record<string, unknown> {
309
- callback: CallbackFunction;
518
+ callback: CallbackFunction;
310
519
  }
311
520
  interface VerifyWebhookDeliveryByEventParams extends Record<string, unknown> {
312
- event: string;
313
- callbackToVerifyDeliveries: (args: Record<string, unknown>) => void;
521
+ event: string;
522
+ callbackToVerifyDeliveries: (args: Record<string, unknown>) => void;
314
523
  }
315
524
  declare class WebhooksPage {
316
- page: Page;
317
- request: APIRequestContext;
318
- context: BrowserContext;
319
- neetoPlaywrightUtilities: CustomCommands;
320
- t: TFunction;
321
- constructor({ page, request, neetoPlaywrightUtilities, context, }: WebhooksPageParams);
322
- getWebhookURL: () => Promise<{
323
- webhookSiteURL: string;
324
- webhookToken: string | undefined;
325
- }>;
326
- addWebhook: ({ webhookSiteURL }: {
327
- webhookSiteURL: string;
328
- }) => Promise<void>;
329
- verifyLatestWebhookResponse: ({ callback, webhookToken, ...otherParams }: VerifyWebhookResponseParams) => Promise<void>;
330
- verifyWebhookDeliveries: ({ callback, ...otherParams }: VerifyWebhookDeliveriesParams) => Promise<void>;
331
- verifyWebhookDeliveryByEvent: ({ event, callbackToVerifyDeliveries, ...fieldsToBeVerified }: VerifyWebhookDeliveryByEventParams) => Promise<void>;
525
+ page: Page;
526
+ request: APIRequestContext;
527
+ context: BrowserContext;
528
+ neetoPlaywrightUtilities: CustomCommands;
529
+ t: TFunction;
530
+ constructor({
531
+ page,
532
+ request,
533
+ neetoPlaywrightUtilities,
534
+ context
535
+ }: WebhooksPageParams);
536
+ getWebhookURL: () => Promise<{
537
+ webhookSiteURL: string;
538
+ webhookToken: string | undefined;
539
+ }>;
540
+ addWebhook: ({
541
+ webhookSiteURL
542
+ }: {
543
+ webhookSiteURL: string;
544
+ }) => Promise<void>;
545
+ verifyLatestWebhookResponse: ({
546
+ callback,
547
+ webhookToken,
548
+ ...otherParams
549
+ }: VerifyWebhookResponseParams) => Promise<void>;
550
+ verifyWebhookDeliveries: ({
551
+ callback,
552
+ ...otherParams
553
+ }: VerifyWebhookDeliveriesParams) => Promise<void>;
554
+ verifyWebhookDeliveryByEvent: ({
555
+ event,
556
+ callbackToVerifyDeliveries,
557
+ ...fieldsToBeVerified
558
+ }: VerifyWebhookDeliveryByEventParams) => Promise<void>;
332
559
  }
333
-
334
560
  declare class ZapierPage extends IntegrationBase {
335
- zapierWebPage: Page;
336
- mailosaur: MailosaurClient;
337
- continueButton: Locator;
338
- constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, }: {
339
- page: Page;
340
- neetoPlaywrightUtilities: CustomCommands;
341
- integrationRouteIndex?: string;
342
- });
343
- loginToZapier: (zapierWebPage: Page) => Promise<void>;
344
- logoutFromZapier: () => Promise<void>;
345
- reconnectAccountAndPublish: (zapierApiKey: string) => Promise<void>;
346
- deleteAllConnections: (zapierAppLink: string) => Promise<void>;
347
- verifyZapIsTriggered: ({ productName, submittedEmail, zapTriggeredAfter, }: {
348
- submittedEmail: string;
349
- zapTriggeredAfter: Date;
350
- productName: string;
351
- }) => Promise<mailosaur_lib_models.Message>;
352
- skipIfTaskLimitIsExhausted: () => Promise<void>;
353
- connectAndVerify: ({ apiKeyLabel }: {
354
- apiKeyLabel: string;
355
- }) => Promise<string>;
356
- disconnectAndVerify: () => Promise<void>;
561
+ zapierWebPage: Page;
562
+ mailosaur: MailosaurClient;
563
+ continueButton: Locator;
564
+ constructor({
565
+ page,
566
+ neetoPlaywrightUtilities,
567
+ integrationRouteIndex
568
+ }: {
569
+ page: Page;
570
+ neetoPlaywrightUtilities: CustomCommands;
571
+ integrationRouteIndex?: string;
572
+ });
573
+ loginToZapier: (zapierWebPage: Page) => Promise<void>;
574
+ logoutFromZapier: () => Promise<void>;
575
+ reconnectAccountAndPublish: (zapierApiKey: string) => Promise<void>;
576
+ deleteAllConnections: (zapierAppLink: string) => Promise<void>;
577
+ verifyZapIsTriggered: ({
578
+ productName,
579
+ submittedEmail,
580
+ zapTriggeredAfter
581
+ }: {
582
+ submittedEmail: string;
583
+ zapTriggeredAfter: Date;
584
+ productName: string;
585
+ }) => Promise<mailosaur_lib_models.Message>;
586
+ skipIfTaskLimitIsExhausted: () => Promise<void>;
587
+ connectAndVerify: ({
588
+ apiKeyLabel
589
+ }: {
590
+ apiKeyLabel: string;
591
+ }) => Promise<string>;
592
+ disconnectAndVerify: () => Promise<void>;
357
593
  }
358
-
359
594
  interface BasicUserInfo {
360
- firstName: string;
361
- lastName: string;
362
- email: string;
595
+ firstName: string;
596
+ lastName: string;
597
+ email: string;
363
598
  }
364
599
  interface CreateOrganizationProps extends BasicUserInfo {
365
- businessName: string;
366
- subdomainName: string;
367
- appName: string;
600
+ businessName: string;
601
+ subdomainName: string;
602
+ appName: string;
368
603
  }
369
604
  interface LoginAndOnboardParams extends BasicUserInfo {
370
- handleOnboarding: () => Promise<void>;
605
+ handleOnboarding: () => Promise<void>;
371
606
  }
372
607
  interface Credentials extends BasicUserInfo {
373
- otp?: number;
374
- domain: string;
375
- currentUserName: string;
376
- businessName: string;
377
- subdomainName: string;
608
+ otp?: number;
609
+ domain: string;
610
+ currentUserName: string;
611
+ businessName: string;
612
+ subdomainName: string;
378
613
  }
379
614
  declare class OrganizationPage {
380
- page: Page;
381
- neetoPlaywrightUtilities: CustomCommands;
382
- constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
383
- baseUrlGenerator: (appName: string) => string;
384
- createOrganization: ({ email, businessName, subdomainName, firstName, lastName, appName, }: CreateOrganizationProps) => Promise<void>;
385
- setupOrganization: (product: string) => Promise<void>;
386
- updateSubdomainIfExists: (appName: string) => Promise<void>;
387
- loginViaSSO: (email?: string) => Promise<void>;
388
- setupProfile: ({ firstName, lastName, }?: {
389
- firstName?: string | undefined;
390
- lastName?: string | undefined;
391
- }) => Promise<void>;
392
- loginAndOnboard: ({ email, firstName, lastName, handleOnboarding, }: LoginAndOnboardParams) => Promise<void>;
393
- signUp: ({ credentials, fetchOtpFromEmail, appName, }: {
394
- credentials: Credentials;
395
- fetchOtpFromEmail?: ((params: {
396
- email: string;
397
- timeout: number;
398
- }) => Promise<string>) | undefined;
399
- appName: string;
400
- }) => Promise<{
401
- STORAGE_STATE: {
402
- cookies: {
403
- name: string;
404
- value: string;
405
- domain: string;
406
- path: string;
407
- expires: number;
408
- httpOnly: boolean;
409
- secure: boolean;
410
- sameSite: "Strict" | "Lax" | "None";
411
- }[];
412
- origins: {
413
- origin: string;
414
- localStorage: {
415
- name: string;
416
- value: string;
417
- }[];
418
- }[];
419
- };
420
- baseURL: string | undefined;
421
- }>;
422
- fillOrganizationDetails: ({ credentials, appName, }: {
423
- credentials: Credentials;
424
- appName: string;
425
- }) => Promise<void>;
615
+ page: Page;
616
+ neetoPlaywrightUtilities: CustomCommands;
617
+ constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
618
+ baseUrlGenerator: (appName: string) => string;
619
+ createOrganization: ({
620
+ email,
621
+ businessName,
622
+ subdomainName,
623
+ firstName,
624
+ lastName,
625
+ appName
626
+ }: CreateOrganizationProps) => Promise<void>;
627
+ setupOrganization: (product: string) => Promise<void>;
628
+ updateSubdomainIfExists: (appName: string) => Promise<void>;
629
+ loginViaSSO: (email?: string) => Promise<void>;
630
+ setupProfile: ({
631
+ firstName,
632
+ lastName
633
+ }?: {
634
+ firstName?: string | undefined;
635
+ lastName?: string | undefined;
636
+ }) => Promise<void>;
637
+ loginAndOnboard: ({
638
+ email,
639
+ firstName,
640
+ lastName,
641
+ handleOnboarding
642
+ }: LoginAndOnboardParams) => Promise<void>;
643
+ signUp: ({
644
+ credentials,
645
+ fetchOtpFromEmail,
646
+ appName
647
+ }: {
648
+ credentials: Credentials;
649
+ fetchOtpFromEmail?: ((params: {
650
+ email: string;
651
+ timeout: number;
652
+ }) => Promise<string>) | undefined;
653
+ appName: string;
654
+ }) => Promise<{
655
+ STORAGE_STATE: {
656
+ cookies: {
657
+ name: string;
658
+ value: string;
659
+ domain: string;
660
+ path: string;
661
+ expires: number;
662
+ httpOnly: boolean;
663
+ secure: boolean;
664
+ sameSite: "Strict" | "Lax" | "None";
665
+ }[];
666
+ origins: {
667
+ origin: string;
668
+ localStorage: {
669
+ name: string;
670
+ value: string;
671
+ }[];
672
+ }[];
673
+ };
674
+ baseURL: string | undefined;
675
+ }>;
676
+ fillOrganizationDetails: ({
677
+ credentials,
678
+ appName
679
+ }: {
680
+ credentials: Credentials;
681
+ appName: string;
682
+ }) => Promise<void>;
426
683
  }
427
-
428
684
  declare class SidebarSection {
429
- page: Page;
430
- neetoPlaywrightUtilities: CustomCommands;
431
- t: TFunction;
432
- constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
433
- clickOnSubLink: (label: string) => Promise<void>;
434
- clickOnGoBackButton: (label: string) => Promise<void>;
685
+ page: Page;
686
+ neetoPlaywrightUtilities: CustomCommands;
687
+ t: TFunction;
688
+ constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
689
+ clickOnSubLink: (label: string) => Promise<void>;
690
+ clickOnGoBackButton: (label: string) => Promise<void>;
435
691
  }
436
-
437
692
  declare const ENVIRONMENT: {
438
- development: string;
439
- staging: string;
440
- review: string;
693
+ development: string;
694
+ staging: string;
695
+ review: string;
441
696
  };
442
697
  declare const IS_STAGING_ENV: boolean;
443
698
  declare const STORAGE_STATE = "./e2e/auth/user.json";
444
699
  declare const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
445
700
  declare const PROJECT_TRANSLATIONS_PATH = "../app/javascript/src/translations/en.json";
446
701
  declare const CREDENTIALS: {
447
- name: string;
448
- email: string;
449
- password: string;
702
+ name: string;
703
+ email: string;
704
+ password: string;
450
705
  };
451
706
  declare const OTP_EMAIL_PATTERN = "is your login code";
452
707
  declare const SLACK_DEFAULT_CHANNEL = "general";
453
708
  declare const ZAPIER_TEST_EMAIL: (product: string) => string;
454
-
455
709
  declare const USER_AGENTS: {
456
- windows: string;
457
- mac: string;
710
+ windows: string;
711
+ mac: string;
458
712
  };
459
-
460
713
  declare const BASE_URL = "/api/v1";
461
714
  declare const NEETO_AUTH_BASE_URL: (subdomain?: string) => string;
462
715
  declare const ROUTES: {
463
- neetoAuthSignup: string;
464
- neetoAuth: string;
465
- loginLink: string;
466
- profile: string;
467
- admin: string;
468
- myProfile: string;
469
- authSettings: string;
470
- webhooks: string;
471
- login: string;
472
- signup: string;
473
- subdomainAvailability: string;
474
- countries: string;
475
- neetoApps: string;
476
- teamMembers: {
477
- all: string;
478
- bulkUpdate: string;
479
- index: string;
480
- show: (id: string) => string;
481
- };
716
+ neetoAuthSignup: string;
717
+ neetoAuth: string;
718
+ loginLink: string;
719
+ profile: string;
720
+ admin: string;
721
+ myProfile: string;
722
+ authSettings: string;
723
+ webhooks: string;
724
+ login: string;
725
+ signup: string;
726
+ subdomainAvailability: string;
727
+ countries: string;
728
+ neetoApps: string;
729
+ teamMembers: {
730
+ all: string;
731
+ bulkUpdate: string;
732
+ index: string;
733
+ show: (id: string) => string;
734
+ };
482
735
  };
483
736
  declare const API_ROUTES: {
484
- teamMembers: {
485
- all: string;
486
- bulkUpdate: string;
487
- index: string;
488
- show: (id: string) => string;
489
- };
490
- integrations: {
491
- zapier: {
492
- api_keys: string;
493
- };
737
+ teamMembers: {
738
+ all: string;
739
+ bulkUpdate: string;
740
+ index: string;
741
+ show: (id: string) => string;
742
+ };
743
+ integrations: {
744
+ zapier: {
745
+ api_keys: string;
494
746
  };
747
+ };
495
748
  };
496
749
  declare const THIRD_PARTY_ROUTES: {
497
- webhooks: {
498
- site: string;
499
- };
500
- slack: {
501
- loginWithPassword: (workspace: string) => string;
502
- };
503
- zapier: {
504
- login: string;
505
- logOut: string;
506
- zapEditor: (zapId: string) => string;
507
- };
750
+ webhooks: {
751
+ site: string;
752
+ };
753
+ slack: {
754
+ loginWithPassword: (workspace: string) => string;
755
+ };
756
+ zapier: {
757
+ login: string;
758
+ logOut: string;
759
+ zapEditor: (zapId: string) => string;
760
+ };
508
761
  };
509
-
510
762
  declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling", Protocol.Network.emulateNetworkConditionsParameters>;
511
-
763
+ /**
764
+ *
765
+ * This constant contains the commonly used selectors including selectors for
766
+ *
767
+ * neetoUI components.
768
+ *
769
+ * undefined
770
+ *
771
+ * @example
772
+ *
773
+ * import { COMMON_SELECTORS } from "@bigbinary/neeto-playwright-commons";
774
+ *
775
+ * cy.get(COMMON_SELECTORS.alertTitle).should("be.visible");
776
+ * @endexample
777
+ */
512
778
  declare const COMMON_SELECTORS: {
513
- copyButton: string;
514
- spinner: string;
515
- subheaderText: string;
516
- alertTitle: string;
517
- alertModalMessage: string;
518
- alertModalSubmitButton: string;
519
- checkbox: string;
520
- checkboxLabel: string;
521
- dropdownContainer: string;
522
- dropdownIcon: string;
523
- heading: string;
524
- paneBody: string;
525
- paneHeader: string;
526
- profileSidebar: string;
527
- selectOption: (label: string) => string;
528
- radioLabel: (embedLabel: string) => string;
529
- toastMessage: string;
530
- toastCloseButton: string;
531
- windowAlert: string;
532
- body: string;
533
- toastIcon: string;
534
- paneModalCrossIcon: string;
535
- inputField: string;
536
- alertConfirmationText: string;
537
- alertCancelButton: string;
538
- alertModalCrossIcon: string;
539
- saveChangesButton: string;
540
- cancelButton: string;
541
- inputFieldError: string;
542
- selectDropDownError: string;
543
- subTitleHeading: string;
544
- noDataTitle: string;
545
- noDataDescription: string;
546
- backdrop: string;
547
- menuBarHeading: string;
548
- dropdownWrapper: string;
549
- toggleButton: string;
550
- tooltip: string;
551
- articlePageTitle: string;
552
- tabItem: string;
553
- labelInputError: string;
554
- urlInputError: string;
555
- noDataPrimaryButton: string;
556
- modalHeader: string;
557
- nameInputError: string;
558
- selectContainer: string;
559
- selectValueContainer: string;
560
- dropdownMenu: string;
561
- sidebarToggle: string;
562
- subheader: string;
563
- settingsLink: string;
564
- ticketFieldTextInput: (label: string | number) => string;
565
- appSwitcherButton: string;
566
- appSwitcherWrapper: string;
567
- tableSpinner: string;
568
- pageLoader: string;
569
- homeButton: string;
570
- neetoUiSwitch: string;
571
- floatingActionMenuButton: string;
572
- columnsDropdownContainer: string;
573
- columnsDropdownButton: string;
574
- breadcrumbHeader: string;
575
- header: string;
576
- sidebarSubLink: (label: string) => string;
577
- sidebarGoBackButton: (label: string) => string;
578
- selectSingleValue: string;
779
+ copyButton: string;
780
+ spinner: string;
781
+ subheaderText: string;
782
+ alertTitle: string;
783
+ alertModalMessage: string;
784
+ alertModalSubmitButton: string;
785
+ checkbox: string;
786
+ checkboxLabel: string;
787
+ dropdownContainer: string;
788
+ dropdownIcon: string;
789
+ heading: string;
790
+ paneBody: string;
791
+ paneHeader: string;
792
+ profileSidebar: string;
793
+ selectOption: (label: string) => string;
794
+ radioLabel: (embedLabel: string) => string;
795
+ toastMessage: string;
796
+ toastCloseButton: string;
797
+ windowAlert: string;
798
+ body: string;
799
+ toastIcon: string;
800
+ paneModalCrossIcon: string;
801
+ inputField: string;
802
+ alertConfirmationText: string;
803
+ alertCancelButton: string;
804
+ alertModalCrossIcon: string;
805
+ saveChangesButton: string;
806
+ cancelButton: string;
807
+ inputFieldError: string;
808
+ selectDropDownError: string;
809
+ subTitleHeading: string;
810
+ noDataTitle: string;
811
+ noDataDescription: string;
812
+ backdrop: string;
813
+ menuBarHeading: string;
814
+ dropdownWrapper: string;
815
+ toggleButton: string;
816
+ tooltip: string;
817
+ articlePageTitle: string;
818
+ tabItem: string;
819
+ labelInputError: string;
820
+ urlInputError: string;
821
+ noDataPrimaryButton: string;
822
+ modalHeader: string;
823
+ nameInputError: string;
824
+ selectContainer: string;
825
+ selectValueContainer: string;
826
+ dropdownMenu: string;
827
+ sidebarToggle: string;
828
+ subheader: string;
829
+ settingsLink: string;
830
+ ticketFieldTextInput: (label: string | number) => string;
831
+ appSwitcherButton: string;
832
+ appSwitcherWrapper: string;
833
+ tableSpinner: string;
834
+ pageLoader: string;
835
+ homeButton: string;
836
+ neetoUiSwitch: string;
837
+ floatingActionMenuButton: string;
838
+ columnsDropdownContainer: string;
839
+ columnsDropdownButton: string;
840
+ breadcrumbHeader: string;
841
+ header: string;
842
+ sidebarSubLink: (label: string) => string;
843
+ sidebarGoBackButton: (label: string) => string;
844
+ selectSingleValue: string;
579
845
  };
580
-
581
846
  declare const NEETO_EDITOR_SELECTORS: {
582
- boldOption: string;
583
- italicOption: string;
584
- underlineOption: string;
585
- strikeOption: string;
586
- codeBlockOption: string;
587
- highlightOption: string;
588
- linkInput: string;
589
- linkSubmitButton: string;
590
- commandList: (index: number) => string;
591
- imageUploadUrlSubmitButton: string;
592
- imageUploadUrlInputTextField: string;
593
- uploadInput: string;
594
- editorMenuBarWrapper: string;
595
- undoOption: string;
596
- redoOption: string;
597
- imageWrapper: string;
598
- contentField: string;
599
- addLinkButton: string;
600
- addLinkTextField: string;
601
- addURLTextField: string;
602
- submitLinkButton: string;
847
+ boldOption: string;
848
+ italicOption: string;
849
+ underlineOption: string;
850
+ strikeOption: string;
851
+ codeBlockOption: string;
852
+ highlightOption: string;
853
+ linkInput: string;
854
+ linkSubmitButton: string;
855
+ commandList: (index: number) => string;
856
+ imageUploadUrlSubmitButton: string;
857
+ imageUploadUrlInputTextField: string;
858
+ uploadInput: string;
859
+ editorMenuBarWrapper: string;
860
+ undoOption: string;
861
+ redoOption: string;
862
+ imageWrapper: string;
863
+ contentField: string;
864
+ addLinkButton: string;
865
+ addLinkTextField: string;
866
+ addURLTextField: string;
867
+ submitLinkButton: string;
603
868
  };
604
-
605
869
  declare const NEETO_FILTERS_SELECTORS: {
606
- emailSelectContainer: string;
607
- filterPaneHeading: string;
608
- neetoFiltersEmailBlock: string;
609
- neetoFiltersRoleBlock: string;
610
- neetoFiltersBarClearButton: string;
611
- neetoFiltersNameFilterField: string;
612
- neetoFilterNameBlock: string;
613
- roleSelectContainer: string;
614
- filterButton: string;
615
- filtersClearButton: string;
616
- filterDoneButton: string;
617
- filteredMembersCount: string;
618
- allMenubarBlock: string;
619
- filtersEmailFilter: string;
620
- paneModalCrossIcon: string;
870
+ emailSelectContainer: string;
871
+ filterPaneHeading: string;
872
+ neetoFiltersEmailBlock: string;
873
+ neetoFiltersRoleBlock: string;
874
+ neetoFiltersBarClearButton: string;
875
+ neetoFiltersNameFilterField: string;
876
+ neetoFilterNameBlock: string;
877
+ roleSelectContainer: string;
878
+ filterButton: string;
879
+ filtersClearButton: string;
880
+ filterDoneButton: string;
881
+ filteredMembersCount: string;
882
+ allMenubarBlock: string;
883
+ filtersEmailFilter: string;
884
+ paneModalCrossIcon: string;
621
885
  };
622
-
623
886
  declare const HELP_CENTER_SELECTORS: {
624
- helpButton: string;
625
- documentationButton: string;
626
- keyboardShortcutButton: string;
627
- chatButton: string;
628
- whatsNewButton: string;
629
- whatsNewWidgetInfo: string;
630
- whatsNewWidgetCloseButton: string;
631
- keyboardShortcutPaneHeading: string;
632
- keyboardShortcutPaneCrossIcon: string;
887
+ helpButton: string;
888
+ documentationButton: string;
889
+ keyboardShortcutButton: string;
890
+ chatButton: string;
891
+ whatsNewButton: string;
892
+ whatsNewWidgetInfo: string;
893
+ whatsNewWidgetCloseButton: string;
894
+ keyboardShortcutPaneHeading: string;
895
+ keyboardShortcutPaneCrossIcon: string;
633
896
  };
634
-
635
897
  declare const LOGIN_SELECTORS: {
636
- appleAuthenticationButton: string;
637
- emailTextField: string;
638
- googleAuthenticationButton: string;
639
- githubAuthenticationButton: string;
640
- loginViaEmailButton: string;
641
- passwordTextField: string;
642
- rememberMeCheckBox: string;
643
- submitButton: string;
644
- twitterAuthenticationButton: string;
898
+ appleAuthenticationButton: string;
899
+ emailTextField: string;
900
+ googleAuthenticationButton: string;
901
+ githubAuthenticationButton: string;
902
+ loginViaEmailButton: string;
903
+ passwordTextField: string;
904
+ rememberMeCheckBox: string;
905
+ submitButton: string;
906
+ twitterAuthenticationButton: string;
645
907
  };
646
-
647
908
  declare const MEMBER_SELECTORS: {
648
- membersTab: string;
649
- newButton: string;
650
- continueButton: string;
651
- submitButton: string;
652
- searchTextField: string;
653
- deactivatedAgentsButton: string;
654
- activatedMembersButton: string;
655
- columnCheckBox: string;
656
- roleLabel: (role: string) => string;
657
- dropDownIcon: string;
658
- editButton: string;
659
- menuBarHeading: string;
660
- activateOrDeactivateMember: string;
661
- columnsButton: string;
662
- columnsDropdownContainer: string;
663
- emailDropdownItemLabel: string;
664
- roleDropdownItemLabel: string;
665
- inviteStatusDropdownItemLabel: string;
666
- heading: string;
667
- activateButton: string;
668
- deactivateButton: string;
669
- rolesButton: string;
670
- statusTag: string;
909
+ membersTab: string;
910
+ newButton: string;
911
+ continueButton: string;
912
+ submitButton: string;
913
+ searchTextField: string;
914
+ deactivatedAgentsButton: string;
915
+ activatedMembersButton: string;
916
+ columnCheckBox: string;
917
+ roleLabel: (role: string) => string;
918
+ dropDownIcon: string;
919
+ editButton: string;
920
+ menuBarHeading: string;
921
+ activateOrDeactivateMember: string;
922
+ columnsButton: string;
923
+ columnsDropdownContainer: string;
924
+ emailDropdownItemLabel: string;
925
+ roleDropdownItemLabel: string;
926
+ inviteStatusDropdownItemLabel: string;
927
+ heading: string;
928
+ activateButton: string;
929
+ deactivateButton: string;
930
+ rolesButton: string;
931
+ statusTag: string;
671
932
  };
672
933
  declare const MEMBER_FORM_SELECTORS: {
673
- emailTextField: string;
674
- firstNameTextField: string;
675
- lastNameTextField: string;
676
- emailInput: string;
677
- emailErrorField: string;
678
- cancelButton: string;
934
+ emailTextField: string;
935
+ firstNameTextField: string;
936
+ lastNameTextField: string;
937
+ emailInput: string;
938
+ emailErrorField: string;
939
+ cancelButton: string;
679
940
  };
680
-
681
941
  declare const ROLES_SELECTORS: {
682
- newButton: string;
683
- proceedButton: string;
684
- cancelButton: string;
685
- tableHeaderRoleName: string;
686
- nameTextField: string;
687
- searchTextField: string;
688
- updateRolePaneHeading: string;
689
- updateRoleCancelButton: string;
690
- descriptionTextField: string;
691
- permissionCategoryTitle: string;
692
- headerColumn: string;
693
- dropDownIcon: string;
694
- tableHeaderRoleTitle: string;
695
- permissionCheckbox: string;
696
- editRoleButton: string;
697
- deleteRoleButton: string;
698
- permissionCard: string;
942
+ newButton: string;
943
+ proceedButton: string;
944
+ cancelButton: string;
945
+ tableHeaderRoleName: string;
946
+ nameTextField: string;
947
+ searchTextField: string;
948
+ updateRolePaneHeading: string;
949
+ updateRoleCancelButton: string;
950
+ descriptionTextField: string;
951
+ permissionCategoryTitle: string;
952
+ headerColumn: string;
953
+ dropDownIcon: string;
954
+ tableHeaderRoleTitle: string;
955
+ permissionCheckbox: string;
956
+ editRoleButton: string;
957
+ deleteRoleButton: string;
958
+ permissionCard: string;
699
959
  };
700
-
960
+ /**
961
+ *
962
+ * This constant contains the commonly used selectors for getting elements from
963
+ *
964
+ * signup page in neetoAuth.
965
+ *
966
+ * undefined
967
+ *
968
+ * @example
969
+ *
970
+ * import { SIGNUP_SELECTORS } from "@bigbinary/neeto-playwright-commons";
971
+ *
972
+ * cy.get(SIGNUP_SELECTORS.emailTextField).should("be.visible");
973
+ * @endexample
974
+ */
701
975
  declare const SIGNUP_SELECTORS: {
702
- emailTextField: string;
703
- firstNameTextField: string;
704
- lastNameTextField: string;
705
- organizationNameTextField: string;
706
- organizationSubmitButton: string;
707
- otpTextBox: string;
708
- profileSubmitButton: string;
709
- signupViaEmailButton: string;
710
- submitButton: string;
711
- subdomainNameTextField: string;
712
- subdomainError: string;
713
- tryFreeButton: string;
714
- unregisterdEmailError: string;
976
+ emailTextField: string;
977
+ firstNameTextField: string;
978
+ lastNameTextField: string;
979
+ organizationNameTextField: string;
980
+ organizationSubmitButton: string;
981
+ otpTextBox: string;
982
+ profileSubmitButton: string;
983
+ signupViaEmailButton: string;
984
+ submitButton: string;
985
+ subdomainNameTextField: string;
986
+ subdomainError: string;
987
+ tryFreeButton: string;
988
+ unregisterdEmailError: string;
715
989
  };
716
-
717
990
  declare const TAGS_SELECTORS: {
718
- newTagButton: string;
719
- tagNameTextField: string;
720
- editButton: string;
721
- deleteButton: string;
722
- cancelButton: string;
723
- submitButton: string;
724
- searchTextField: string;
725
- descriptionTextArea: string;
991
+ newTagButton: string;
992
+ tagNameTextField: string;
993
+ editButton: string;
994
+ deleteButton: string;
995
+ cancelButton: string;
996
+ submitButton: string;
997
+ searchTextField: string;
998
+ descriptionTextArea: string;
726
999
  };
727
1000
  declare const MERGE_TAGS_SELECTORS: {
728
- mergeTagsButton: string;
729
- mergeButton: string;
730
- sourceSearchTextField: string;
731
- sourceTagsList: string;
732
- destinationTagsList: string;
733
- destinationSearchTextField: string;
734
- cancelButton: string;
735
- proceedButton: string;
736
- disabledTag: string;
1001
+ mergeTagsButton: string;
1002
+ mergeButton: string;
1003
+ sourceSearchTextField: string;
1004
+ sourceTagsList: string;
1005
+ destinationTagsList: string;
1006
+ destinationSearchTextField: string;
1007
+ cancelButton: string;
1008
+ proceedButton: string;
1009
+ disabledTag: string;
737
1010
  };
738
-
739
1011
  declare const CHAT_WIDGET_SELECTORS: {
740
- iframe: string;
741
- spinner: string;
742
- helpButton: string;
743
- preChatEmailInput: string;
744
- preChatSubmitButton: string;
745
- chatBubble: string;
746
- closeChat: string;
1012
+ iframe: string;
1013
+ spinner: string;
1014
+ helpButton: string;
1015
+ preChatEmailInput: string;
1016
+ preChatSubmitButton: string;
1017
+ chatBubble: string;
1018
+ closeChat: string;
747
1019
  };
748
1020
  declare const CHANGELOG_WIDGET_SELECTORS: {
749
- changelogWrapper: string;
750
- closeButton: string;
751
- publicUrlLink: string;
1021
+ changelogWrapper: string;
1022
+ closeButton: string;
1023
+ publicUrlLink: string;
752
1024
  };
753
1025
  declare const KEYBOARD_SHORTCUTS_SELECTORS: {
754
- keyboardShortcutsPane: string;
755
- closePaneButton: string;
756
- hotKeyItem: string;
1026
+ keyboardShortcutsPane: string;
1027
+ closePaneButton: string;
1028
+ hotKeyItem: string;
757
1029
  };
758
-
759
1030
  declare const PROFILE_SECTION_SELECTORS: {
760
- profileSectionButton: string;
761
- profilePopup: string;
762
- myProfileButton: string;
763
- profileOrganizationSettingsButton: string;
764
- logoutButton: string;
765
- neetoAuthLink: string;
766
- profileSidebarCancelButton: string;
1031
+ profileSectionButton: string;
1032
+ profilePopup: string;
1033
+ myProfileButton: string;
1034
+ profileOrganizationSettingsButton: string;
1035
+ logoutButton: string;
1036
+ neetoAuthLink: string;
1037
+ profileSidebarCancelButton: string;
767
1038
  };
768
-
769
1039
  declare const SLACK_SELECTORS: {
770
- messageContainer: string;
771
- loginEmail: string;
772
- loginPassword: string;
773
- signInButton: string;
774
- teamPicketButtonContent: string;
775
- redirectOpenInBrowser: string;
776
- workspaceActionsButton: string;
777
- teamMenuTrigger: string;
778
- menuItemButton: string;
779
- threadsFlexpane: string;
780
- replyBar: string;
781
- markdownElement: string;
782
- virtualListItem: string;
783
- channelItems: string;
1040
+ messageContainer: string;
1041
+ loginEmail: string;
1042
+ loginPassword: string;
1043
+ signInButton: string;
1044
+ teamPicketButtonContent: string;
1045
+ redirectOpenInBrowser: string;
1046
+ workspaceActionsButton: string;
1047
+ teamMenuTrigger: string;
1048
+ menuItemButton: string;
1049
+ threadsFlexpane: string;
1050
+ replyBar: string;
1051
+ markdownElement: string;
1052
+ virtualListItem: string;
1053
+ channelItems: string;
784
1054
  };
785
1055
  declare const SLACK_DATA_QA_SELECTORS: {
786
- sectionHeadingButton: string;
787
- channelSectionSubmenuCreate: string;
788
- channelSectionMenuCreateChannel: string;
789
- skModalContent: string;
790
- infiniteSpinner: string;
791
- channelNameOptionsList: string;
792
- channelNameInput: string;
793
- createChannelNextButton: string;
794
- inviteToWorkspaceSkipButton: string;
795
- menuItems: string;
796
- channelDetailsModal: string;
797
- channelDetailsSettingsTab: string;
1056
+ sectionHeadingButton: string;
1057
+ channelSectionSubmenuCreate: string;
1058
+ channelSectionMenuCreateChannel: string;
1059
+ skModalContent: string;
1060
+ infiniteSpinner: string;
1061
+ channelNameOptionsList: string;
1062
+ channelNameInput: string;
1063
+ createChannelNextButton: string;
1064
+ inviteToWorkspaceSkipButton: string;
1065
+ menuItems: string;
1066
+ channelDetailsModal: string;
1067
+ channelDetailsSettingsTab: string;
798
1068
  };
799
-
800
1069
  declare const INTEGRATION_SELECTORS: {
801
- integrationCard: (integration: string) => string;
802
- connectButton: string;
803
- integrationStatusTag: string;
804
- disconnectButton: string;
805
- manageButton: string;
1070
+ integrationCard: (integration: string) => string;
1071
+ connectButton: string;
1072
+ integrationStatusTag: string;
1073
+ disconnectButton: string;
1074
+ manageButton: string;
806
1075
  };
807
-
808
1076
  declare const ZAPIER_SELECTORS: {
809
- zapTriggerStep: (zapId: string) => string;
810
- zapAccountSubstep: string;
811
- zapOpenSubstepContainer: string;
812
- modal: string;
813
- fmPrettytext: string;
814
- spinner: string;
815
- skeletonBlock: string;
816
- accountsLoader: string;
817
- floatingBox: string;
818
- connection: string;
819
- deleteConnectionModal: string;
820
- deleteConnectionDropdownButton: string;
821
- usageAmounts: string;
822
- universalSidebar: string;
823
- sidebarFooter: string;
824
- contextualSideBar: string;
1077
+ zapTriggerStep: (zapId: string) => string;
1078
+ zapAccountSubstep: string;
1079
+ zapOpenSubstepContainer: string;
1080
+ modal: string;
1081
+ fmPrettytext: string;
1082
+ spinner: string;
1083
+ skeletonBlock: string;
1084
+ accountsLoader: string;
1085
+ floatingBox: string;
1086
+ connection: string;
1087
+ deleteConnectionModal: string;
1088
+ deleteConnectionDropdownButton: string;
1089
+ usageAmounts: string;
1090
+ universalSidebar: string;
1091
+ sidebarFooter: string;
1092
+ contextualSideBar: string;
825
1093
  };
826
-
827
1094
  declare const EMBED_SELECTORS: {
828
- iframe: (appName: string) => string;
829
- modal: (appName: string) => string;
830
- close: (appName: string) => string;
831
- loader: (appName: string) => string;
832
- inlineHeightInput: string;
833
- inlineWidthInput: string;
834
- inlineElementIdInput: string;
835
- codeBlock: string;
836
- previewTab: string;
837
- htmlTab: string;
838
- buttonTextInput: string;
839
- buttonPositionSelectContainer: string;
840
- buttonPositionSelectMenu: string;
841
- buttonColorLabel: string;
842
- buttonTextColorLabel: string;
843
- colorPickerTarget: string;
844
- colorpickerEditableInput: string;
845
- showIconCheckbox: string;
846
- elementIdInput: string;
847
- previewElementPopupButton: string;
1095
+ iframe: (appName: string) => string;
1096
+ modal: (appName: string) => string;
1097
+ close: (appName: string) => string;
1098
+ loader: (appName: string) => string;
1099
+ inlineHeightInput: string;
1100
+ inlineWidthInput: string;
1101
+ inlineElementIdInput: string;
1102
+ codeBlock: string;
1103
+ previewTab: string;
1104
+ htmlTab: string;
1105
+ buttonTextInput: string;
1106
+ buttonPositionSelectContainer: string;
1107
+ buttonPositionSelectMenu: string;
1108
+ buttonColorLabel: string;
1109
+ buttonTextColorLabel: string;
1110
+ colorPickerTarget: string;
1111
+ colorpickerEditableInput: string;
1112
+ showIconCheckbox: string;
1113
+ elementIdInput: string;
1114
+ previewElementPopupButton: string;
848
1115
  };
849
-
850
1116
  declare const CHAT_WIDGET_TEXTS: {
851
- newConversation: string;
852
- welcomeChatBubble: string;
1117
+ newConversation: string;
1118
+ welcomeChatBubble: string;
853
1119
  };
854
1120
  declare const MEMBER_TEXTS: {
855
- agent: string;
1121
+ agent: string;
856
1122
  };
857
1123
  declare const INTEGRATIONS_TEXTS: {
858
- connectHeader: (integration: string) => string;
859
- connectedHeader: (integration: string) => string;
1124
+ connectHeader: (integration: string) => string;
1125
+ connectedHeader: (integration: string) => string;
860
1126
  };
861
1127
  declare const SLACK_WEB_TEXTS: {
862
- signOut: string;
863
- allow: string;
864
- loadingThread: string;
865
- name: string;
866
- deleteThisChannel: string;
867
- permanentlyDeleteTheChannel: string;
868
- deleteChannel: string;
1128
+ signOut: string;
1129
+ allow: string;
1130
+ loadingThread: string;
1131
+ name: string;
1132
+ deleteThisChannel: string;
1133
+ permanentlyDeleteTheChannel: string;
1134
+ deleteChannel: string;
869
1135
  };
870
1136
  declare const ZAPIER_WEB_TEXTS: {
871
- account: string;
872
- email: string;
873
- continue: string;
874
- statusLabel: string;
875
- password: string;
876
- editExistingDraft: string;
877
- signInTo: string;
878
- yesContinueTo: string;
879
- testTrigger: string;
880
- editStep: string;
881
- continueWithSelectedRecord: string;
882
- publish: string;
883
- delete: string;
884
- loading: string;
885
- subdomain: string;
886
- apiKey: string;
887
- publishingZapHeading: string;
888
- connectionListMenu: string;
889
- usageRegExp: string;
890
- trialEndsRegExp: string;
891
- testCurrentlyInQueue: string;
892
- welcomeText: (zapierLoginEmail: string) => string;
1137
+ account: string;
1138
+ email: string;
1139
+ continue: string;
1140
+ statusLabel: string;
1141
+ password: string;
1142
+ editExistingDraft: string;
1143
+ signInTo: string;
1144
+ yesContinueTo: string;
1145
+ testTrigger: string;
1146
+ editStep: string;
1147
+ continueWithSelectedRecord: string;
1148
+ publish: string;
1149
+ delete: string;
1150
+ loading: string;
1151
+ subdomain: string;
1152
+ apiKey: string;
1153
+ publishingZapHeading: string;
1154
+ connectionListMenu: string;
1155
+ usageRegExp: string;
1156
+ trialEndsRegExp: string;
1157
+ testCurrentlyInQueue: string;
1158
+ welcomeText: (zapierLoginEmail: string) => string;
893
1159
  };
894
1160
  declare const TOASTR_MESSAGES: {
895
- zapierApiKeyGenerated: string;
1161
+ zapierApiKeyGenerated: string;
896
1162
  };
897
1163
  declare const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
898
-
1164
+ /**
1165
+ *
1166
+ * Function to initialize credentials of the current user in the storageState.
1167
+ *
1168
+ * @example
1169
+ *
1170
+ * initializeCredentials("invoice");
1171
+ * @endexample
1172
+ */
899
1173
  declare const initializeCredentials: (product: string) => void;
900
-
901
1174
  interface KeyValue {
902
- key: string;
903
- value: string;
1175
+ key: string;
1176
+ value: string;
904
1177
  }
905
1178
  type JoinString = (string1: string, string2: string, string3?: string, separator?: string) => string;
906
1179
  interface UserContext {
907
- user: Record<string, string>;
908
- headers: Record<string, unknown>;
1180
+ user: Record<string, string>;
1181
+ headers: Record<string, unknown>;
909
1182
  }
910
1183
  type ReadFileSyncIfExists = (path?: string) => UserContext & Record<string, object>;
911
1184
  type WriteDataToFile = (data: string) => boolean;
912
- type UpdateCredentials = ({ key, value }: KeyValue) => boolean;
1185
+ type UpdateCredentials = ({
1186
+ key,
1187
+ value
1188
+ }: KeyValue) => boolean;
913
1189
  type ClearCredentials = () => void;
914
1190
  type Hyphenize = (input: number | string) => string;
915
1191
  type JoinHyphenCase = (args: string) => string;
@@ -917,138 +1193,247 @@ declare const joinString: JoinString;
917
1193
  declare const readFileSyncIfExists: ReadFileSyncIfExists;
918
1194
  declare const getGlobalUserState: () => Record<string, string>;
919
1195
  declare const writeDataToFile: WriteDataToFile;
1196
+ /**
1197
+ *
1198
+ * This function modifies a specified key's value in the user related data stored
1199
+ *
1200
+ * in the storageState.
1201
+ *
1202
+ * @example
1203
+ *
1204
+ * // update the user
1205
+ * updateCredentials({
1206
+ * key: "subdomainName",
1207
+ * value: newOrganizationName,
1208
+ * });
1209
+ * @endexample
1210
+ */
920
1211
  declare const updateCredentials: UpdateCredentials;
921
1212
  declare const removeCredentialFile: ClearCredentials;
922
1213
  declare const clearCredentials: ClearCredentials;
923
1214
  declare const hyphenize: Hyphenize;
924
1215
  declare const joinHyphenCase: JoinHyphenCase;
1216
+ /**
1217
+ *
1218
+ * This are methods which can be used to skip tests based on the current test
1219
+ *
1220
+ * environment
1221
+ *
1222
+ * @example
1223
+ *
1224
+ * import { skipTest } from "@bigbinary/neeto-playwright-commons";
1225
+ *
1226
+ * skipTest.forDevelopmentEnv(); // Skip a test if TEST_ENV is "development"
1227
+ * skipTest.forReviewEnv(); // Skip a test if TEST_ENV is "review"
1228
+ * skipTest.forAllExceptStagingEnv(); // Skip a test if TEST_ENV is NOT "staging"
1229
+ * @endexample
1230
+ */
925
1231
  declare const skipTest: {
926
- forDevelopmentEnv: () => void;
927
- forReviewEnv: () => void;
928
- forAllExceptStagingEnv: () => void;
929
- forNonNightlyRun: () => void;
930
- ifNotWithinAllowedNightlyHours: ({ reason, allowedNightlyRunHours, }: {
931
- reason: string;
932
- allowedNightlyRunHours?: number[] | undefined;
933
- }) => void;
1232
+ forDevelopmentEnv: () => void;
1233
+ forReviewEnv: () => void;
1234
+ forAllExceptStagingEnv: () => void;
1235
+ forNonNightlyRun: () => void;
1236
+ ifNotWithinAllowedNightlyHours: ({
1237
+ reason,
1238
+ allowedNightlyRunHours
1239
+ }: {
1240
+ reason: string;
1241
+ allowedNightlyRunHours?: number[] | undefined;
1242
+ }) => void;
934
1243
  };
935
1244
  declare const shouldSkipSetupAndTeardown: () => boolean | "";
936
1245
  declare const squish: (text: string) => string;
937
1246
  declare const toCamelCase: (string: string) => string;
938
1247
  declare const getByDataQA: ts_toolbelt_out_Function_Curry.Curry<(page: Page, dataQa: string | [string, string]) => playwright_core.Locator>;
939
-
940
1248
  interface LoginProps {
941
- page: Page;
942
- neetoPlaywrightUtilities: CustomCommands;
943
- loginPath?: string;
1249
+ page: Page;
1250
+ neetoPlaywrightUtilities: CustomCommands;
1251
+ loginPath?: string;
944
1252
  }
945
- declare const loginWithoutSSO: ({ page, neetoPlaywrightUtilities, loginPath, }: LoginProps) => Promise<void>;
946
- declare const login: ({ page, neetoPlaywrightUtilities, loginPath, }: LoginProps) => Promise<false | void>;
1253
+ declare const loginWithoutSSO: ({
1254
+ page,
1255
+ neetoPlaywrightUtilities,
1256
+ loginPath
1257
+ }: LoginProps) => Promise<void>;
1258
+ declare const login: ({
1259
+ page,
1260
+ neetoPlaywrightUtilities,
1261
+ loginPath
1262
+ }: LoginProps) => Promise<false | void>;
1263
+ /**
1264
+ *
1265
+ * Function to generate a random email to bypass OTP verification and log into
1266
+ *
1267
+ * neeto products.
1268
+ *
1269
+ * Usage
1270
+ *
1271
+ * @example
1272
+ *
1273
+ * import { generateRandomBypassEmail } from "@bigbinary/neeto-playwright-commons";
1274
+ *
1275
+ * const bypassEmail = generateRandomBypassEmail();
1276
+ * @endexample
1277
+ */
947
1278
  declare const generateRandomBypassEmail: () => string;
948
-
949
1279
  declare const extractSubdomainFromError: (errorString: string) => string;
950
-
951
1280
  interface AddMemberProps {
952
- email: string;
953
- role?: string;
954
- appName: string;
955
- requestCount?: number;
956
- neetoPlaywrightUtilities: CustomCommands;
1281
+ email: string;
1282
+ role?: string;
1283
+ appName: string;
1284
+ requestCount?: number;
1285
+ neetoPlaywrightUtilities: CustomCommands;
957
1286
  }
958
1287
  interface EditMemberProps {
959
- email: string;
960
- firstName?: string;
961
- lastName?: string;
962
- newRole?: string;
963
- requestCount?: number;
964
- neetoPlaywrightUtilities: CustomCommands;
1288
+ email: string;
1289
+ firstName?: string;
1290
+ lastName?: string;
1291
+ newRole?: string;
1292
+ requestCount?: number;
1293
+ neetoPlaywrightUtilities: CustomCommands;
965
1294
  }
966
1295
  interface DeactiveMemberProps {
967
- email: string;
968
- neetoPlaywrightUtilities: CustomCommands;
969
- requestCount?: number;
1296
+ email: string;
1297
+ neetoPlaywrightUtilities: CustomCommands;
1298
+ requestCount?: number;
970
1299
  }
971
1300
  declare const memberUtils: {
972
- addMemberViaRequest: ({ email, role, appName, neetoPlaywrightUtilities, }: AddMemberProps) => Promise<playwright_core.APIResponse | undefined>;
973
- editMemberViaRequest: ({ email, firstName, lastName, newRole, neetoPlaywrightUtilities, }: EditMemberProps) => Promise<void>;
974
- deactivateMemberViaRequest: ({ email, neetoPlaywrightUtilities, }: DeactiveMemberProps) => Promise<playwright_core.APIResponse | undefined>;
1301
+ addMemberViaRequest: ({
1302
+ email,
1303
+ role,
1304
+ appName,
1305
+ neetoPlaywrightUtilities
1306
+ }: AddMemberProps) => Promise<playwright_core.APIResponse | undefined>;
1307
+ editMemberViaRequest: ({
1308
+ email,
1309
+ firstName,
1310
+ lastName,
1311
+ newRole,
1312
+ neetoPlaywrightUtilities
1313
+ }: EditMemberProps) => Promise<void>;
1314
+ deactivateMemberViaRequest: ({
1315
+ email,
1316
+ neetoPlaywrightUtilities
1317
+ }: DeactiveMemberProps) => Promise<playwright_core.APIResponse | undefined>;
975
1318
  };
976
-
977
1319
  interface AssertColumnHeaderVisibilityProps {
978
- page: Page;
979
- columnName: string;
980
- shouldBeVisible: boolean;
1320
+ page: Page;
1321
+ columnName: string;
1322
+ shouldBeVisible: boolean;
981
1323
  }
982
1324
  interface ToggleColumnCheckboxAndVerifyVisibilityProps {
983
- page: Page;
984
- tableColumns: string[];
985
- shouldBeChecked: boolean;
1325
+ page: Page;
1326
+ tableColumns: string[];
1327
+ shouldBeChecked: boolean;
986
1328
  }
987
1329
  declare const tableUtils: {
988
- verifyTableColumnsExistence: ({ page, columnNames, }: {
989
- page: Page;
990
- columnNames: string[];
991
- }) => Promise<void>;
992
- assertColumnHeaderVisibility: ({ page, columnName, shouldBeVisible, }: AssertColumnHeaderVisibilityProps) => Promise<void>;
993
- toggleColumnCheckboxAndVerifyVisibility: ({ page, tableColumns, shouldBeChecked, }: ToggleColumnCheckboxAndVerifyVisibilityProps) => Promise<void>;
1330
+ verifyTableColumnsExistence: ({
1331
+ page,
1332
+ columnNames
1333
+ }: {
1334
+ page: Page;
1335
+ columnNames: string[];
1336
+ }) => Promise<void>;
1337
+ assertColumnHeaderVisibility: ({
1338
+ page,
1339
+ columnName,
1340
+ shouldBeVisible
1341
+ }: AssertColumnHeaderVisibilityProps) => Promise<void>;
1342
+ toggleColumnCheckboxAndVerifyVisibility: ({
1343
+ page,
1344
+ tableColumns,
1345
+ shouldBeChecked
1346
+ }: ToggleColumnCheckboxAndVerifyVisibilityProps) => Promise<void>;
994
1347
  };
995
-
996
1348
  interface BreadcrumbTitleAndRoute {
997
- title: string;
998
- route: string;
1349
+ title: string;
1350
+ route: string;
999
1351
  }
1000
1352
  interface VerifyBreadcrumbProps {
1001
- page: Page;
1002
- titlesAndRoutes: BreadcrumbTitleAndRoute[];
1353
+ page: Page;
1354
+ titlesAndRoutes: BreadcrumbTitleAndRoute[];
1003
1355
  }
1004
1356
  declare const headerUtils: {
1005
- verifyBreadcrumbs: ({ page, titlesAndRoutes, }: VerifyBreadcrumbProps) => Promise<void>;
1357
+ verifyBreadcrumbs: ({
1358
+ page,
1359
+ titlesAndRoutes
1360
+ }: VerifyBreadcrumbProps) => Promise<void>;
1006
1361
  };
1007
-
1008
1362
  declare const decodeQRCodeFromFile: (filePath: string) => Promise<string | undefined>;
1009
-
1010
- declare const initializeTotp: ({ issuer, secret, }: {
1011
- issuer: string;
1012
- secret: string | Secret;
1363
+ declare const initializeTotp: ({
1364
+ issuer,
1365
+ secret
1366
+ }: {
1367
+ issuer: string;
1368
+ secret: string | Secret;
1013
1369
  }) => TOTP;
1014
-
1015
1370
  type EmulateNetworkConditionsParameters = Protocol.Network.emulateNetworkConditionsParameters;
1016
1371
  type NetworkThrottlingUsingCdpParams = {
1017
- cdpSession: CDPSession;
1018
- emulateNetworkConditionsParameters?: EmulateNetworkConditionsParameters;
1372
+ cdpSession: CDPSession;
1373
+ emulateNetworkConditionsParameters?: EmulateNetworkConditionsParameters;
1019
1374
  };
1020
- declare const networkThrottlingUsingCDP: ({ cdpSession, emulateNetworkConditionsParameters, }: NetworkThrottlingUsingCdpParams) => Promise<Protocol.Network.emulateNetworkConditionsReturnValue>;
1375
+ declare const networkThrottlingUsingCDP: ({
1376
+ cdpSession,
1377
+ emulateNetworkConditionsParameters
1378
+ }: NetworkThrottlingUsingCdpParams) => Promise<Protocol.Network.emulateNetworkConditionsReturnValue>;
1021
1379
  type CpuThrottlingUsingCdpParams = {
1022
- cdpSession: CDPSession;
1023
- rate?: number;
1380
+ cdpSession: CDPSession;
1381
+ rate?: number;
1024
1382
  };
1025
- declare const cpuThrottlingUsingCDP: ({ cdpSession, rate, }: CpuThrottlingUsingCdpParams) => Promise<Protocol.Emulation.setCPUThrottlingRateReturnValue>;
1383
+ declare const cpuThrottlingUsingCDP: ({
1384
+ cdpSession,
1385
+ rate
1386
+ }: CpuThrottlingUsingCdpParams) => Promise<Protocol.Emulation.setCPUThrottlingRateReturnValue>;
1026
1387
  interface ExecuteWithThrottledResourcesParams {
1027
- kind?: "both" | "network" | "cpu";
1028
- code: () => Promise<void>;
1029
- networkCondition?: EmulateNetworkConditionsParameters;
1030
- cpuThrottlingRate?: number;
1031
- cdpSession: CDPSession;
1388
+ kind?: "both" | "network" | "cpu";
1389
+ code: () => Promise<void>;
1390
+ networkCondition?: EmulateNetworkConditionsParameters;
1391
+ cpuThrottlingRate?: number;
1392
+ cdpSession: CDPSession;
1032
1393
  }
1033
- declare const executeWithThrottledResources: ({ code: emulatedCode, kind, networkCondition, cpuThrottlingRate, cdpSession, }: ExecuteWithThrottledResourcesParams) => Promise<void>;
1034
-
1394
+ declare const executeWithThrottledResources: ({
1395
+ code: emulatedCode,
1396
+ kind,
1397
+ networkCondition,
1398
+ cpuThrottlingRate,
1399
+ cdpSession
1400
+ }: ExecuteWithThrottledResourcesParams) => Promise<void>;
1401
+ /**
1402
+ *
1403
+ * Function to generate a basic HTML content with the given body.
1404
+ *
1405
+ */
1035
1406
  declare const basicHTMLContent: (content: string) => string;
1036
1407
  declare const hexToRGB: (hex: string) => string;
1037
-
1038
1408
  declare const filterUtils: {
1039
- openFilterPane: (page: Page) => Promise<void>;
1409
+ openFilterPane: (page: Page) => Promise<void>;
1040
1410
  };
1041
-
1042
1411
  interface CurrentsOverrides {
1043
- projectId: string;
1412
+ projectId: string;
1044
1413
  }
1045
1414
  interface Overrides {
1046
- globalOverrides?: Record<string, unknown>;
1047
- useOverrides?: Record<string, unknown>;
1048
- useCustomProjects?: boolean;
1049
- projectOverrides?: Record<string, unknown>[];
1050
- currentsOverrides: CurrentsOverrides & Record<string, unknown>;
1415
+ globalOverrides?: Record<string, unknown>;
1416
+ useOverrides?: Record<string, unknown>;
1417
+ useCustomProjects?: boolean;
1418
+ projectOverrides?: Record<string, unknown>[];
1419
+ currentsOverrides: CurrentsOverrides & Record<string, unknown>;
1051
1420
  }
1421
+ /**
1422
+ *
1423
+ * This function returns the default playwright configuration object. It can be
1424
+ *
1425
+ * used to extend the default playwright configuration object in the host project.
1426
+ *
1427
+ * Usage:
1428
+ *
1429
+ * @example
1430
+ *
1431
+ * import { definePlaywrightConfig } from "@bigbinary/neeto-playwright-commons";
1432
+ *
1433
+ * export default definePlaywrightConfig({
1434
+ * currentsOverrides: { projectId: "******" },
1435
+ * });
1436
+ * @endexample
1437
+ */
1052
1438
  declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
1053
-
1054
- export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, EMBED_SELECTORS, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, USER_AGENTS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, headerUtils, hexToRGB, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
1439
+ export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, EMBED_SELECTORS, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, USER_AGENTS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, headerUtils, hexToRGB, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };