@digital-ai/devops-page-object-deploy 0.0.2 → 0.0.4

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/dist/types.d.ts CHANGED
@@ -82,12 +82,14 @@ declare class Content extends Section {
82
82
  constructor(page: Page);
83
83
  }
84
84
  declare class Menu extends Section {
85
+ menuLinkLocator: Locator;
86
+ menuItemsParentLocator: Locator;
85
87
  /**
86
- *
87
- * @param menuContentRootLocator menu content root locator
88
- * @param menuLinkLocator Menu link locator thats used to open/close the menu
89
- * @param menuItemsParentLocator Menu items that opens up when menu link is clicked
90
- */
88
+ *
89
+ * @param menuContentRootLocator menu content root locator
90
+ * @param menuLinkLocator Menu link locator thats used to open/close the menu
91
+ * @param menuItemsParentLocator Menu items that opens up when menu link is clicked
92
+ */
91
93
  constructor(menuContentRootLocator: Locator, menuLinkLocator: Locator, menuItemsParentLocator: Locator);
92
94
  /**
93
95
  * Click on a menu item
@@ -104,6 +106,16 @@ declare class Menu extends Section {
104
106
  * @param menuItemLocator
105
107
  */
106
108
  hoverFlyoutAndClickMenuItem(mouseOverLocator: Locator, menuItemLocator: Locator): Promise<void>;
109
+ /**
110
+ * Open contextual menu dots of ci to work with contextual-menu items.
111
+ */
112
+ openContextualMenuDots(): Promise<void>;
113
+ /**
114
+ * Find exact menu locators using menu parent locators.
115
+ * @param childElementLocator
116
+ * @returns
117
+ */
118
+ findElementInMenu(childElementLocator: Locator): Promise<Locator>;
107
119
  }
108
120
  declare class HelperMenu extends Menu {
109
121
  onlineDoc: Locator;
@@ -140,28 +152,28 @@ declare class BrandLogo extends Section {
140
152
  declare class SettingsMenu extends Menu {
141
153
  constructor(page: Page);
142
154
  /**
143
- * Click on settings menu option
144
- */
155
+ * Click on settings menu option
156
+ */
145
157
  clickSettings(): Promise<void>;
146
158
  /**
147
- * Click on renew license menu option
148
- */
159
+ * Click on renew license menu option
160
+ */
149
161
  clickRenewLicense(): Promise<void>;
150
162
  /**
151
- * Click on view as menu option
152
- */
163
+ * Click on view as menu option
164
+ */
153
165
  clickViewAs(): Promise<void>;
154
166
  /**
155
- * Click on maintenance mode menu option
156
- */
167
+ * Click on maintenance mode menu option
168
+ */
157
169
  clickMaintenanceMode(): Promise<void>;
158
170
  /**
159
- * Click on About menu option
160
- */
171
+ * Click on About menu option
172
+ */
161
173
  clickAbout(): Promise<void>;
162
174
  /**
163
- * Click on System information menu option
164
- */
175
+ * Click on System information menu option
176
+ */
165
177
  clickSystemInfo(): Promise<void>;
166
178
  }
167
179
  declare class AvatarMenu extends Menu {
@@ -192,21 +204,444 @@ declare class LoginPage extends WithPage {
192
204
  constructor(page: Page);
193
205
  login(user: string, pwd: string): Promise<void>;
194
206
  }
195
- declare class ApplicationMenu extends Menu {
207
+ declare class ApplicationUtil {
208
+ page: Page;
209
+ applicationPage: ApplicationPage;
210
+ constructor(page1: ApplicationPage, page: Page);
211
+ /**
212
+ * Create New directory under applications CI.
213
+ * @param appDirectoryName
214
+ * @param expectedCiType
215
+ */
216
+ createNewApplicationDirectory(appDirectoryName: string, expectedCiType: string): Promise<void>;
217
+ /**
218
+ * Create new application under Application ci
219
+ * @param appName
220
+ * @param expectedCiType
221
+ */
222
+ createNewApplication(appName: string, expectedCiType: string): Promise<void>;
223
+ /**
224
+ * TODO: It is half done just to check on menu path other than new. Need to create as per scenario.
225
+ */
226
+ createFromFileImport(): Promise<void>;
227
+ }
228
+ declare class Tab extends WithPage {
229
+ page: Page;
230
+ parentTabLocator: Locator;
231
+ getTabTitleLocator: Locator;
232
+ closeIcon: Locator;
196
233
  constructor(page: Page);
197
- createNewApplicationDirectory(): Promise<void>;
234
+ assertActiveTabSelector(expectedCiType: string): Promise<void>;
235
+ closeActiveTabs(): Promise<void>;
236
+ }
237
+ declare class ExplorerMenu extends Menu {
238
+ page: Page;
239
+ applicationLocator: Locator;
240
+ environmentLocator: Locator;
241
+ constructor(page: Page);
242
+ /**
243
+ * Click on application CI in contextual-menu option.
244
+ */
245
+ clickApplicationCi(): Promise<void>;
246
+ /**
247
+ * Click on application CI in contextual-menu option.
248
+ */
249
+ clickEnvironmentCi(): Promise<void>;
250
+ /**
251
+ * Click on menu items from contextual-menu option using path navigation option
252
+ * @param path: Provide menu navigation path using array
253
+ * eg: ['new','Application'] -> to click on menu to create new application
254
+ */
255
+ clickMenuPath(path: any): Promise<void>;
256
+ }
257
+ declare class Form extends Section {
258
+ constructor(mainContentRootLocator: Locator);
259
+ fillTextInput(textInput: Locator, textValue: string): Promise<void>;
260
+ }
261
+ declare class ExplorerForm extends Form {
262
+ page: Page;
263
+ inputName: Locator;
264
+ inputLatestVersion: Locator;
265
+ saveButton: Locator;
266
+ saveAndCloseButton: Locator;
267
+ cancelButton: Locator;
268
+ errorMessage: Locator;
269
+ formSection: Locator;
270
+ constructor(page: Page);
271
+ /**
272
+ * Enter name in name field of the application form
273
+ * @param name
274
+ * @returns
275
+ */
276
+ enterName(name: string): Promise<void>;
277
+ /**
278
+ * Enter latest version field
279
+ * @param version
280
+ * @returns
281
+ */
282
+ enterLatestVersion(version: string): Promise<void>;
283
+ /**
284
+ * Click save button
285
+ * @returns
286
+ */
287
+ clickSave(): Promise<void>;
288
+ /**
289
+ * Click save and close button
290
+ * @returns
291
+ */
292
+ clickSaveAndClose(): Promise<void>;
293
+ /**
294
+ * Click cancel button
295
+ * @returns
296
+ */
297
+ clickCancel(): Promise<void>;
298
+ /**
299
+ * Expecting save button is disabled
300
+ * @returns
301
+ */
302
+ assertSaveButtonIsDisabled(): Promise<void>;
303
+ /**
304
+ * Expecting Save and close button is disabled
305
+ * @returns
306
+ */
307
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
308
+ /**
309
+ * Verify Error message in the form
310
+ * @param errorMsg
311
+ * @returns
312
+ */
313
+ verifyErrorMessage(errorMsg: string): Promise<void>;
314
+ /**
315
+ * Verify field value in form using field name
316
+ * @param fieldName
317
+ * @param expectedValue
318
+ * @returns
319
+ */
320
+ verifyFieldValue(fieldName: string, expectedValue: string): Promise<void>;
321
+ }
322
+ declare class Modal extends Section {
323
+ header: Locator;
324
+ body: Locator;
325
+ footer: Locator;
326
+ constructor(page: Page);
327
+ }
328
+ declare class ExplorerModal extends Modal {
329
+ deleteButton: Locator;
330
+ cancelButton: Locator;
331
+ constructor(page: Page);
332
+ clickDelete(): Promise<void>;
333
+ clickCancel(): Promise<void>;
334
+ }
335
+ declare class ExplorerUtil {
336
+ page: Page;
337
+ contextMenu: ExplorerMenu;
338
+ tab: Tab;
339
+ form: ExplorerForm;
340
+ modal: ExplorerModal;
341
+ constructor(page: Page);
342
+ /**
343
+ * Create new ci under any explorer package by providing following parameters.
344
+ * @param parentNodeId
345
+ * @param menuPath
346
+ * @param expectedCiType
347
+ * @param fieldName
348
+ */
349
+ createNewCi(parentNodeId: string, menuPath: any, fieldName: string): Promise<void>;
350
+ /**
351
+ * Expand the ci path tree toggler.
352
+ * @param pathnode
353
+ */
354
+ expandNode(pathnode: string): Promise<void>;
355
+ /**
356
+ * expands the path of CI by separating path from "/"
357
+ * @param parentNodeId
358
+ */
359
+ expandNodePath(parentNodeId: string): Promise<void>;
360
+ /**
361
+ * Collapse the tree toggler of ci path.
362
+ * @param parentNodeId
363
+ */
364
+ collapseNode(parentNodeId: string): Promise<void>;
365
+ /**
366
+ * Delete the ci
367
+ * @param node
368
+ */
369
+ deleteCi(node: string): Promise<void>;
370
+ /**
371
+ * Click on specific node which is under Application CI.
372
+ * @param nodeId
373
+ */
374
+ clickNode(nodeId: string): Promise<void>;
375
+ /**
376
+ * Click on ci under any explorer package of contextual menus by providing following parameters.
377
+ * @param parentNodeId
378
+ * @param menuPath
379
+ * @param expectedCiType
380
+ * @param fieldName
381
+ */
382
+ clickCi(parentNodeId: string, menuPath: any, expectedCiType: string): Promise<void>;
383
+ }
384
+ declare class ApplicationForm extends Form {
385
+ page: Page;
386
+ inputName: Locator;
387
+ inputLatestVersion: Locator;
388
+ saveButton: Locator;
389
+ saveAndCloseButton: Locator;
390
+ cancelButton: Locator;
391
+ formSection: Locator;
392
+ constructor(page: Page);
393
+ /**
394
+ * Enter name in name field of the application form
395
+ * @param name
396
+ * @returns
397
+ */
398
+ enterName(name: string): Promise<void>;
399
+ /**
400
+ * Enter latest version field
401
+ * @param version
402
+ * @returns
403
+ */
404
+ enterLatestVersion(version: string): Promise<void>;
405
+ /**
406
+ * Click save button
407
+ * @returns
408
+ */
409
+ clickSave(): Promise<void>;
410
+ /**
411
+ * Click save and close button
412
+ * @returns
413
+ */
414
+ clickSaveAndClose(): Promise<void>;
415
+ /**
416
+ * Click cancel button
417
+ * @returns
418
+ */
419
+ clickCancel(): Promise<void>;
420
+ /**
421
+ * Expecting save button is disabled
422
+ * @returns
423
+ */
424
+ assertSaveButtonIsDisabled(): Promise<void>;
425
+ /**
426
+ * Expecting Save and close button is disabled
427
+ * @returns
428
+ */
429
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
198
430
  }
199
431
  declare class ApplicationPage extends WithPage {
200
- appMenu: ApplicationMenu;
432
+ contextMenu: ExplorerMenu;
433
+ form: ExplorerForm;
434
+ tab: Tab;
435
+ modal: ExplorerModal;
436
+ commonUtil: ExplorerUtil;
437
+ util: ApplicationUtil;
438
+ appForm: ApplicationForm;
201
439
  constructor(page: Page);
202
440
  }
203
441
  declare class HomePage extends WithPage {
204
442
  constructor(page: Page);
205
443
  }
444
+ declare class ConfigurationForm extends Form {
445
+ page: Page;
446
+ inputName: Locator;
447
+ inputLatestVersion: Locator;
448
+ saveButton: Locator;
449
+ saveAndCloseButton: Locator;
450
+ cancelButton: Locator;
451
+ inputHost: Locator;
452
+ inputPort: Locator;
453
+ inputUsername: Locator;
454
+ inputPassword: Locator;
455
+ inputFromAddress: Locator;
456
+ inputTestAddress: Locator;
457
+ inputHostName: Locator;
458
+ constructor(page: Page);
459
+ /**
460
+ * Enter name in name field of the configuration form
461
+ * @param name
462
+ * @returns
463
+ */
464
+ enterName(name: string): Promise<void>;
465
+ /**
466
+ * Enter latest version field
467
+ * @param version
468
+ * @returns
469
+ */
470
+ enterLatestVersion(version: string): Promise<void>;
471
+ /**
472
+ * Click save button
473
+ * @returns
474
+ */
475
+ clickSave(): Promise<void>;
476
+ /**
477
+ * Click save and close button
478
+ * @returns
479
+ */
480
+ clickSaveAndClose(): Promise<void>;
481
+ /**
482
+ * Click cancel button
483
+ * @returns
484
+ */
485
+ clickCancel(): Promise<void>;
486
+ /**
487
+ * Expecting save button is disabled
488
+ * @returns
489
+ */
490
+ assertSaveButtonIsDisabled(): Promise<void>;
491
+ /**
492
+ * Expecting Save and close button is disabled
493
+ * @returns
494
+ */
495
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
496
+ /**
497
+ * Expecting field value with its field name
498
+ * @param fieldName
499
+ * @param value
500
+ * @returns
501
+ */
502
+ expectFieldValue(fieldName: string, value: string): Promise<void>;
503
+ /**
504
+ * Set Host value to the Host field in configuration form
505
+ * @param host
506
+ * @returns
507
+ */
508
+ setHostValue(host: string): Promise<void>;
509
+ /**
510
+ * Setting port value in the configuration form
511
+ * @param port
512
+ * @returns
513
+ */
514
+ setPortValue(port: string): Promise<void>;
515
+ /**
516
+ * Setting from Address field value in configuration form
517
+ * @param address
518
+ * @returns
519
+ */
520
+ setFromAddress(address: string): Promise<void>;
521
+ /**
522
+ * Setting username in configuration form
523
+ * @param username
524
+ * @returns
525
+ */
526
+ setUserName(username: string): Promise<void>;
527
+ /**
528
+ * Setting password in configuration form
529
+ * @param password
530
+ * @returns
531
+ */
532
+ setPassword(password: string): Promise<void>;
533
+ /**
534
+ * Setting host name in configuration form
535
+ * @param hostname
536
+ * @returns
537
+ */
538
+ setHostName(hostname: string): Promise<void>;
539
+ }
540
+ declare class ConfigurationUtil {
541
+ page: Page;
542
+ configPage: ConfigurationPage;
543
+ constructor(page1: ConfigurationPage, page: Page);
544
+ }
545
+ declare class ConfigurationPage extends WithPage {
546
+ contextMenu: ExplorerMenu;
547
+ form: ExplorerForm;
548
+ tab: Tab;
549
+ modal: ExplorerModal;
550
+ commonUtil: ExplorerUtil;
551
+ configForm: ConfigurationForm;
552
+ util: ConfigurationUtil;
553
+ constructor(page: Page);
554
+ }
555
+ declare class EnvironmentForm extends Form {
556
+ page: Page;
557
+ formSection: Locator;
558
+ inputName: Locator;
559
+ inputLatestVersion: Locator;
560
+ saveButton: Locator;
561
+ saveAndCloseButton: Locator;
562
+ cancelButton: Locator;
563
+ inputVersion: Locator;
564
+ constructor(page: Page);
565
+ /**
566
+ * Expect the label text is available in form.
567
+ * @param label
568
+ */
569
+ assertLabelText(label: string): Promise<void>;
570
+ /**
571
+ * Enter name in name field of the application form
572
+ * @param name
573
+ * @returns
574
+ */
575
+ enterName(name: string): Promise<void>;
576
+ /**
577
+ * Enter latest version field
578
+ * @param version
579
+ * @returns
580
+ */
581
+ enterLatestVersion(version: string): Promise<void>;
582
+ /**
583
+ * Click save button
584
+ * @returns
585
+ */
586
+ clickSave(): Promise<void>;
587
+ /**
588
+ * Click save and close button
589
+ * @returns
590
+ */
591
+ clickSaveAndClose(): Promise<void>;
592
+ /**
593
+ * Click cancel button
594
+ * @returns
595
+ */
596
+ clickCancel(): Promise<void>;
597
+ /**
598
+ * Expecting save button is disabled
599
+ * @returns
600
+ */
601
+ assertSaveButtonIsDisabled(): Promise<void>;
602
+ /**
603
+ * Expecting Save and close button is disabled
604
+ * @returns
605
+ */
606
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
607
+ /**
608
+ * Enter options in the input field of dropdown to match with suggestion list in form
609
+ * @param fieldName
610
+ * @param value
611
+ */
612
+ selectVersionOption(fieldName: string, value: string): Promise<void>;
613
+ }
614
+ declare class EnvironmentUtil {
615
+ page: Page;
616
+ environmentPage: EnvironmentPage;
617
+ constructor(page1: EnvironmentPage, page: Page);
618
+ }
619
+ declare class EnvironmentPage extends WithPage {
620
+ contextMenu: ExplorerMenu;
621
+ form: ExplorerForm;
622
+ tab: Tab;
623
+ modal: ExplorerModal;
624
+ commonUtil: ExplorerUtil;
625
+ envForm: EnvironmentForm;
626
+ util: EnvironmentUtil;
627
+ constructor(page: Page);
628
+ }
629
+ declare class InfraPage extends WithPage {
630
+ contextMenu: ExplorerMenu;
631
+ form: ExplorerForm;
632
+ tab: Tab;
633
+ modal: ExplorerModal;
634
+ commonUtil: ExplorerUtil;
635
+ constructor(page: Page);
636
+ }
206
637
  type deployFixtures = {
207
638
  applicationPage: ApplicationPage;
639
+ configurePage: ConfigurationPage;
640
+ environmentPage: EnvironmentPage;
208
641
  homePage: HomePage;
642
+ infraPage: InfraPage;
209
643
  loginPage: LoginPage;
644
+ tab: Tab;
210
645
  };
211
646
  export const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & deployFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
212
647