@digital-ai/devops-page-object-deploy 0.0.3 → 0.0.5

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
@@ -204,17 +204,75 @@ declare class LoginPage extends WithPage {
204
204
  constructor(page: Page);
205
205
  login(user: string, pwd: string): Promise<void>;
206
206
  }
207
- 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;
233
+ tabSelector: Locator;
234
+ tabTitle: Locator;
235
+ constructor(page: Page);
236
+ /**
237
+ * Assert active tab title with expected value.
238
+ * @param expectedCiType
239
+ * @returns
240
+ */
241
+ assertActiveTabSelector(expectedCiType: string): Promise<void>;
242
+ /**
243
+ * Close the active tab by clicking close button
244
+ */
245
+ closeActiveTabs(): Promise<void>;
246
+ /**
247
+ * Verify there is no tabs are opened.
248
+ */
249
+ noTabsOpened(): Promise<void>;
250
+ /**
251
+ * Expect the given tab title is present in tab opened
252
+ * @param tabTitle
253
+ * @returns
254
+ */
255
+ expectTabOpened(tabTitle: string): Promise<void>;
256
+ /**
257
+ * Expect the given tab title is not present in tab opened
258
+ * @param tabTitle
259
+ * @returns
260
+ */
261
+ expectTabNotOpened(tabTitle: string): Promise<void>;
262
+ }
263
+ declare class ExplorerMenu extends Menu {
208
264
  page: Page;
209
- newlinkLocator: Locator;
210
- importlinkLocator: Locator;
211
265
  applicationLocator: Locator;
212
- deleteLinkLocator: Locator;
266
+ environmentLocator: Locator;
213
267
  constructor(page: Page);
214
268
  /**
215
269
  * Click on application CI in contextual-menu option.
216
270
  */
217
271
  clickApplicationCi(): Promise<void>;
272
+ /**
273
+ * Click on application CI in contextual-menu option.
274
+ */
275
+ clickEnvironmentCi(): Promise<void>;
218
276
  /**
219
277
  * Click on menu items from contextual-menu option using path navigation option
220
278
  * @param path: Provide menu navigation path using array
@@ -226,13 +284,17 @@ declare class Form extends Section {
226
284
  constructor(mainContentRootLocator: Locator);
227
285
  fillTextInput(textInput: Locator, textValue: string): Promise<void>;
228
286
  }
229
- declare class ApplicationForm extends Form {
287
+ declare class ExplorerForm extends Form {
230
288
  page: Page;
231
289
  inputName: Locator;
232
290
  inputLatestVersion: Locator;
233
291
  saveButton: Locator;
234
292
  saveAndCloseButton: Locator;
235
293
  cancelButton: Locator;
294
+ errorMessage: Locator;
295
+ formSection: Locator;
296
+ refreshButton: Locator;
297
+ inputRename: Locator;
236
298
  constructor(page: Page);
237
299
  /**
238
300
  * Enter name in name field of the application form
@@ -271,35 +333,48 @@ declare class ApplicationForm extends Form {
271
333
  * @returns
272
334
  */
273
335
  assertSaveAndCloseButtonIsDisabled(): Promise<void>;
274
- }
275
- declare class ApplicationUtil {
276
- page: Page;
277
- applicationPage: ApplicationPage;
278
- constructor(page1: ApplicationPage, page: Page);
279
- /**
280
- * Create New directory under applications CI.
281
- * @param appDirectoryName
282
- * @param expectedCiType
283
- */
284
- createNewApplicationDirectory(appDirectoryName: string, expectedCiType: string): Promise<void>;
285
336
  /**
286
- * Create new application under Application ci
287
- * @param appName
288
- * @param expectedCiType
337
+ * Verify Error message in the form
338
+ * @param errorMsg
339
+ * @returns
289
340
  */
290
- createNewApplication(appName: string, expectedCiType: string): Promise<void>;
341
+ verifyErrorMessage(errorMsg: string): Promise<void>;
291
342
  /**
292
- * TODO: It is half done just to check on menu path other than new. Need to create as per scenario.
343
+ * Verify field value in form using field name
344
+ * @param fieldName
345
+ * @param expectedValue
346
+ * @returns
293
347
  */
294
- createFromFileImport(): Promise<void>;
348
+ verifyFieldValue(fieldName: string, expectedValue: string): Promise<void>;
349
+ }
350
+ declare class Modal extends Section {
351
+ header: Locator;
352
+ body: Locator;
353
+ footer: Locator;
354
+ constructor(page: Page);
355
+ }
356
+ declare class ExplorerModal extends Modal {
357
+ deleteButton: Locator;
358
+ cancelButton: Locator;
359
+ constructor(page: Page);
360
+ clickDelete(): Promise<void>;
361
+ clickCancel(): Promise<void>;
362
+ }
363
+ declare class ExplorerUtil {
364
+ page: Page;
365
+ contextMenu: ExplorerMenu;
366
+ tab: Tab;
367
+ form: ExplorerForm;
368
+ modal: ExplorerModal;
369
+ constructor(page: Page);
295
370
  /**
296
- * Create new ci (application, package) under applications by providing following parameters.
371
+ * Create new ci under any explorer package by providing following parameters.
297
372
  * @param parentNodeId
298
373
  * @param menuPath
299
374
  * @param expectedCiType
300
- * @param appName
375
+ * @param fieldName
301
376
  */
302
- createNewCi(parentNodeId: string, menuPath: any, appName: string): Promise<void>;
377
+ createNewCi(parentNodeId: string, menuPath: any, fieldName: string): Promise<void>;
303
378
  /**
304
379
  * Expand the ci path tree toggler.
305
380
  * @param pathnode
@@ -320,41 +395,327 @@ declare class ApplicationUtil {
320
395
  * @param node
321
396
  */
322
397
  deleteCi(node: string): Promise<void>;
398
+ /**
399
+ * Click on specific node which is under Application CI.
400
+ * @param nodeId
401
+ */
402
+ clickNode(nodeId: string): Promise<void>;
403
+ /**
404
+ * Click on ci under any explorer package of contextual menus by providing following parameters.
405
+ * @param parentNodeId
406
+ * @param menuPath
407
+ * @param expectedCiType
408
+ * @param fieldName
409
+ */
410
+ clickCi(parentNodeId: string, menuPath: any, expectedCiType: string): Promise<void>;
411
+ /**
412
+ * Duplicate the CI node in explorer using context-menu
413
+ * @param nodeId
414
+ */
415
+ duplicate(nodeId: string): Promise<void>;
416
+ /**
417
+ * Validate the given node ID is visible in the page
418
+ * @param nodeId
419
+ */
420
+ validateNodeExists(nodeId: string): Promise<void>;
421
+ /**
422
+ * Validate the given node does not exists in the list.
423
+ * @param nodeId
424
+ */
425
+ validateNodeDoesNotExists(nodeId: string): Promise<void>;
426
+ /**
427
+ * Rename the node Id with new string in CI.
428
+ * @param nodeId
429
+ * @param renamedValue
430
+ */
431
+ inlineRename(nodeId: string, renamedValue: string): Promise<void>;
432
+ /**
433
+ * Open CI from explorer
434
+ * @param nodeId
435
+ */
436
+ openCi(nodeId: string): Promise<void>;
437
+ /**
438
+ * Select the CI which need to get deleted.
439
+ * @param nodeId
440
+ */
441
+ selectDeleteCi(nodeId: string): Promise<void>;
442
+ /**
443
+ * Click cancel button on modal window to cancel deletion.
444
+ */
445
+ clickCancelAndWait(): Promise<void>;
446
+ /**
447
+ * Click Delete button on modal window to delete the CI
448
+ */
449
+ clickConfirmAndWait(): Promise<void>;
323
450
  }
324
- declare class Tab extends WithPage {
451
+ declare class ApplicationForm extends Form {
325
452
  page: Page;
326
- parentTabLocator: Locator;
327
- getTabTitleLocator: Locator;
453
+ inputName: Locator;
454
+ inputLatestVersion: Locator;
455
+ saveButton: Locator;
456
+ saveAndCloseButton: Locator;
457
+ cancelButton: Locator;
458
+ formSection: Locator;
459
+ addButton: Locator;
328
460
  constructor(page: Page);
329
- assertActiveTabSelector(expectedCiType: string): Promise<void>;
461
+ /**
462
+ * Enter name in name field of the application form
463
+ * @param name
464
+ * @returns
465
+ */
466
+ enterName(name: string): Promise<void>;
467
+ /**
468
+ * Enter latest version field
469
+ * @param version
470
+ * @returns
471
+ */
472
+ enterLatestVersion(version: string): Promise<void>;
473
+ /**
474
+ * Click save button
475
+ * @returns
476
+ */
477
+ clickSave(): Promise<void>;
478
+ /**
479
+ * Click save and close button
480
+ * @returns
481
+ */
482
+ clickSaveAndClose(): Promise<void>;
483
+ /**
484
+ * Click cancel button
485
+ * @returns
486
+ */
487
+ clickCancel(): Promise<void>;
488
+ /**
489
+ * Expecting save button is disabled
490
+ * @returns
491
+ */
492
+ assertSaveButtonIsDisabled(): Promise<void>;
493
+ /**
494
+ * Expecting Save and close button is disabled
495
+ * @returns
496
+ */
497
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
498
+ /**
499
+ * Enter Field Values using its label value around application forms
500
+ * @param fieldName
501
+ * @param expectedValue
502
+ * @returns
503
+ */
504
+ addFieldValue(fieldName: string, expectedValue: string): Promise<void>;
505
+ addOrchestrator(fieldValue: string): Promise<void>;
330
506
  }
331
- declare class Modal extends Section {
332
- header: Locator;
333
- body: Locator;
334
- footer: Locator;
507
+ declare class ApplicationPage extends WithPage {
508
+ contextMenu: ExplorerMenu;
509
+ form: ExplorerForm;
510
+ tab: Tab;
511
+ modal: ExplorerModal;
512
+ commonUtil: ExplorerUtil;
513
+ util: ApplicationUtil;
514
+ appForm: ApplicationForm;
335
515
  constructor(page: Page);
336
516
  }
337
- declare class ApplicationModal extends Modal {
338
- deleteButton: Locator;
517
+ declare class HomePage extends WithPage {
518
+ constructor(page: Page);
519
+ }
520
+ declare class ConfigurationForm extends Form {
521
+ page: Page;
522
+ inputName: Locator;
523
+ inputLatestVersion: Locator;
524
+ saveButton: Locator;
525
+ saveAndCloseButton: Locator;
339
526
  cancelButton: Locator;
527
+ inputHost: Locator;
528
+ inputPort: Locator;
529
+ inputUsername: Locator;
530
+ inputPassword: Locator;
531
+ inputFromAddress: Locator;
532
+ inputTestAddress: Locator;
533
+ inputHostName: Locator;
340
534
  constructor(page: Page);
341
- clickDelete(): Promise<void>;
535
+ /**
536
+ * Enter name in name field of the configuration form
537
+ * @param name
538
+ * @returns
539
+ */
540
+ enterName(name: string): Promise<void>;
541
+ /**
542
+ * Enter latest version field
543
+ * @param version
544
+ * @returns
545
+ */
546
+ enterLatestVersion(version: string): Promise<void>;
547
+ /**
548
+ * Click save button
549
+ * @returns
550
+ */
551
+ clickSave(): Promise<void>;
552
+ /**
553
+ * Click save and close button
554
+ * @returns
555
+ */
556
+ clickSaveAndClose(): Promise<void>;
557
+ /**
558
+ * Click cancel button
559
+ * @returns
560
+ */
342
561
  clickCancel(): Promise<void>;
562
+ /**
563
+ * Expecting save button is disabled
564
+ * @returns
565
+ */
566
+ assertSaveButtonIsDisabled(): Promise<void>;
567
+ /**
568
+ * Expecting Save and close button is disabled
569
+ * @returns
570
+ */
571
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
572
+ /**
573
+ * Expecting field value with its field name
574
+ * @param fieldName
575
+ * @param value
576
+ * @returns
577
+ */
578
+ expectFieldValue(fieldName: string, value: string): Promise<void>;
579
+ /**
580
+ * Set Host value to the Host field in configuration form
581
+ * @param host
582
+ * @returns
583
+ */
584
+ setHostValue(host: string): Promise<void>;
585
+ /**
586
+ * Setting port value in the configuration form
587
+ * @param port
588
+ * @returns
589
+ */
590
+ setPortValue(port: string): Promise<void>;
591
+ /**
592
+ * Setting from Address field value in configuration form
593
+ * @param address
594
+ * @returns
595
+ */
596
+ setFromAddress(address: string): Promise<void>;
597
+ /**
598
+ * Setting username in configuration form
599
+ * @param username
600
+ * @returns
601
+ */
602
+ setUserName(username: string): Promise<void>;
603
+ /**
604
+ * Setting password in configuration form
605
+ * @param password
606
+ * @returns
607
+ */
608
+ setPassword(password: string): Promise<void>;
609
+ /**
610
+ * Setting host name in configuration form
611
+ * @param hostname
612
+ * @returns
613
+ */
614
+ setHostName(hostname: string): Promise<void>;
343
615
  }
344
- declare class ApplicationPage extends WithPage {
345
- appMenu: ApplicationMenu;
346
- appForm: ApplicationForm;
616
+ declare class ConfigurationUtil {
617
+ page: Page;
618
+ configPage: ConfigurationPage;
619
+ constructor(page1: ConfigurationPage, page: Page);
620
+ }
621
+ declare class ConfigurationPage extends WithPage {
622
+ contextMenu: ExplorerMenu;
623
+ form: ExplorerForm;
347
624
  tab: Tab;
348
- util: ApplicationUtil;
349
- appModal: ApplicationModal;
625
+ modal: ExplorerModal;
626
+ commonUtil: ExplorerUtil;
627
+ configForm: ConfigurationForm;
628
+ util: ConfigurationUtil;
350
629
  constructor(page: Page);
351
630
  }
352
- declare class HomePage extends WithPage {
631
+ declare class EnvironmentForm extends Form {
632
+ page: Page;
633
+ formSection: Locator;
634
+ inputName: Locator;
635
+ inputLatestVersion: Locator;
636
+ saveButton: Locator;
637
+ saveAndCloseButton: Locator;
638
+ cancelButton: Locator;
639
+ inputVersion: Locator;
640
+ constructor(page: Page);
641
+ /**
642
+ * Expect the label text is available in form.
643
+ * @param label
644
+ */
645
+ assertLabelText(label: string): Promise<void>;
646
+ /**
647
+ * Enter name in name field of the application form
648
+ * @param name
649
+ * @returns
650
+ */
651
+ enterName(name: string): Promise<void>;
652
+ /**
653
+ * Enter latest version field
654
+ * @param version
655
+ * @returns
656
+ */
657
+ enterLatestVersion(version: string): Promise<void>;
658
+ /**
659
+ * Click save button
660
+ * @returns
661
+ */
662
+ clickSave(): Promise<void>;
663
+ /**
664
+ * Click save and close button
665
+ * @returns
666
+ */
667
+ clickSaveAndClose(): Promise<void>;
668
+ /**
669
+ * Click cancel button
670
+ * @returns
671
+ */
672
+ clickCancel(): Promise<void>;
673
+ /**
674
+ * Expecting save button is disabled
675
+ * @returns
676
+ */
677
+ assertSaveButtonIsDisabled(): Promise<void>;
678
+ /**
679
+ * Expecting Save and close button is disabled
680
+ * @returns
681
+ */
682
+ assertSaveAndCloseButtonIsDisabled(): Promise<void>;
683
+ /**
684
+ * Enter options in the input field of dropdown to match with suggestion list in form
685
+ * @param fieldName
686
+ * @param value
687
+ */
688
+ selectVersionOption(fieldName: string, value: string): Promise<void>;
689
+ }
690
+ declare class EnvironmentUtil {
691
+ page: Page;
692
+ environmentPage: EnvironmentPage;
693
+ constructor(page1: EnvironmentPage, page: Page);
694
+ }
695
+ declare class EnvironmentPage extends WithPage {
696
+ contextMenu: ExplorerMenu;
697
+ form: ExplorerForm;
698
+ tab: Tab;
699
+ modal: ExplorerModal;
700
+ commonUtil: ExplorerUtil;
701
+ envForm: EnvironmentForm;
702
+ util: EnvironmentUtil;
703
+ constructor(page: Page);
704
+ }
705
+ declare class InfraPage extends WithPage {
706
+ contextMenu: ExplorerMenu;
707
+ form: ExplorerForm;
708
+ tab: Tab;
709
+ modal: ExplorerModal;
710
+ commonUtil: ExplorerUtil;
353
711
  constructor(page: Page);
354
712
  }
355
713
  type deployFixtures = {
356
714
  applicationPage: ApplicationPage;
715
+ configurePage: ConfigurationPage;
716
+ environmentPage: EnvironmentPage;
357
717
  homePage: HomePage;
718
+ infraPage: InfraPage;
358
719
  loginPage: LoginPage;
359
720
  tab: Tab;
360
721
  };