@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
@@ -0,0 +1,42 @@
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
5
+ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuilder"], function(KPICardAPI, Utils, FEBuilder) {
6
+ "use strict";
7
+
8
+ /**
9
+ * Constructs a new TableAssertions instance.
10
+ *
11
+ * @param {sap.fe.test.builder.KPIBuilder} oBuilderInstance The builder instance used to interact with the UI
12
+ * @returns {sap.fe.test.api.KPICardAssertions} The new instance
13
+ * @class
14
+ * @extends sap.fe.test.api.KPICardAPI
15
+ * @hideconstructor
16
+ * @public
17
+ */
18
+ var KPICardActions = function(oBuilderInstance) {
19
+ return KPICardAPI.call(this, oBuilderInstance);
20
+ };
21
+ KPICardActions.prototype = Object.create(KPICardAPI.prototype);
22
+ KPICardActions.prototype.constructor = KPICardActions;
23
+ KPICardActions.prototype.isAction = true;
24
+
25
+ /**
26
+ * Clicks on the header of the KPI Card.
27
+ *
28
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
29
+ */
30
+ KPICardActions.prototype.iClickHeader = function() {
31
+ var oKPIBuilder = this.getBuilder();
32
+
33
+ return this.prepareResult(
34
+ oKPIBuilder
35
+ .doClickKPICardHeader()
36
+ .description("Clicking KPI card header")
37
+ .execute()
38
+ );
39
+ };
40
+
41
+ return KPICardActions;
42
+ });
@@ -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(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuilder"], function(KPICardAPI, Utils, FEBuilder) {
6
6
  "use strict";
@@ -124,10 +124,10 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
124
124
  KPICardAssertions.prototype.iSeeHeaderValue = function(sValue, mStates) {
125
125
  var oKPIBuilder = this.getBuilder();
126
126
  var oProperties = mStates || {};
127
- oProperties.value = sValue;
127
+ oProperties.number = sValue;
128
128
 
129
129
  var vTitleMatcher = FEBuilder.create(this)
130
- .hasType("sap.m.NumericContent")
130
+ .hasType("sap.f.cards.NumericIndicators")
131
131
  .hasProperties(oProperties);
132
132
 
133
133
  var sDescription = mStates
@@ -153,21 +153,25 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
153
153
  var oKPIBuilder = this.getBuilder();
154
154
 
155
155
  var vIndicatorMatcher = FEBuilder.create(this)
156
- .hasType("sap.f.cards.NumericSideIndicator")
156
+ .hasType("sap.f.cards.NumericIndicators")
157
157
  .hasChildren(
158
158
  FEBuilder.create(this)
159
- .hasType("sap.m.Text")
160
- .hasProperties({ text: sTitle })
161
- )
162
- .hasChildren(
163
- FEBuilder.create(this)
164
- .hasType("sap.m.Text")
165
- .hasProperties({ text: sValue })
166
- )
167
- .hasChildren(
168
- FEBuilder.create(this)
169
- .hasType("sap.m.Text")
170
- .hasProperties({ text: sUnit })
159
+ .hasType("sap.f.cards.NumericSideIndicator")
160
+ .hasChildren(
161
+ FEBuilder.create(this)
162
+ .hasType("sap.m.Text")
163
+ .hasProperties({ text: sTitle })
164
+ )
165
+ .hasChildren(
166
+ FEBuilder.create(this)
167
+ .hasType("sap.m.Text")
168
+ .hasProperties({ text: sTitle })
169
+ )
170
+ .hasChildren(
171
+ FEBuilder.create(this)
172
+ .hasType("sap.m.Text")
173
+ .hasProperties({ text: sValue })
174
+ )
171
175
  );
172
176
 
173
177
  return this.prepareResult(
@@ -178,5 +182,27 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
178
182
  );
179
183
  };
180
184
 
185
+ /**
186
+ * Checks the chart of the KPI card.
187
+ *
188
+ * @param {object} mProperties The properties to be checked on the chart (vizType). If null or empty, we just check if the chart is visible.
189
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
190
+ */
191
+ KPICardAssertions.prototype.iSeeChart = function(mProperties) {
192
+ var oKPIBuilder = this.getBuilder();
193
+
194
+ var vChartMatcher = mProperties && Object.keys(mProperties).length ? FEBuilder.create(this).hasProperties(mProperties) : undefined;
195
+
196
+ var sDescription = vChartMatcher
197
+ ? Utils.formatMessage("Checking card chart with properties '{0}'", mProperties)
198
+ : Utils.formatMessage("Checking card chart");
199
+
200
+ return this.prepareResult(
201
+ oKPIBuilder
202
+ .doOnKPICardChart(vChartMatcher)
203
+ .description(sDescription)
204
+ .execute()
205
+ );
206
+ };
181
207
  return KPICardAssertions;
182
208
  });
@@ -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
  [
@@ -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
  [
@@ -597,7 +597,7 @@ sap.ui.define(
597
597
  };
598
598
 
599
599
  /**
600
- * Selects the variant of the given name.
600
+ * Selects the chosen variant.
601
601
  *
602
602
  * @param {string} sVariantName The name of the variant to be selected
603
603
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
@@ -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
  [
@@ -691,6 +691,17 @@ sap.ui.define(
691
691
  );
692
692
  };
693
693
 
694
+ TableAssertions.prototype.iCheckTitle = function(sTitle) {
695
+ var oTableBuilder = this.getBuilder();
696
+
697
+ return this.prepareResult(
698
+ oTableBuilder
699
+ .hasTitle(sTitle)
700
+ .description(Utils.formatMessage("Checking table '{0}' has title '{1}'", this.getIdentifier(), sTitle))
701
+ .execute()
702
+ );
703
+ };
704
+
694
705
  return TableAssertions;
695
706
  }
696
707
  );
@@ -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(["./FEBuilder", "./OverflowToolbarBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function(
6
6
  FEBuilder,
@@ -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
  [
@@ -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(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function(FEBuilder, OpaBuilder, Utils) {
6
6
  "use strict";
@@ -77,10 +77,19 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
77
77
  };
78
78
 
79
79
  /**
80
- * Applies a matcher to the card header content.
80
+ * Clicks on the KPI card header.
81
+ *
82
+ * @returns {sap.fe.test.builder.KPIBuilder} This instance
83
+ */
84
+ KPIBuilder.prototype.doClickKPICardHeader = function() {
85
+ return this.hasType("sap.ui.integration.cards.NumericHeader").doPress();
86
+ };
87
+
88
+ /**
89
+ * Applies a matcher to the content of the card header.
81
90
  *
82
91
  * @param {sap.ui.test.matchers.Matcher} vMatcher The matcher to filter child items
83
- * @param {boolean} bDirectChild Specifies if the matcher shoould be applied onlmy to direct children or all descendants
92
+ * @param {boolean} bDirectChild Specifies if the matcher should be applied only to direct children or all descendants
84
93
  * @returns {sap.fe.test.builder.KPIBuilder} This instance
85
94
  */
86
95
  KPIBuilder.prototype.doOnKPICardHeader = function(vMatcher, bDirectChild) {
@@ -91,5 +100,21 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
91
100
  );
92
101
  };
93
102
 
103
+ /**
104
+ * Applies a matcher to the card chart.
105
+ *
106
+ * @param {sap.ui.test.matchers.Matcher} vMatcher The matcher to be applied to the chart
107
+ * @returns {sap.fe.test.builder.KPIBuilder} This instance
108
+ */
109
+ KPIBuilder.prototype.doOnKPICardChart = function(vMatcher) {
110
+ var analyticalContentMatcher = vMatcher
111
+ ? FEBuilder.create(this)
112
+ .hasType("sap.ui.integration.cards.AnalyticalContent")
113
+ .hasChildren(vMatcher)
114
+ : FEBuilder.create(this).hasType("sap.ui.integration.cards.AnalyticalContent");
115
+
116
+ return this.hasType("sap.ui.integration.widgets.Card").hasChildren(analyticalContentMatcher);
117
+ };
118
+
94
119
  return KPIBuilder;
95
120
  });
@@ -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(["./FEBuilder", "./MdcFieldBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function(
6
6
  FEBuilder,
@@ -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
  ["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/ui/mdc/enum/FieldDisplay", "sap/fe/test/Utils", "sap/ui/mdc/enum/ConditionValidated"],
@@ -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(["./FEBuilder", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/DialogBuilder"], function(
6
6
  FEBuilder,
@@ -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(["./MdcFieldBuilder", "sap/fe/test/Utils"], function(FieldBuilder, 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
  [
@@ -236,6 +236,14 @@ sap.ui.define(
236
236
  return this.has(TableBuilder.Matchers.columnsMatcher(mColumnMap, bIgnoreColumnState));
237
237
  };
238
238
 
239
+ TableBuilder.prototype.hasTitle = function(sTitle) {
240
+ return this.hasChildren(
241
+ FEBuilder.create(this)
242
+ .hasType("sap.m.Title")
243
+ .hasProperties({ text: sTitle })
244
+ );
245
+ };
246
+
239
247
  TableBuilder.prototype.hasSearchField = function(sSearchText, mState) {
240
248
  var aArguments = Utils.parseArguments([String, Object], arguments);
241
249
  mState = aArguments[1];
@@ -446,6 +454,13 @@ sap.ui.define(
446
454
  .isDialogElement()
447
455
  .hasType("sap.m.StandardListItem")
448
456
  .checkNumberOfMatches(iExpectedNumber)
457
+ .success(
458
+ OpaBuilder.create()
459
+ .isDialogElement()
460
+ .hasType("sap.m.Button")
461
+ .hasProperties({ icon: "sap-icon://decline" })
462
+ .doPress()
463
+ )
449
464
  );
450
465
  }
451
466
  } else {
@@ -465,6 +480,13 @@ sap.ui.define(
465
480
  .hasType("sap.m.StandardListItem")
466
481
  .hasProperties({ title: sFieldName })
467
482
  .checkNumberOfMatches(iExpectedNumber)
483
+ .success(
484
+ OpaBuilder.create()
485
+ .isDialogElement()
486
+ .hasType("sap.m.Button")
487
+ .hasProperties({ icon: "sap-icon://decline" })
488
+ .doPress()
489
+ )
468
490
  );
469
491
  }
470
492
 
@@ -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", "./FEBuilder", "sap/fe/test/Utils", "sap/ui/test/matchers/Interactable"], function(
6
6
  OpaBuilder,
@@ -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(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function(FEBuilder, OpaBuilder, 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
  [
@@ -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/fe/test/JourneyRunner", "sap/fe/test/Utils", "./FEArrangements", "sap/base/Log"], function(
6
6
  JourneyRunner,
@@ -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
  sap.ui.define(
@@ -27,7 +27,7 @@ sap.ui.define(
27
27
  interfaces: [],
28
28
  controls: [],
29
29
  elements: [],
30
- version: "1.95.0",
30
+ version: "1.98.0",
31
31
  noLibraryCSS: true
32
32
  });
33
33
 
@@ -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
  [],