@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
  [
@@ -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
 
@@ -283,18 +287,6 @@ sap.ui.define(
283
287
  return vTarget;
284
288
  };
285
289
 
286
- Utils.getParametersArray = function(iStartIndex, aArguments) {
287
- var aArguments = Array.prototype.slice.call(arguments, 1);
288
- if (aArguments.length === 1 && Utils.isArguments(aArguments[0])) {
289
- aArguments = Array.prototype.slice.call(aArguments[0], 0);
290
- }
291
- var aParameters = aArguments[iStartIndex];
292
- if (aArguments.length > iStartIndex || (aParameters && !Array.isArray(aParameters))) {
293
- aParameters = Array.prototype.slice.call(aArguments, iStartIndex);
294
- }
295
- return aParameters;
296
- };
297
-
298
290
  return Utils;
299
291
  }
300
292
  );
@@ -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,15 +1,9 @@
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
- [
7
- "sap/fe/test/Utils",
8
- "sap/ui/test/Opa5",
9
- "sap/ui/test/OpaBuilder",
10
- "sap/fe/test/builder/FEBuilder",
11
- "sap/ui/mdc/p13n/panels/BasePanel"
12
- ],
6
+ ["sap/fe/test/Utils", "sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/m/p13n/BasePanel"],
13
7
  function(Utils, Opa5, OpaBuilder, FEBuilder, MdcP13nBasePanel) {
14
8
  "use strict";
15
9
 
@@ -78,6 +72,27 @@ sap.ui.define(
78
72
  * @public
79
73
  */
80
74
 
75
+ /**
76
+ * An dialog field identifier
77
+ *
78
+ * @typedef {object} DialogFieldIdentifier
79
+ * @property {string} property The name of the field
80
+ * In case of an action parameter dialog, this is the fieldname only
81
+ * <code><pre>
82
+ * {
83
+ * property: <fieldname>
84
+ * }
85
+ * </pre></code>
86
+ * In case of a create dialog, the concatenation of the entity and fieldname has to be provided
87
+ * <code><pre>
88
+ * {
89
+ * property: <entity>::<fieldname>
90
+ * }
91
+ * </pre></code>
92
+ * @name sap.fe.test.api.DialogFieldIdentifier
93
+ * @public
94
+ */
95
+
81
96
  function _findParentChainFunction(oResult, sChainKeyword) {
82
97
  var oAnd = oResult.and;
83
98
  if (sChainKeyword in oAnd) {
@@ -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"],
@@ -40,7 +40,11 @@ sap.ui.define(
40
40
  } else {
41
41
  oChart = aCharts[0];
42
42
  }
43
- var aContexts = oChart.getBinding("data").getContexts();
43
+ var aContexts = oChart
44
+ .getControlDelegate()
45
+ ._getChart(oChart)
46
+ .getBinding("data")
47
+ .getContexts();
44
48
  return (
45
49
  (aContexts && (iNumberOfItems === undefined ? aContexts.length !== 0 : aContexts.length === iNumberOfItems)) ||
46
50
  (!aContexts && iNumberOfItems === 0)
@@ -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
  [
@@ -34,19 +34,23 @@ sap.ui.define(
34
34
  DialogAPI.prototype.constructor = DialogAPI;
35
35
 
36
36
  /**
37
- * Creates a matcher for fields within action dialogs.
37
+ * Creates a matcher for fields within create and action dialogs.
38
38
  *
39
39
  * @param {sap.fe.test.api.FieldIdentifier | string} vFieldIdentifier Identifier to be used for the matcher
40
+ * @param {object} oDialogIdentifier Identifier for the dialog (create/action)
40
41
  *
41
42
  * @returns {object} A matcher
42
43
  *
43
44
  * @private
44
45
  */
45
- DialogAPI.prototype._createFieldMatcher = function(vFieldIdentifier) {
46
+ DialogAPI.prototype._createFieldMatcher = function(vFieldIdentifier, oDialogIdentifier) {
46
47
  var vMatcher, sFieldId;
47
48
  if (!Utils.isOfType(vFieldIdentifier, String)) {
48
49
  if (typeof vFieldIdentifier.property === "string") {
49
- sFieldId = "APD_::" + vFieldIdentifier.property.replaceAll("/", "::");
50
+ sFieldId =
51
+ oDialogIdentifier && oDialogIdentifier.type === "Create"
52
+ ? "CreateDialog::" + vFieldIdentifier.property.replaceAll("/", "::")
53
+ : "APD_::" + vFieldIdentifier.property.replaceAll("/", "::");
50
54
  } else {
51
55
  throw new Error(
52
56
  "The 'property' parameter for creating a control ID for a field in an action dialog is not supported: " +
@@ -61,12 +65,12 @@ sap.ui.define(
61
65
  return vMatcher;
62
66
  };
63
67
 
64
- DialogAPI.prototype._createFieldBuilder = function(vFieldIdentifier) {
68
+ DialogAPI.prototype._createFieldBuilder = function(vFieldIdentifier, oDialogIdentifier) {
65
69
  var oMdcFieldBuilder = new MdcFieldBuilder(this.getOpaInstance());
66
70
  return oMdcFieldBuilder
67
71
  .isDialogElement()
68
72
  .hasType("sap.ui.mdc.Field")
69
- .has(this._createFieldMatcher(vFieldIdentifier));
73
+ .has(this._createFieldMatcher(vFieldIdentifier, oDialogIdentifier));
70
74
  };
71
75
 
72
76
  DialogAPI.prototype._getConfirmButtonMatcher = function() {
@@ -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";
@@ -70,22 +70,22 @@ sap.ui.define(["./DialogAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], fu
70
70
  };
71
71
 
72
72
  /**
73
- * Changes the content of a field in an action parameter dialog.
73
+ * Changes the content of a field in a dialog.
74
74
  *
75
- * @param {sap.fe.test.api.ActionDialogFieldIdentifier} vFieldIdentifier The identifier of the field
75
+ * @param {sap.fe.test.api.DialogFieldIdentifier} vFieldIdentifier The identifier of the field
76
76
  * @param {string} [vValue] The new target value.
77
77
  * @param {boolean} [bClearFirst] Set to <code>true</code> to clear previously set filters, otherwise all previously set values will be kept
78
78
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
79
79
  * @public
80
80
  */
81
- DialogActions.prototype.iChangeActionParameterDialogField = function(vFieldIdentifier, vValue, bClearFirst) {
81
+ DialogActions.prototype.iChangeDialogField = function(vFieldIdentifier, vValue, bClearFirst) {
82
82
  var aArguments = Utils.parseArguments([Object, String, Boolean], arguments);
83
83
  return this.prepareResult(
84
- this._createFieldBuilder(vFieldIdentifier)
84
+ this._createFieldBuilder(vFieldIdentifier, this.getIdentifier())
85
85
  .doChangeValue(aArguments[1], aArguments[2])
86
86
  .description(
87
87
  Utils.formatMessage(
88
- "Changing the field '{1}' of action parameter dialog '{0}' by adding '{2}' (was cleared first: {3})",
88
+ "Changing the field '{1}' of dialog '{0}' by adding '{2}' (was cleared first: {3})",
89
89
  this.getIdentifier(),
90
90
  aArguments[0],
91
91
  aArguments[1],
@@ -96,5 +96,18 @@ sap.ui.define(["./DialogAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], fu
96
96
  );
97
97
  };
98
98
 
99
+ /**
100
+ * Changes the content of a field in an action parameter dialog.
101
+ *
102
+ * @param {sap.fe.test.api.ActionDialogFieldIdentifier} vFieldIdentifier The identifier of the field
103
+ * @param {string} [vValue] The new target value.
104
+ * @param {boolean} [bClearFirst] Set to <code>true</code> to clear previously set filters, otherwise all previously set values will be kept
105
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
106
+ * @public
107
+ */
108
+ DialogActions.prototype.iChangeActionParameterDialogField = function(vFieldIdentifier, vValue, bClearFirst) {
109
+ return this.iChangeDialogField(vFieldIdentifier, vValue, bClearFirst);
110
+ };
111
+
99
112
  return DialogActions;
100
113
  });
@@ -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";
@@ -86,9 +86,9 @@ sap.ui.define(["./DialogAPI", "sap/fe/test/Utils"], function(DialogAPI, Utils) {
86
86
  };
87
87
 
88
88
  /**
89
- * Checks the content and state of a field in an action parameter dialog.
89
+ * Checks the content and state of a field in a dialog.
90
90
  *
91
- * @param {sap.fe.test.api.ActionDialogFieldIdentifier} vFieldIdentifier The identifier of the field
91
+ * @param {sap.fe.test.api.DialogFieldIdentifier} vFieldIdentifier The identifier of the field
92
92
  * @param {string | Array | object} [vValue] Expected value(s) of the field.
93
93
  * if passed as an object, the following pattern will be considered:
94
94
  * <code><pre>
@@ -100,15 +100,16 @@ sap.ui.define(["./DialogAPI", "sap/fe/test/Utils"], function(DialogAPI, Utils) {
100
100
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
101
101
  * @public
102
102
  */
103
- DialogAssertions.prototype.iCheckActionParameterDialogField = function(vFieldIdentifier, vValue, mState) {
103
+ DialogAssertions.prototype.iCheckDialogField = function(vFieldIdentifier, vValue, mState) {
104
104
  var aArguments = Utils.parseArguments([Object, [String, Array, Object], Object], arguments);
105
105
  return this.prepareResult(
106
- this._createFieldBuilder(vFieldIdentifier)
106
+ this._createFieldBuilder(vFieldIdentifier, this.getIdentifier())
107
107
  .hasValue(aArguments[1])
108
108
  .hasState(aArguments[2])
109
109
  .description(
110
110
  Utils.formatMessage(
111
- "Checking field '{0}' with content '{1}' and state '{2}'",
111
+ "Checking field '{1}' of dialog '{0}' with content '{2}' and state '{3}'",
112
+ this.getIdentifier(),
112
113
  aArguments[0],
113
114
  aArguments[1],
114
115
  aArguments[2]
@@ -118,5 +119,24 @@ sap.ui.define(["./DialogAPI", "sap/fe/test/Utils"], function(DialogAPI, Utils) {
118
119
  );
119
120
  };
120
121
 
122
+ /**
123
+ * Checks the content and state of a field in an action parameter dialog.
124
+ *
125
+ * @param {sap.fe.test.api.ActionDialogFieldIdentifier} vFieldIdentifier The identifier of the field
126
+ * @param {string | Array | object} [vValue] Expected value(s) of the field.
127
+ * if passed as an object, the following pattern will be considered:
128
+ * <code><pre>
129
+ * {
130
+ * value: <string>, // optional
131
+ * }
132
+ * </pre></code>
133
+ * @param {object} [mState] Defines the expected state of the field
134
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
135
+ * @public
136
+ */
137
+ DialogAssertions.prototype.iCheckActionParameterDialogField = function(vFieldIdentifier, vValue, mState) {
138
+ return this.iCheckDialogField(vFieldIdentifier, vValue, mState);
139
+ };
140
+
121
141
  return DialogAssertions;
122
142
  });
@@ -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(["./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"],
@@ -32,6 +32,15 @@ sap.ui.define(
32
32
  * @type {string}
33
33
  * @public
34
34
  */
35
+ AllHidingDrafts: EditState.ALL_HIDING_DRAFTS.id,
36
+ /**
37
+ * All (Hiding Drafts)
38
+ *
39
+ * @name sap.fe.test.api.EditState.AllHidingDrafts
40
+ * @constant
41
+ * @type {string}
42
+ * @public
43
+ */
35
44
  Unchanged: EditState.UNCHANGED.id,
36
45
  /**
37
46
  * Own Draft
@@ -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
  [
@@ -234,18 +234,28 @@ sap.ui.define(
234
234
  /**
235
235
  * Saves a variant under the given name, or overwrites the current variant.
236
236
  *
237
- * @param {string} [sVariantName] The name of the new variant. If omitted, the current variant will be overwritten.
237
+ * @param {string} [sVariantName] The name of the new variant. If no new variant name is defined, the current variant will be overwritten.
238
+ * @param {string} [bSetAsDefault] Saves the new variant with option "Set as Default".
239
+ * @param {string} [bApplyAutomatically] Saves the new variant with option "Apply Automatically".
238
240
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
239
241
  *
240
242
  * @public
241
243
  */
242
- FilterBarActions.prototype.iSaveVariant = function(sVariantName) {
244
+ FilterBarActions.prototype.iSaveVariant = function(sVariantName, bSetAsDefault, bApplyAutomatically) {
243
245
  var fnSuccessFunction = Utils.isOfType(sVariantName, String)
244
246
  ? function(oFilterBar) {
245
247
  return VMBuilder.create(this)
246
248
  .hasId(oFilterBar.getId() + "::VariantManagement")
247
- .doSaveAs(sVariantName)
248
- .description(Utils.formatMessage("Saving variant for '{0}' as '{1}'", this.getIdentifier(), sVariantName))
249
+ .doSaveAs(sVariantName, bSetAsDefault, bApplyAutomatically)
250
+ .description(
251
+ Utils.formatMessage(
252
+ "Saving variant for '{0}' as '{1}' with default='{2}' and applyAutomatically='{3}'",
253
+ this.getIdentifier(),
254
+ sVariantName,
255
+ !!bSetAsDefault,
256
+ !!bApplyAutomatically
257
+ )
258
+ )
249
259
  .execute();
250
260
  }
251
261
  : function(oFilterBar) {
@@ -263,6 +273,30 @@ sap.ui.define(
263
273
  );
264
274
  };
265
275
 
276
+ /**
277
+ * Selects the chosen variant.
278
+ *
279
+ * @param {string} sVariantName The name of the variant to be selected
280
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
281
+ *
282
+ * @public
283
+ */
284
+ FilterBarActions.prototype.iSelectVariant = function(sVariantName) {
285
+ return this.prepareResult(
286
+ this.getBuilder()
287
+ .success(
288
+ function(oFilterBar) {
289
+ return VMBuilder.create(this)
290
+ .hasId(oFilterBar.getId() + "::VariantManagement")
291
+ .doSelectVariant(sVariantName)
292
+ .description(Utils.formatMessage("Selecting variant '{1}' from '{0}'", this.getIdentifier(), sVariantName))
293
+ .execute();
294
+ }.bind(this)
295
+ )
296
+ .execute()
297
+ );
298
+ };
299
+
266
300
  FilterBarActions.prototype.iSelectVisualFilter = function(sVisualFilterIdentifier, sLabelValue, bIsSelected) {
267
301
  // var that = this;
268
302
  return this.prepareResult(
@@ -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(["./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,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
  ["./FormAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/builder/MacroFieldBuilder"],
@@ -171,10 +171,39 @@ sap.ui.define(
171
171
  return this.iCheckField(aArguments[0], aArguments[1], Utils.mergeObjects({ controlType: "sap.m.Link" }, aArguments[2]));
172
172
  };
173
173
 
174
- FormAssertions.prototype.iCheckElement = function(sId, oProperties) {
175
- return OpaBuilder.create(this)
176
- .hasId(sId)
177
- .hasProperties(oProperties);
174
+ FormAssertions.prototype.iCheckFormContainersElementCount = function(sFormContainer, iCount, mState) {
175
+ var aArguments = Utils.parseArguments([String, Number, Object], arguments),
176
+ fullSubSectionId = this.getIdentifier().fullSubSectionId,
177
+ mFormState = aArguments[2],
178
+ sView = fullSubSectionId.split("--")[0],
179
+ sForm = fullSubSectionId.split("--")[1].split("::")[2],
180
+ sFormContainerId = sView + "--" + "fe::FormContainer::" + aArguments[0];
181
+ return this.prepareResult(
182
+ this.getBuilder()
183
+ .hasId(sFormContainerId)
184
+ .has(function(oFormContainer) {
185
+ var oMatchingFormContainers;
186
+ if (Object.keys(mFormState).length) {
187
+ oMatchingFormContainers = oFormContainer.getFormElements().filter(function(oFormElement) {
188
+ return Object.keys(mFormState).every(function(sFormElementKey) {
189
+ return mFormState[sFormElementKey] === oFormElement.getProperty(sFormElementKey);
190
+ });
191
+ });
192
+ } else {
193
+ oMatchingFormContainers = oFormContainer.getFormElements();
194
+ }
195
+ return oMatchingFormContainers.length === iCount;
196
+ })
197
+ .description(
198
+ Utils.formatMessage(
199
+ "Form Container '{0}' on Form '{1}' has '{2}' Form Elements.",
200
+ aArguments[0],
201
+ sForm,
202
+ aArguments[1]
203
+ )
204
+ )
205
+ .execute()
206
+ );
178
207
  };
179
208
  return FormAssertions;
180
209
  }
@@ -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
  [
@@ -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/fe/test/builder/KPIBuilder"], function(BaseAPI, Utils, KPIBuilder) {
6
6
  "use strict";