@bigbinary/neeto-playwright-commons 1.1.3 → 1.3.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
@@ -19,13 +19,13 @@ interface VerifySuccessToastParams {
19
19
  closeAfterVerification: boolean;
20
20
  }
21
21
  type VerifySuccessToast = (params: VerifySuccessToastParams) => Promise<void>;
22
- declare const HTTP_METHODS: readonly ["get", "post", "put", "delete", "GET", "POST", "PUT", "DELETE"];
23
22
  type BasicTypesInterface = Record<string, number | string | boolean>;
23
+ type HttpMethods = "get" | "post" | "put" | "delete";
24
24
  interface ApiRequestProps {
25
25
  url: string;
26
26
  headers?: BasicTypesInterface;
27
27
  data?: Record<string, unknown>;
28
- method?: typeof HTTP_METHODS[number];
28
+ method?: HttpMethods;
29
29
  params?: BasicTypesInterface;
30
30
  }
31
31
  type ApiRequest = (props: ApiRequestProps & Record<string, unknown>) => Promise<APIResponse | undefined>;
@@ -55,7 +55,7 @@ interface CustomFixture {
55
55
  type Commands = Fixtures<CustomFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
56
56
  declare const commands: Commands;
57
57
 
58
- declare const stagingData: {
58
+ declare const generateStagingData: (product?: string) => {
59
59
  firstName: string;
60
60
  lastName: string;
61
61
  otp: number;
@@ -93,7 +93,7 @@ declare class OrganizationPage {
93
93
  neetoPlaywrightUtilities: CustomCommands;
94
94
  constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
95
95
  createOrganization: ({ email, businessName, subdomainName, firstName, lastName, appName, }: CreateOrganizationProps) => Promise<void>;
96
- setupOrganization: () => Promise<void>;
96
+ setupOrganization: (product: string) => Promise<void>;
97
97
  updateSubdomainIfExists: (appName: string) => Promise<void>;
98
98
  }
99
99
 
@@ -107,6 +107,7 @@ declare const STORAGE_STATE = "./e2e/auth/user.json";
107
107
  declare const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
108
108
  declare const PROJECT_TRANSLATIONS_PATH = "../app/javascript/src/translations/en.json";
109
109
  declare const CREDENTIALS: {
110
+ name: string;
110
111
  email: string;
111
112
  password: string;
112
113
  };
@@ -114,25 +115,189 @@ declare const CREDENTIALS: {
114
115
  declare const BASE_URL = "/api/v1";
115
116
  declare const ROUTES: {
116
117
  neetoAuth: string;
118
+ neetoAuthSignup: string;
117
119
  profile: string;
118
120
  login: string;
119
121
  signup: string;
120
122
  subdomainAvailability: string;
121
123
  countries: string;
122
124
  neetoApps: string;
125
+ teamMembers: {
126
+ all: string;
127
+ bulkUpdate: string;
128
+ index: string;
129
+ show: (id: string) => string;
130
+ };
123
131
  };
124
132
 
125
133
  declare const COMMON_SELECTORS: {
126
- toastMessage: string;
127
- toastIcon: string;
128
- toastCloseButton: string;
129
- dropdownIcon: string;
130
- checkbox: string;
131
134
  spinner: string;
132
- input: string;
135
+ subheaderText: string;
136
+ alertTitle: string;
137
+ alertModalMessage: string;
133
138
  alertModalSubmitButton: string;
139
+ checkbox: string;
140
+ checkboxLabel: string;
141
+ dropdownContainer: string;
142
+ dropdownIcon: string;
143
+ heading: string;
144
+ paneBody: string;
145
+ paneHeader: string;
146
+ profileSidebar: string;
147
+ selectOption: (label: string) => string;
148
+ toastMessage: string;
149
+ toastCloseButton: string;
150
+ windowAlert: string;
151
+ body: string;
152
+ toastIcon: string;
153
+ paneModalCrossIcon: string;
154
+ inputField: string;
155
+ alertConfirmationText: string;
156
+ alertCancelButton: string;
157
+ alertModalCrossIcon: string;
158
+ saveChangesButton: string;
159
+ cancelButton: string;
160
+ inputFieldError: string;
161
+ selectDropDownError: string;
162
+ subTitleHeading: string;
163
+ noDataTitle: string;
164
+ noDataDescription: string;
165
+ backdrop: string;
166
+ menuBarHeading: string;
167
+ dropdownWrapper: string;
168
+ toggleButton: string;
169
+ tooltip: string;
170
+ articlePageTitle: string;
171
+ tabItem: string;
172
+ labelInputError: string;
173
+ urlInputError: string;
174
+ noDataPrimaryButton: string;
175
+ modalHeader: string;
176
+ nameInputError: string;
134
177
  selectContainer: string;
135
- subheaderText: string;
178
+ dropdownMenu: string;
179
+ sidebarToggle: string;
180
+ subheader: string;
181
+ settingsLink: string;
182
+ ticketFieldTextInput: (label: string | number) => string;
183
+ };
184
+
185
+ declare const NEETO_EDITOR_SELECTORS: {
186
+ boldOption: string;
187
+ italicOption: string;
188
+ underlineOption: string;
189
+ strikeOption: string;
190
+ codeBlockOption: string;
191
+ highlightOption: string;
192
+ linkInput: string;
193
+ linkSubmitButton: string;
194
+ commandList: (index: number) => string;
195
+ imageUploadUrlSubmitButton: string;
196
+ imageUploadUrlInputTextField: string;
197
+ uploadInput: string;
198
+ editorMenuBarWrapper: string;
199
+ undoOption: string;
200
+ redoOption: string;
201
+ imageWrapper: string;
202
+ };
203
+
204
+ declare const NEETO_FILTERS_SELECTORS: {
205
+ emailSelectContainer: string;
206
+ filterPaneHeading: string;
207
+ neetoFiltersEmailBlock: string;
208
+ neetoFiltersRoleBlock: string;
209
+ neetoFiltersBarClearButton: string;
210
+ neetoFiltersNameFilterField: string;
211
+ neetoFilterNameBlock: string;
212
+ roleSelectContainer: string;
213
+ filterButton: string;
214
+ filtersClearButton: string;
215
+ filterDoneButton: string;
216
+ filteredMembersCount: string;
217
+ allMenubarBlock: string;
218
+ filtersEmailFilter: string;
219
+ paneModalCrossIcon: string;
220
+ };
221
+
222
+ declare const HELP_CENTER_SELECTORS: {
223
+ helpButton: string;
224
+ documentationButton: string;
225
+ keyboardShortcutButton: string;
226
+ chatButton: string;
227
+ whatsNewButton: string;
228
+ whatsNewWidgetInfo: string;
229
+ whatsNewWidgetCloseButton: string;
230
+ keyboardShortcutPaneHeading: string;
231
+ keyboardShortcutPaneCrossIcon: string;
232
+ };
233
+ declare const CHAT_WIDGET_SELECTORS: {
234
+ chatWidgetHomeCard: string;
235
+ widgetSubmitButton: string;
236
+ chatBubbleMessage: string;
237
+ chatCloseButton: string;
238
+ widgetIframe: string;
239
+ };
240
+
241
+ declare const LOGIN_SELECTORS: {
242
+ appleAuthenticationButton: string;
243
+ emailTextField: string;
244
+ googleAuthenticationButton: string;
245
+ githubAuthenticationButton: string;
246
+ loginViaEmailButton: string;
247
+ passwordTextField: string;
248
+ rememberMeCheckBox: string;
249
+ submitButton: string;
250
+ twitterAuthenticationButton: string;
251
+ };
252
+
253
+ declare const MEMBER_SELECTORS: {
254
+ membersTab: string;
255
+ newButton: string;
256
+ continueButton: string;
257
+ submitButton: string;
258
+ searchTextField: string;
259
+ deactivatedAgentsButton: string;
260
+ activatedMembersButton: string;
261
+ columnCheckBox: string;
262
+ roleLabel: (role: string) => string;
263
+ dropDownIcon: string;
264
+ editButton: string;
265
+ menuBarHeading: string;
266
+ activateOrDeactivateMember: string;
267
+ columnsButton: string;
268
+ columnsDropdownContainer: string;
269
+ emailDropdownItemLabel: string;
270
+ roleDropdownItemLabel: string;
271
+ inviteStatusDropdownItemLabel: string;
272
+ heading: string;
273
+ activateButton: string;
274
+ deactivateButton: string;
275
+ rolesButton: string;
276
+ statusTag: string;
277
+ };
278
+ declare const MEMBER_FORM_SELECTORS: {
279
+ emailTextField: string;
280
+ firstNameTextField: string;
281
+ lastNameTextField: string;
282
+ emailInput: string;
283
+ emailErrorField: string;
284
+ cancelButton: string;
285
+ };
286
+
287
+ declare const ROLES_SELECTORS: {
288
+ newButton: string;
289
+ proceedButton: string;
290
+ cancelButton: string;
291
+ tableHeaderRoleName: string;
292
+ nameTextField: string;
293
+ searchTextField: string;
294
+ updateRolePaneHeading: string;
295
+ updateRoleCancelButton: string;
296
+ descriptionTextField: string;
297
+ permissionCategoryTitle: string;
298
+ headerColumn: string;
299
+ dropDownIcon: string;
300
+ tableHeaderRoleTitle: string;
136
301
  };
137
302
 
138
303
  declare const SIGNUP_SELECTORS: {
@@ -150,23 +315,29 @@ declare const SIGNUP_SELECTORS: {
150
315
  tryFreeButton: string;
151
316
  };
152
317
 
153
- declare const LOGIN_SELECTORS: {
154
- appleAuthenticationButton: string;
155
- emailTextField: string;
156
- googleAuthenticationButton: string;
157
- githubAuthenticationButton: string;
158
- loginViaEmailButton: string;
159
- passwordTextField: string;
160
- rememberMeCheckBox: string;
318
+ declare const TAGS_SELECTORS: {
319
+ newTagButton: string;
320
+ tagNameTextField: string;
321
+ editButton: string;
322
+ deleteButton: string;
323
+ cancelButton: string;
161
324
  submitButton: string;
162
- twitterAuthenticationButton: string;
325
+ searchTextField: string;
326
+ descriptionTextArea: string;
163
327
  };
164
-
165
- declare const COMMON_TEXTS: {
166
- edit: string;
328
+ declare const MERGE_TAGS_SELECTORS: {
329
+ mergeTagsButton: string;
330
+ mergeButton: string;
331
+ sourceSearchTextField: string;
332
+ sourceTagsList: string;
333
+ destinationTagsList: string;
334
+ destinationSearchTextField: string;
335
+ cancelButton: string;
336
+ proceedButton: string;
337
+ disabledTag: string;
167
338
  };
168
339
 
169
- declare const initializeCredentials: () => void;
340
+ declare const initializeCredentials: (product: string) => void;
170
341
 
171
342
  interface KeyValue {
172
343
  key: string;
@@ -181,19 +352,24 @@ type ReadFileSyncIfExists = (path?: string) => UserContext & Record<string, obje
181
352
  type WriteDataToFile = (data: string) => boolean;
182
353
  type UpdateCredentials = ({ key, value }: KeyValue) => boolean;
183
354
  type ClearCredentials = () => void;
355
+ type Hyphenize = (input: number | string) => string;
356
+ type JoinHyphenCase = (args: string) => string;
184
357
  declare const joinString: JoinString;
185
358
  declare const readFileSyncIfExists: ReadFileSyncIfExists;
186
359
  declare const writeDataToFile: WriteDataToFile;
187
360
  declare const updateCredentials: UpdateCredentials;
188
361
  declare const clearCredentials: ClearCredentials;
189
362
  declare const readTranslations: () => Record<string, unknown>;
363
+ declare const hyphenize: Hyphenize;
364
+ declare const joinHyphenCase: JoinHyphenCase;
190
365
 
191
366
  interface LoginProps {
192
367
  page: Page;
193
368
  neetoPlaywrightUtilities: CustomCommands;
369
+ loginPath: string;
194
370
  }
195
- declare const loginWithoutSSO: ({ page, neetoPlaywrightUtilities, }: LoginProps) => Promise<void>;
196
- declare const login: ({ page, neetoPlaywrightUtilities }: LoginProps) => Promise<false | void>;
371
+ declare const loginWithoutSSO: ({ page, neetoPlaywrightUtilities, loginPath, }: LoginProps) => Promise<void>;
372
+ declare const login: ({ page, neetoPlaywrightUtilities, loginPath, }: LoginProps) => Promise<false | void>;
197
373
 
198
374
  interface CurrentsOverrides {
199
375
  projectId: string;
@@ -206,4 +382,4 @@ interface Overrides {
206
382
  }
207
383
  declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
208
384
 
209
- export { BASE_URL, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, IS_STAGING_ENV, LOGIN_SELECTORS, OrganizationPage, PROJECT_TRANSLATIONS_PATH, ROUTES, SIGNUP_SELECTORS, STORAGE_STATE, clearCredentials, commands, definePlaywrightConfig, i18n, initializeCredentials, joinString, login, loginWithoutSSO, readFileSyncIfExists, readTranslations, stagingData, updateCredentials, writeDataToFile };
385
+ export { BASE_URL, CHAT_WIDGET_SELECTORS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, IS_STAGING_ENV, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MERGE_TAGS_SELECTORS, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OrganizationPage, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, STORAGE_STATE, TAGS_SELECTORS, clearCredentials, commands, definePlaywrightConfig, generateStagingData, hyphenize, i18n, initializeCredentials, joinHyphenCase, joinString, login, loginWithoutSSO, readFileSyncIfExists, readTranslations, updateCredentials, writeDataToFile };