@sapui5/sap.fe.test 1.95.0 → 1.98.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.
Files changed (74) hide show
  1. package/package.json +4 -3
  2. package/src/sap/fe/test/.library +1 -1
  3. package/src/sap/fe/test/BaseActions.js +1 -1
  4. package/src/sap/fe/test/BaseArrangements.js +1 -1
  5. package/src/sap/fe/test/BaseAssertions.js +1 -1
  6. package/src/sap/fe/test/ConfirmDialog.js +1 -1
  7. package/src/sap/fe/test/FCLView.js +1 -7
  8. package/src/sap/fe/test/Flexibility.js +46 -12
  9. package/src/sap/fe/test/FlexibleColumnLayout.js +1 -1
  10. package/src/sap/fe/test/JestTemplatingHelper.js +99 -6
  11. package/src/sap/fe/test/JestTemplatingHelper.ts +65 -3
  12. package/src/sap/fe/test/JourneyRunner.js +9 -4
  13. package/src/sap/fe/test/ListReport.js +9 -15
  14. package/src/sap/fe/test/LocationUtil.js +1 -1
  15. package/src/sap/fe/test/ObjectPage.js +60 -50
  16. package/src/sap/fe/test/Shell.js +17 -12
  17. package/src/sap/fe/test/Stubs.js +1 -1
  18. package/src/sap/fe/test/TemplatePage.js +1 -13
  19. package/src/sap/fe/test/TemplatingTestUtils.js +2 -2
  20. package/src/sap/fe/test/UI5MockHelper.js +405 -0
  21. package/src/sap/fe/test/UI5MockHelper.ts +246 -0
  22. package/src/sap/fe/test/Utils.js +6 -14
  23. package/src/sap/fe/test/api/APIHelper.js +1 -1
  24. package/src/sap/fe/test/api/BaseAPI.js +23 -8
  25. package/src/sap/fe/test/api/ChartActions.js +1 -1
  26. package/src/sap/fe/test/api/ChartAssertions.js +6 -2
  27. package/src/sap/fe/test/api/DialogAPI.js +10 -6
  28. package/src/sap/fe/test/api/DialogActions.js +19 -6
  29. package/src/sap/fe/test/api/DialogAssertions.js +26 -6
  30. package/src/sap/fe/test/api/DialogCreateActions.js +1 -1
  31. package/src/sap/fe/test/api/DialogCreateAssertions.js +1 -1
  32. package/src/sap/fe/test/api/DialogMessageActions.js +1 -1
  33. package/src/sap/fe/test/api/DialogMessageAssertions.js +1 -1
  34. package/src/sap/fe/test/api/DialogType.js +1 -1
  35. package/src/sap/fe/test/api/DialogValueHelpActions.js +1 -1
  36. package/src/sap/fe/test/api/DialogValueHelpAssertions.js +1 -1
  37. package/src/sap/fe/test/api/EditState.js +10 -1
  38. package/src/sap/fe/test/api/FilterBarAPI.js +1 -1
  39. package/src/sap/fe/test/api/FilterBarActions.js +39 -5
  40. package/src/sap/fe/test/api/FilterBarAssertions.js +1 -1
  41. package/src/sap/fe/test/api/FooterAPI.js +1 -1
  42. package/src/sap/fe/test/api/FooterActionsBase.js +1 -1
  43. package/src/sap/fe/test/api/FooterActionsOP.js +1 -1
  44. package/src/sap/fe/test/api/FooterAssertionsBase.js +1 -1
  45. package/src/sap/fe/test/api/FooterAssertionsOP.js +1 -1
  46. package/src/sap/fe/test/api/FormAPI.js +1 -1
  47. package/src/sap/fe/test/api/FormActions.js +1 -1
  48. package/src/sap/fe/test/api/FormAssertions.js +34 -5
  49. package/src/sap/fe/test/api/HeaderAPI.js +1 -1
  50. package/src/sap/fe/test/api/HeaderActions.js +1 -1
  51. package/src/sap/fe/test/api/HeaderActionsLR.js +1 -1
  52. package/src/sap/fe/test/api/HeaderAssertions.js +1 -1
  53. package/src/sap/fe/test/api/HeaderAssertionsLR.js +1 -1
  54. package/src/sap/fe/test/api/HeaderLR.js +1 -1
  55. package/src/sap/fe/test/api/KPICardAPI.js +1 -1
  56. package/src/sap/fe/test/api/KPICardActions.js +42 -0
  57. package/src/sap/fe/test/api/KPICardAssertions.js +42 -16
  58. package/src/sap/fe/test/api/TableAPI.js +1 -1
  59. package/src/sap/fe/test/api/TableActions.js +2 -2
  60. package/src/sap/fe/test/api/TableAssertions.js +12 -1
  61. package/src/sap/fe/test/builder/DialogBuilder.js +1 -1
  62. package/src/sap/fe/test/builder/FEBuilder.js +1 -1
  63. package/src/sap/fe/test/builder/KPIBuilder.js +28 -3
  64. package/src/sap/fe/test/builder/MacroFieldBuilder.js +1 -1
  65. package/src/sap/fe/test/builder/MdcFieldBuilder.js +1 -1
  66. package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +1 -1
  67. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +1 -1
  68. package/src/sap/fe/test/builder/MdcTableBuilder.js +23 -1
  69. package/src/sap/fe/test/builder/OverflowToolbarBuilder.js +1 -1
  70. package/src/sap/fe/test/builder/VMBuilder.js +1 -1
  71. package/src/sap/fe/test/internal/FEArrangements.js +1 -1
  72. package/src/sap/fe/test/internal/FEJourneyRunner.js +1 -1
  73. package/src/sap/fe/test/library.js +2 -2
  74. package/src/sap/fe/test/massEdit.js +1 -1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -17,7 +17,8 @@ sap.ui.define(
17
17
  "sap/fe/test/api/FooterAssertionsBase",
18
18
  "sap/fe/test/api/HeaderActionsLR",
19
19
  "sap/fe/test/api/HeaderAssertionsLR",
20
- "sap/fe/test/api/KPICardAssertions"
20
+ "sap/fe/test/api/KPICardAssertions",
21
+ "sap/fe/test/api/KPICardActions"
21
22
  ],
22
23
  function(
23
24
  Utils,
@@ -33,7 +34,8 @@ sap.ui.define(
33
34
  FooterAssertionsBase,
34
35
  HeaderActionsLR,
35
36
  HeaderAssertionsLR,
36
- KPICardAssertions
37
+ KPICardAssertions,
38
+ KPICardActions
37
39
  ) {
38
40
  "use strict";
39
41
 
@@ -131,6 +133,9 @@ sap.ui.define(
131
133
  id: sChartId
132
134
  });
133
135
  },
136
+ onKPICard: function() {
137
+ return new KPICardActions(KPIBuilder.create(this));
138
+ },
134
139
  /**
135
140
  * Returns a {@link sap.fe.test.api.FilterBarActions} instance.
136
141
  *
@@ -350,7 +355,7 @@ sap.ui.define(
350
355
  },
351
356
  iSeeFlpLink: function(sDescription) {
352
357
  return OpaBuilder.create(this)
353
- .hasType("sap.ui.mdc.link.PanelListItem")
358
+ .hasType("sap.m.Link")
354
359
  .isDialogElement(true)
355
360
  .hasProperties({ text: sDescription })
356
361
  .description("FLP link with text '" + sDescription + "' is present")
@@ -527,17 +532,6 @@ sap.ui.define(
527
532
  .description("Seeing a value list of condition operators with " + numItems + " items.")
528
533
  .execute();
529
534
  },
530
- iCheckValueForFieldInCreateDialog: function(sFieldId, sValue, bIsRequired) {
531
- return FieldBuilder.create(this)
532
- .isDialogElement()
533
- .hasId(sFieldId)
534
- .hasValue(sValue)
535
- .hasProperties({ required: !!bIsRequired })
536
- .description(
537
- Utils.formatMessage("Seeing Create dialog parameter '{0}' with value '{1}'", sFieldId, sValue)
538
- )
539
- .execute();
540
- },
541
535
  iSeeKPI: function(sTitle, oProperties) {
542
536
  var sDescription = "Seeing KPI '" + sTitle + "'";
543
537
  if (oProperties) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"], function(OpaBuilder, Opa5, Utils) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -297,13 +297,15 @@ sap.ui.define(
297
297
  .execute();
298
298
  },
299
299
  iEnableLink: function(sText) {
300
- return OpaBuilder.create(this)
301
- .hasType("sap.m.ColumnListItem")
302
- .hasAggregationProperties("cells", { text: sText })
303
- .isDialogElement()
304
- .doPress("selectMulti")
305
- .description("The CheckBox for link " + sText + " is selected")
306
- .execute();
300
+ return (
301
+ OpaBuilder.create(this)
302
+ .hasType("sap.m.ColumnListItem")
303
+ //.hasAggregationProperties("cells", { text: sText })
304
+ .isDialogElement()
305
+ .doPress("selectMulti")
306
+ .description("The CheckBox for link " + sText + " is selected")
307
+ .execute()
308
+ );
307
309
  },
308
310
  iPressKeyboardShortcutOnSection: function(sShortcut, mProperties) {
309
311
  return this._iPressKeyboardShortcut(undefined, sShortcut, mProperties, "sap.uxap.ObjectPageSection");
@@ -408,16 +410,6 @@ sap.ui.define(
408
410
  .description("Comfirmed VHD opened in dialog")
409
411
  .execute();
410
412
  },
411
- iEnterValueForFieldInCreateDialog: function(sFieldId, sValue) {
412
- return OpaBuilder.create(this)
413
- .isDialogElement()
414
- .hasId(sFieldId)
415
- .doEnterText(sValue)
416
- .description(
417
- "Entering Text in the field '" + sFieldId + "'in the create dialog with value '" + sValue + "'"
418
- )
419
- .execute();
420
- },
421
413
  iClickOnMessageButton: function() {
422
414
  return OpaBuilder.create(this)
423
415
 
@@ -651,12 +643,52 @@ sap.ui.define(
651
643
  },
652
644
  iSeeFlpLink: function(sDescription) {
653
645
  return OpaBuilder.create(this)
654
- .hasType("sap.ui.mdc.link.PanelListItem")
646
+ .hasType("sap.m.Link")
655
647
  .isDialogElement(true)
656
648
  .hasProperties({ text: sDescription })
657
649
  .description("FLP link with text '" + sDescription + "' is present")
658
650
  .execute();
659
651
  },
652
+ iSeeSimpleFormWithLabel: function(sDescription) {
653
+ return OpaBuilder.create(this)
654
+ .hasType("sap.m.Label")
655
+ .isDialogElement(true)
656
+ .hasProperties({ text: sDescription })
657
+ .description("SimpleForm has label '" + sDescription + "' is present")
658
+ .execute();
659
+ },
660
+ iSeeSimpleFormWithText: function(sText) {
661
+ return OpaBuilder.create(this)
662
+ .hasType("sap.ui.layout.form.SimpleForm")
663
+ .isDialogElement(true)
664
+ .doOnChildren(
665
+ OpaBuilder.create(this)
666
+ .hasType("sap.m.Text")
667
+ .hasProperties({ text: sText })
668
+ )
669
+ .description("SimpleForm has text '" + sText + "' is present")
670
+ .execute();
671
+ },
672
+ iSeeSimpleFormWithLink: function(sText) {
673
+ return OpaBuilder.create(this)
674
+ .hasType("sap.ui.layout.form.SimpleForm")
675
+ .isDialogElement(true)
676
+ .doOnChildren(
677
+ OpaBuilder.create(this)
678
+ .hasType("sap.m.Link")
679
+ .hasProperties({ text: sText })
680
+ )
681
+ .description("SimpleForm has link '" + sText + "' is present")
682
+ .execute();
683
+ },
684
+ iSeeSimpleFormWithTitle: function(sTitle) {
685
+ return OpaBuilder.create(this)
686
+ .hasType("sap.ui.core.Title")
687
+ .isDialogElement(true)
688
+ .hasProperties({ text: sTitle })
689
+ .description("SimpleForm has label '" + sTitle + "' is present")
690
+ .execute();
691
+ },
660
692
  iSeeSelectLinksDialog: function() {
661
693
  return OpaBuilder.create(this)
662
694
  .hasType("sap.m.Title")
@@ -755,21 +787,6 @@ sap.ui.define(
755
787
  .description("Seeing variant title '" + sTitle + "'")
756
788
  .execute();
757
789
  },
758
- iCheckValueOfFieldInCreateDialog: function(sFieldId, sValue, sAdditionalValue, bIsRequired) {
759
- return FieldBuilder.create(this)
760
- .isDialogElement()
761
- .hasId(sFieldId)
762
- .hasValue(sValue, sAdditionalValue)
763
- .hasProperties({ required: !!bIsRequired })
764
- .description(
765
- Utils.formatMessage(
766
- "Seeing field '{0}' with value '{1}'",
767
- sFieldId,
768
- [].concat(sValue, sAdditionalValue || [])
769
- )
770
- )
771
- .execute();
772
- },
773
790
  iSeeMessageView: function() {
774
791
  return OpaBuilder.create(this)
775
792
  .hasType("sap.m.MessageView")
@@ -799,30 +816,23 @@ sap.ui.define(
799
816
  .hasType("sap.m.MessageView")
800
817
  .check(function(oMessageView) {
801
818
  var messages = oMessageView[0].getItems();
802
- return (
819
+ var bMessageObjectHasExpectedValues =
803
820
  messages[iMessagePosition].getGroupName() === oBoundMessageInfo.GroupLabel &&
804
821
  messages[iMessagePosition].getTitle() === oBoundMessageInfo.MessageText &&
805
822
  messages[iMessagePosition].getSubtitle() === oBoundMessageInfo.SubTitle &&
806
- messages[iMessagePosition].getActiveTitle() === oBoundMessageInfo.ActiveTitle
807
- );
823
+ messages[iMessagePosition].getActiveTitle() === oBoundMessageInfo.ActiveTitle;
824
+ if (oBoundMessageInfo.Description) {
825
+ return (
826
+ bMessageObjectHasExpectedValues &&
827
+ messages[iMessagePosition].getGroupName() === oBoundMessageInfo.GroupLabel
828
+ );
829
+ }
830
+ return bMessageObjectHasExpectedValues;
808
831
  }, true)
809
832
  .isDialogElement(true)
810
833
  .description("MessageItem is correctly displayed")
811
834
  .execute();
812
835
  },
813
-
814
- iCheckValueForFieldInCreateDialog: function(sFieldId, sValue, bIsRequired) {
815
- return FieldBuilder.create(this)
816
- .isDialogElement()
817
- .hasId(sFieldId)
818
- .hasValue(sValue)
819
- .hasProperties({ required: !!bIsRequired })
820
- .description(
821
- Utils.formatMessage("Seeing Create dialog parameter '{0}' with value '{1}'", sFieldId, sValue)
822
- )
823
- .execute();
824
- },
825
-
826
836
  iClickBackOnMessageView: function() {
827
837
  return OpaBuilder.create(this)
828
838
  .hasType("sap.m.MessageView")
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"], function(OpaBuilder, Opa5, Utils) {
6
6
  "use strict";
@@ -104,21 +104,26 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
104
104
  * @public
105
105
  */
106
106
  iPressTile: function(sTarget) {
107
- return OpaBuilder.create(this)
108
- .hasType("sap.ushell.ui.launchpad.Tile")
109
- .hasProperties({
110
- target: "#" + sTarget
111
- })
112
- .doPress()
113
- .description(Utils.formatMessage("Clicking on tile with target '{0}'", sTarget))
114
- .execute();
107
+ return this.waitFor({
108
+ controlType: "sap.ushell.ui.launchpad.Tile",
109
+ matchers: function(oTile) {
110
+ return oTile.getTarget() === "#" + sTarget;
111
+ },
112
+ actions: function(oTile) {
113
+ oTile
114
+ .getTileViews()[0]
115
+ .$()
116
+ .trigger("tap");
117
+ },
118
+ success: function(oTile) {
119
+ Opa5.assert.ok(true, Utils.formatMessage("Clicking on tile with target '{0}'", sTarget));
120
+ },
121
+ errorMessage: "Could not find the tile"
122
+ });
115
123
  },
116
124
  iOpenDefaultValues: function() {
117
125
  return OpaBuilder.create(this)
118
126
  .hasId("meAreaHeaderButton")
119
- .hasProperties({
120
- icon: "sap-icon://person-placeholder"
121
- })
122
127
  .doPress()
123
128
  .description("Opening FLP Default Values dialog")
124
129
  .execute();
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  /**
6
6
  * Actions and assertions to be used with a page hosted in an FCL
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -446,18 +446,6 @@ sap.ui.define(
446
446
  )
447
447
  .execute();
448
448
  },
449
- iSeeActionParameterContent: function(sFieldName, sContent) {
450
- var sFieldId = "APD_::" + sFieldName + "-inner",
451
- oBuilder = OpaBuilder.create(this)
452
- .hasId(sFieldId)
453
- .isDialogElement()
454
- .description("Seeing Action parameter '" + sFieldName + "' with content '" + sContent + "'");
455
-
456
- if (sContent) {
457
- oBuilder.hasProperties({ value: sContent });
458
- }
459
- return oBuilder.execute();
460
- },
461
449
  iSeePageHeaderButton: function(bCollapse) {
462
450
  return OpaBuilder.create(this)
463
451
  .hasType("sap.m.Button")
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -131,7 +131,7 @@ sap.ui.define(
131
131
  if (sKey === "T_NEW_OBJECT") {
132
132
  return "New Object";
133
133
  } else {
134
- return "(Unnamed Object)";
134
+ return "Unnamed Object";
135
135
  }
136
136
  });
137
137
  }