@sapui5/sap.fe.test 1.94.0 → 1.96.3

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 (73) hide show
  1. package/package.json +3 -2
  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 +32 -9
  9. package/src/sap/fe/test/FlexibleColumnLayout.js +1 -1
  10. package/src/sap/fe/test/JestTemplatingHelper.js +109 -7
  11. package/src/sap/fe/test/JestTemplatingHelper.ts +75 -6
  12. package/src/sap/fe/test/JourneyRunner.js +1 -1
  13. package/src/sap/fe/test/ListReport.js +45 -4
  14. package/src/sap/fe/test/LocationUtil.js +1 -1
  15. package/src/sap/fe/test/ObjectPage.js +53 -1
  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 +49 -1
  19. package/src/sap/fe/test/TemplatingTestUtils.js +1 -1
  20. package/src/sap/fe/test/UI5MockHelper.js +218 -0
  21. package/src/sap/fe/test/UI5MockHelper.ts +137 -0
  22. package/src/sap/fe/test/Utils.js +6 -2
  23. package/src/sap/fe/test/api/APIHelper.js +1 -1
  24. package/src/sap/fe/test/api/BaseAPI.js +1 -1
  25. package/src/sap/fe/test/api/ChartActions.js +1 -1
  26. package/src/sap/fe/test/api/ChartAssertions.js +23 -8
  27. package/src/sap/fe/test/api/DialogAPI.js +1 -1
  28. package/src/sap/fe/test/api/DialogActions.js +1 -1
  29. package/src/sap/fe/test/api/DialogAssertions.js +1 -1
  30. package/src/sap/fe/test/api/DialogCreateActions.js +4 -2
  31. package/src/sap/fe/test/api/DialogCreateAssertions.js +2 -2
  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 +1 -1
  38. package/src/sap/fe/test/api/FilterBarAPI.js +1 -1
  39. package/src/sap/fe/test/api/FilterBarActions.js +18 -1
  40. package/src/sap/fe/test/api/FilterBarAssertions.js +41 -12
  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 +34 -10
  48. package/src/sap/fe/test/api/FormAssertions.js +1 -1
  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 +28 -0
  56. package/src/sap/fe/test/api/KPICardAssertions.js +204 -0
  57. package/src/sap/fe/test/api/TableAPI.js +1 -1
  58. package/src/sap/fe/test/api/TableActions.js +1 -1
  59. package/src/sap/fe/test/api/TableAssertions.js +1 -1
  60. package/src/sap/fe/test/builder/DialogBuilder.js +1 -1
  61. package/src/sap/fe/test/builder/FEBuilder.js +1 -1
  62. package/src/sap/fe/test/builder/KPIBuilder.js +61 -5
  63. package/src/sap/fe/test/builder/MacroFieldBuilder.js +3 -1
  64. package/src/sap/fe/test/builder/MdcFieldBuilder.js +1 -1
  65. package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +1 -1
  66. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +1 -1
  67. package/src/sap/fe/test/builder/MdcTableBuilder.js +15 -1
  68. package/src/sap/fe/test/builder/OverflowToolbarBuilder.js +1 -1
  69. package/src/sap/fe/test/builder/VMBuilder.js +1 -1
  70. package/src/sap/fe/test/internal/FEArrangements.js +1 -1
  71. package/src/sap/fe/test/internal/FEJourneyRunner.js +1 -1
  72. package/src/sap/fe/test/library.js +2 -2
  73. package/src/sap/fe/test/massEdit.js +5 -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(
6
6
  [
@@ -42,7 +42,11 @@ sap.ui.define(
42
42
  if (sSingleDeltaManifest.indexOf("/") !== 0) {
43
43
  sSingleDeltaManifest = sComponentName + "/" + sSingleDeltaManifest;
44
44
  }
45
- oTargetManifest = mergeObjects({}, oTargetManifest, LoaderExtensions.loadResource(sSingleDeltaManifest));
45
+ try {
46
+ oTargetManifest = mergeObjects({}, oTargetManifest, LoaderExtensions.loadResource(sSingleDeltaManifest));
47
+ } catch (ignore) {
48
+ // not always an error, e.g. when navigating to a different app that does not have the delta manifest
49
+ }
46
50
  });
47
51
  }
48
52
 
@@ -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/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"], function(Utils, OpaBuilder, FEBuilder) {
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(["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"], function(
6
6
  BaseAPI,
@@ -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
  ["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/ui/core/SortOrder"],
@@ -25,11 +25,26 @@ sap.ui.define(
25
25
  ChartAssertions.prototype.constructor = ChartAssertions;
26
26
  ChartAssertions.prototype.isAction = false;
27
27
 
28
- ChartAssertions.prototype.iCheckItems = function(iNumberOfItems) {
28
+ ChartAssertions.prototype.iCheckItems = function(iNumberOfItems, sTab) {
29
29
  return OpaBuilder.create(this)
30
- .hasType("sap.ui.mdc.Chart")
31
- .check(function(oChart) {
32
- var aContexts = oChart[0].getBinding("data").getContexts();
30
+ .hasType("sap.ui.mdc.ChartNew")
31
+ .check(function(aCharts) {
32
+ var oChart;
33
+ if (sTab && aCharts && aCharts.length > 1) {
34
+ for (var i = 0; i < aCharts.length; i++) {
35
+ if (aCharts[i].getId().indexOf("fe::Chart::" + sTab) > -1) {
36
+ oChart = aCharts[i];
37
+ break;
38
+ }
39
+ }
40
+ } else {
41
+ oChart = aCharts[0];
42
+ }
43
+ var aContexts = oChart
44
+ .getControlDelegate()
45
+ ._getChart(oChart)
46
+ .getBinding("data")
47
+ .getContexts();
33
48
  return (
34
49
  (aContexts && (iNumberOfItems === undefined ? aContexts.length !== 0 : aContexts.length === iNumberOfItems)) ||
35
50
  (!aContexts && iNumberOfItems === 0)
@@ -41,7 +56,7 @@ sap.ui.define(
41
56
 
42
57
  ChartAssertions.prototype.iSeeChartType = function(sChartType) {
43
58
  return OpaBuilder.create(this)
44
- .hasType("sap.ui.mdc.Chart")
59
+ .hasType("sap.ui.mdc.ChartNew")
45
60
  .check(function(oChart) {
46
61
  return sChartType === oChart[0].getChartType();
47
62
  }, true)
@@ -51,7 +66,7 @@ sap.ui.define(
51
66
 
52
67
  ChartAssertions.prototype.iSeeChartVisible = function() {
53
68
  return OpaBuilder.create(this)
54
- .hasType("sap.ui.mdc.Chart")
69
+ .hasType("sap.ui.mdc.ChartNew")
55
70
  .check(function(oChart) {
56
71
  return oChart[0].getVisible() === true;
57
72
  }, true)
@@ -88,7 +103,7 @@ sap.ui.define(
88
103
 
89
104
  ChartAssertions.prototype.iCheckChartNoDataText = function(sNoDataText) {
90
105
  return OpaBuilder.create(this)
91
- .hasType("sap.ui.mdc.Chart")
106
+ .hasType("sap.ui.mdc.ChartNew")
92
107
  .check(function(oChart) {
93
108
  return sNoDataText === oChart[0].getNoDataText();
94
109
  })
@@ -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(["./DialogAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(DialogAPI, Utils, OpaBuilder) {
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(["./DialogAPI", "sap/fe/test/Utils"], function(DialogAPI, 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(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(DialogActions, Utils, OpaBuilder) {
6
6
  "use strict";
@@ -33,7 +33,9 @@ sap.ui.define(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"]
33
33
  DialogCreateActions.prototype.iExecuteCreate = function() {
34
34
  return this.prepareResult(
35
35
  this.getBuilder()
36
- .doPressFooterButton(OpaBuilder.Matchers.resourceBundle("text", "sap.fe.core", "C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE"))
36
+ .doPressFooterButton(
37
+ OpaBuilder.Matchers.resourceBundle("text", "sap.fe.core", "C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE_BUTTON")
38
+ )
37
39
  .description(Utils.formatMessage("Pressing create button on dialog '{0}'", this.getIdentifier()))
38
40
  .execute()
39
41
  );
@@ -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(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/Utils"], function(
6
6
  DialogAssertions,
@@ -40,7 +40,7 @@ sap.ui.define(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/buil
40
40
  return this.prepareResult(
41
41
  this.getBuilder()
42
42
  .hasFooterButton(
43
- OpaBuilder.Matchers.resourceBundle("text", "sap.fe.core", "C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE"),
43
+ OpaBuilder.Matchers.resourceBundle("text", "sap.fe.core", "C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE_BUTTON"),
44
44
  mState
45
45
  )
46
46
  .description(
@@ -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(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(DialogActions, Utils, OpaBuilder) {
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(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/Utils"], function(
6
6
  DialogAssertions,
@@ -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
  [
@@ -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
  ["sap/fe/macros/filter/DraftEditState"],
@@ -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
  [
@@ -304,6 +304,23 @@ sap.ui.define(
304
304
  .execute()
305
305
  );
306
306
  };
307
+ FilterBarActions.prototype.iOpenVisualFilterValueHelp = function(sVisualFilterIdentifier) {
308
+ return this.prepareResult(
309
+ OpaBuilder.create(this)
310
+ .hasType("sap.fe.core.controls.filterbar.VisualFilter")
311
+ .hasId(new RegExp(sVisualFilterIdentifier, "i"))
312
+ .success(function(aVisualFilter) {
313
+ var sVFId = aVisualFilter[0].getId();
314
+ OpaBuilder.create(this)
315
+ .hasType("sap.m.Button")
316
+ .hasId(sVFId + "::VisualFilterValueHelpButton")
317
+ .doPress()
318
+ .execute();
319
+ })
320
+ .description("Open ValueHelp Dialog " + sVisualFilterIdentifier + " VisualFilter")
321
+ .execute()
322
+ );
323
+ };
307
324
  return FilterBarActions;
308
325
  }
309
326
  );
@@ -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
  [
@@ -272,7 +272,9 @@ sap.ui.define(
272
272
  .getContent()[1];
273
273
  var sScaleUOMTitleText = sScaleUOMTitle ? sScaleUOMTitle.getText() : " | ";
274
274
  return (
275
- sTitle === sMeasureDimensionTitle.getText() + (sScaleUOMTitleText === " | " ? "" : sScaleUOMTitle.getText()) &&
275
+ sTitle ===
276
+ sMeasureDimensionTitle.getText() +
277
+ (sScaleUOMTitleText === " " || sScaleUOMTitleText === " | " ? "" : sScaleUOMTitle.getText()) &&
276
278
  sToolTip === sMeasureDimensionTitle.getTooltip()
277
279
  );
278
280
  })
@@ -281,6 +283,35 @@ sap.ui.define(
281
283
  );
282
284
  };
283
285
 
286
+ FilterBarAssertions.prototype.iCheckVisualFilterValueHelp = function(sVisualFilterIdentifier, iCount) {
287
+ return this.prepareResult(
288
+ OpaBuilder.create(this)
289
+ .hasType("sap.fe.core.controls.filterbar.VisualFilter")
290
+ .check(function(aVisualFilters) {
291
+ var oVisualFilter;
292
+ for (var i = 0; i < aVisualFilters.length; i++) {
293
+ if (
294
+ aVisualFilters[i]
295
+ .getParent()
296
+ .getId()
297
+ .indexOf("FilterField::" + sVisualFilterIdentifier) > -1
298
+ ) {
299
+ oVisualFilter = aVisualFilters[i];
300
+ break;
301
+ }
302
+ }
303
+ var sValueHelp = oVisualFilter
304
+ .getItems()[0]
305
+ .getItems()[0]
306
+ .getContent()[3];
307
+ var sValueHelpCount = sValueHelp ? sValueHelp.getText() : undefined;
308
+ return sValueHelp && sValueHelpCount === iCount;
309
+ })
310
+ .description("Checking Value Help and its count of " + sVisualFilterIdentifier + " VisualFilter")
311
+ .execute()
312
+ );
313
+ };
314
+
284
315
  FilterBarAssertions.prototype.iCheckVisualFilterCriticality = function(sVisualFilterIdentifier, sLabelValue, sCriticality) {
285
316
  return this.prepareResult(
286
317
  OpaBuilder.create(this)
@@ -350,12 +381,12 @@ sap.ui.define(
350
381
  );
351
382
  };
352
383
 
353
- FilterBarAssertions.prototype.iCheckVisualFilterOverlayText = function(sVisualFilterIdentifier, sOverlayText, bInitialLoad) {
384
+ FilterBarAssertions.prototype.iCheckErrorMessageAndTitle = function(sVisualFilterIdentifier, sErrorMessage, sErrorMessageTitle) {
354
385
  return this.prepareResult(
355
386
  OpaBuilder.create(this)
356
387
  .hasType("sap.fe.core.controls.filterbar.VisualFilter")
357
388
  .check(function(aVisualFilters) {
358
- var oVisualFilter, oVBox;
389
+ var oVisualFilter;
359
390
  for (var i = 0; i < aVisualFilters.length; i++) {
360
391
  if (
361
392
  aVisualFilters[i]
@@ -367,18 +398,16 @@ sap.ui.define(
367
398
  break;
368
399
  }
369
400
  }
370
- if (bInitialLoad) {
371
- oVBox = oVisualFilter.getItems()[1].getItems()[0];
372
- } else {
373
- oVBox = oVisualFilter.getItems()[1].getItems()[1];
374
- }
375
- var sText = oVBox.getItems()[0].getText();
376
- return sText === sOverlayText;
401
+ var oInteractiveChart = oVisualFilter.getItems()[1].getItems()[0];
402
+ var sText = oInteractiveChart.getErrorMessage();
403
+ var sTitle = oInteractiveChart.getErrorMessageTitle();
404
+ return sText === sErrorMessage && sTitle === sErrorMessageTitle;
377
405
  })
378
- .description("Checking NoData Text of " + sVisualFilterIdentifier + " VisualFilter")
406
+ .description("Checking error message and title of " + sVisualFilterIdentifier + " VisualFilter")
379
407
  .execute()
380
408
  );
381
409
  };
410
+
382
411
  FilterBarAssertions.prototype.iCheckIsVisualFilterRequired = function(sVisualFilterIdentifier) {
383
412
  return this.prepareResult(
384
413
  OpaBuilder.create(this)
@@ -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(["./FooterAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(FooterAPI, Utils, OpaBuilder) {
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(["./FooterActionsBase", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(FooterActionsBase, Utils, OpaBuilder) {
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(["./FooterAPI", "sap/fe/test/Utils"], function(FooterAPI, 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(["./FooterAssertionsBase", "sap/fe/test/Utils", "sap/m/library"], function(FooterAssertionsBase, Utils, mLibrary) {
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,10 +1,17 @@
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
- ["./FormAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/builder/MacroFieldBuilder"],
7
- function(FormAPI, Utils, OpaBuilder, FEBuilder, MacroFieldBuilder) {
6
+ [
7
+ "./FormAPI",
8
+ "sap/fe/test/Utils",
9
+ "sap/ui/test/OpaBuilder",
10
+ "sap/fe/test/builder/FEBuilder",
11
+ "sap/fe/test/builder/MacroFieldBuilder",
12
+ "sap/fe/test/builder/OverflowToolbarBuilder"
13
+ ],
14
+ function(FormAPI, Utils, OpaBuilder, FEBuilder, MacroFieldBuilder, OverflowToolbarBuilder) {
8
15
  "use strict";
9
16
 
10
17
  /**
@@ -59,13 +66,30 @@ sap.ui.define(
59
66
  * @public
60
67
  */
61
68
  FormActions.prototype.iExecuteAction = function(vActionIdentifier) {
62
- var oFormBuilder = this.getBuilder();
63
- return this.prepareResult(
64
- oFormBuilder
65
- .doOnAggregation("actions", this.createActionMatcher(vActionIdentifier), OpaBuilder.Actions.press())
66
- .description(Utils.formatMessage("Pressing action '{1}' on form '{0}'", this.getIdentifier(), vActionIdentifier))
67
- .execute()
68
- );
69
+ var oFormBuilder = this.getBuilder(),
70
+ vFormDescription = this.getIdentifier(),
71
+ sFormContainerId;
72
+ if (vFormDescription.fieldGroupId === undefined) {
73
+ // Action Button in Section Header
74
+ return this.prepareResult(
75
+ oFormBuilder
76
+ .doOnAggregation("actions", this.createActionMatcher(vActionIdentifier), OpaBuilder.Actions.press())
77
+ .description(Utils.formatMessage("Pressing action '{1}' on form '{0}'", this.getIdentifier(), vActionIdentifier))
78
+ .execute()
79
+ );
80
+ } else {
81
+ // Action Button in Form Container Toolbar ("Inline Action")
82
+ sFormContainerId =
83
+ vFormDescription.fullSubSectionId.substring(0, vFormDescription.fullSubSectionId.indexOf("--")) +
84
+ "--" +
85
+ vFormDescription.fieldGroupId;
86
+ return this.prepareResult(
87
+ OverflowToolbarBuilder.create(this)
88
+ .hasId(sFormContainerId + "::FormActionsToolbar")
89
+ .doOnContent(this.createActionMatcher(vActionIdentifier))
90
+ .execute()
91
+ );
92
+ }
69
93
  };
70
94
 
71
95
  /**
@@ -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
  ["./FormAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/builder/MacroFieldBuilder"],
@@ -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(["./HeaderAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "./APIHelper"], function(
6
6
  HeaderAPI,
@@ -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(["./HeaderLR", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "./APIHelper"], function(
6
6
  HeaderLR,
@@ -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
  [
@@ -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
  [
@@ -0,0 +1,28 @@
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
5
+ sap.ui.define(["./BaseAPI", "sap/fe/test/Utils", "sap/fe/test/builder/KPIBuilder"], function(BaseAPI, Utils, KPIBuilder) {
6
+ "use strict";
7
+
8
+ /**
9
+ * Constructs a new KPICardAPI instance.
10
+ *
11
+ * @param {sap.fe.test.builder.KPIBuilder} oKPIBuilder The builder instance used to interact with the UI
12
+ * @returns {sap.fe.test.api.KPICardAPI} The new instance
13
+ * @alias sap.fe.test.api.TableAPI
14
+ * @class
15
+ * @hideconstructor
16
+ * @public
17
+ */
18
+ var KPICardAPI = function(oKPIBuilder) {
19
+ if (!Utils.isOfType(oKPIBuilder, KPIBuilder)) {
20
+ throw new Error("oKPIBuilder parameter must be an KPIBuilder instance");
21
+ }
22
+ return BaseAPI.call(this, oKPIBuilder);
23
+ };
24
+ KPICardAPI.prototype = Object.create(BaseAPI.prototype);
25
+ KPICardAPI.prototype.constructor = KPICardAPI;
26
+
27
+ return KPICardAPI;
28
+ });