@bigbinary/neeto-playwright-commons 1.8.48 → 1.9.1

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