@sapui5/sap.fe.test 1.102.0 → 1.103.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 (65) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/test/.library +1 -1
  3. package/src/sap/fe/test/BaseActions.js +86 -97
  4. package/src/sap/fe/test/BaseArrangements.js +4 -15
  5. package/src/sap/fe/test/BaseAssertions.js +39 -46
  6. package/src/sap/fe/test/CollaborationClient.js +5 -5
  7. package/src/sap/fe/test/CollaborationClient.ts +5 -5
  8. package/src/sap/fe/test/FeMocks.js +1 -1
  9. package/src/sap/fe/test/FeMocks.ts +4 -3
  10. package/src/sap/fe/test/Flexibility.js +115 -162
  11. package/src/sap/fe/test/JestTemplatingHelper.js +37 -25
  12. package/src/sap/fe/test/JestTemplatingHelper.ts +46 -30
  13. package/src/sap/fe/test/JourneyRunner.js +31 -37
  14. package/src/sap/fe/test/ListReport.js +3 -7
  15. package/src/sap/fe/test/ObjectPage.js +26 -32
  16. package/src/sap/fe/test/Shell.js +0 -6
  17. package/src/sap/fe/test/TemplatePage.js +8 -2
  18. package/src/sap/fe/test/TemplatingTestUtils.js +20 -20
  19. package/src/sap/fe/test/UI5MockHelper.js +6 -6
  20. package/src/sap/fe/test/UI5MockHelper.ts +20 -19
  21. package/src/sap/fe/test/Utils.js +19 -20
  22. package/src/sap/fe/test/api/BaseAPI.js +11 -26
  23. package/src/sap/fe/test/api/ChartActions.js +116 -119
  24. package/src/sap/fe/test/api/ChartAssertions.js +18 -22
  25. package/src/sap/fe/test/api/CollaborationAPI.js +6 -6
  26. package/src/sap/fe/test/api/CollaborationAPI.ts +9 -11
  27. package/src/sap/fe/test/api/DialogAPI.js +11 -13
  28. package/src/sap/fe/test/api/DialogActions.js +8 -8
  29. package/src/sap/fe/test/api/DialogAssertions.js +8 -9
  30. package/src/sap/fe/test/api/DialogHelper.js +63 -0
  31. package/src/sap/fe/test/api/DialogMassEditActions.js +115 -0
  32. package/src/sap/fe/test/api/DialogMassEditAssertions.js +174 -0
  33. package/src/sap/fe/test/api/DialogMessageActions.js +2 -1
  34. package/src/sap/fe/test/api/DialogType.js +11 -2
  35. package/src/sap/fe/test/api/DialogValueHelpActions.js +17 -39
  36. package/src/sap/fe/test/api/DialogValueHelpAssertions.js +11 -19
  37. package/src/sap/fe/test/api/FilterBarAPI.js +11 -12
  38. package/src/sap/fe/test/api/FilterBarActions.js +26 -40
  39. package/src/sap/fe/test/api/FilterBarAssertions.js +28 -47
  40. package/src/sap/fe/test/api/FooterActionsBase.js +3 -4
  41. package/src/sap/fe/test/api/FooterActionsOP.js +6 -10
  42. package/src/sap/fe/test/api/FooterAssertionsBase.js +5 -10
  43. package/src/sap/fe/test/api/FooterAssertionsOP.js +8 -13
  44. package/src/sap/fe/test/api/FormAPI.js +5 -6
  45. package/src/sap/fe/test/api/FormActions.js +11 -21
  46. package/src/sap/fe/test/api/FormAssertions.js +14 -20
  47. package/src/sap/fe/test/api/HeaderAPI.js +12 -27
  48. package/src/sap/fe/test/api/HeaderActions.js +10 -12
  49. package/src/sap/fe/test/api/HeaderActionsLR.js +76 -82
  50. package/src/sap/fe/test/api/HeaderAssertions.js +2 -20
  51. package/src/sap/fe/test/api/HeaderAssertionsLR.js +5 -8
  52. package/src/sap/fe/test/api/HeaderLR.js +7 -19
  53. package/src/sap/fe/test/api/KPICardAssertions.js +18 -37
  54. package/src/sap/fe/test/api/TableAPI.js +3 -13
  55. package/src/sap/fe/test/api/TableActions.js +2 -34
  56. package/src/sap/fe/test/api/TableAssertions.js +1 -24
  57. package/src/sap/fe/test/builder/FEBuilder.js +71 -75
  58. package/src/sap/fe/test/builder/MacroFieldBuilder.js +4 -3
  59. package/src/sap/fe/test/builder/MdcFieldBuilder.js +33 -29
  60. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +9 -7
  61. package/src/sap/fe/test/builder/MdcTableBuilder.js +8 -4
  62. package/src/sap/fe/test/builder/VMBuilder.js +27 -43
  63. package/src/sap/fe/test/library.js +3 -2
  64. package/src/sap/fe/test/library.ts +1 -0
  65. package/src/sap/fe/test/massEdit.js +0 -62
@@ -15,7 +15,7 @@ sap.ui.define(
15
15
  "./FilterBarAPI",
16
16
  "./TableAPI"
17
17
  ],
18
- function(DialogActions, Utils, OpaBuilder, FEBuilder, FilterBarBuilder, TableBuilder, FieldBuilder, FilterBarAPI, TableAPI) {
18
+ function (DialogActions, Utils, OpaBuilder, FEBuilder, FilterBarBuilder, TableBuilder, FieldBuilder, FilterBarAPI, TableAPI) {
19
19
  "use strict";
20
20
 
21
21
  /**
@@ -24,14 +24,13 @@ sap.ui.define(
24
24
  * @param {sap.fe.test.builder.DialogBuilder} oDialogBuilder The {@link sap.fe.test.builder.DialogBuilder} instance used to interact with the UI
25
25
  * @param {string} [vDialogDescription] Description (optional) of the dialog to be used for logging messages
26
26
  * @returns {sap.fe.test.api.DialogValueHelpActions} The new instance
27
- *
28
27
  * @extends sap.fe.test.api.DialogActions
29
28
  * @alias sap.fe.test.api.DialogValueHelpActions
30
29
  * @hideconstructor
31
30
  * @class
32
31
  * @public
33
32
  */
34
- var DialogValueHelpActions = function(oDialogBuilder, vDialogDescription) {
33
+ var DialogValueHelpActions = function (oDialogBuilder, vDialogDescription) {
35
34
  return DialogActions.call(this, oDialogBuilder, vDialogDescription, 0);
36
35
  };
37
36
  DialogValueHelpActions.prototype = Object.create(DialogActions.prototype);
@@ -42,10 +41,9 @@ sap.ui.define(
42
41
  * Navigates to the <code>Search and Select</code> tab.
43
42
  *
44
43
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
45
- *
46
44
  * @public
47
45
  */
48
- DialogValueHelpActions.prototype.iGoToSearchAndSelect = function() {
46
+ DialogValueHelpActions.prototype.iGoToSearchAndSelect = function () {
49
47
  return this.prepareResult(
50
48
  FEBuilder.create(this.getOpaInstance())
51
49
  .isDialogElement()
@@ -61,10 +59,9 @@ sap.ui.define(
61
59
  * Navigates to the <code>Define Conditions</code> tab.
62
60
  *
63
61
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
64
- *
65
62
  * @public
66
63
  */
67
- DialogValueHelpActions.prototype.iGoToDefineConditions = function() {
64
+ DialogValueHelpActions.prototype.iGoToDefineConditions = function () {
68
65
  return this.prepareResult(
69
66
  FEBuilder.create(this.getOpaInstance())
70
67
  .isDialogElement()
@@ -80,10 +77,9 @@ sap.ui.define(
80
77
  * Clicks the <code>Hide/Show Filters</code> button.
81
78
  *
82
79
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
83
- *
84
80
  * @public
85
81
  */
86
- DialogValueHelpActions.prototype.iExecuteShowHideFilters = function() {
82
+ DialogValueHelpActions.prototype.iExecuteShowHideFilters = function () {
87
83
  return this.prepareResult(
88
84
  FEBuilder.create(this.getOpaInstance())
89
85
  .isDialogElement()
@@ -100,10 +96,9 @@ sap.ui.define(
100
96
  *
101
97
  * @param {string} [sSearchText] The new search value.
102
98
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
103
- *
104
99
  * @public
105
100
  */
106
- DialogValueHelpActions.prototype.iChangeSearchField = function(sSearchText) {
101
+ DialogValueHelpActions.prototype.iChangeSearchField = function (sSearchText) {
107
102
  var oFilterBarBuilder = FilterBarBuilder.create(this.getOpaInstance())
108
103
  .isDialogElement()
109
104
  .hasType("sap.ui.mdc.filterbar.vh.FilterBar");
@@ -120,40 +115,28 @@ sap.ui.define(
120
115
  * Starts the search.
121
116
  *
122
117
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
123
- *
124
118
  * @public
125
119
  */
126
- DialogValueHelpActions.prototype.iExecuteSearch = function() {
120
+ DialogValueHelpActions.prototype.iExecuteSearch = function () {
127
121
  var oFilterBarBuilder = FilterBarBuilder.create(this.getOpaInstance())
128
122
  .isDialogElement()
129
123
  .hasType("sap.ui.mdc.filterbar.vh.FilterBar");
130
124
 
131
- return this.prepareResult(
132
- oFilterBarBuilder
133
- .doSearch()
134
- .description("Starting value help search field search")
135
- .execute()
136
- );
125
+ return this.prepareResult(oFilterBarBuilder.doSearch().description("Starting value help search field search").execute());
137
126
  };
138
127
 
139
128
  /**
140
129
  * Resets the search field value.
141
130
  *
142
131
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
143
- *
144
132
  * @public
145
133
  */
146
- DialogValueHelpActions.prototype.iResetSearchField = function() {
134
+ DialogValueHelpActions.prototype.iResetSearchField = function () {
147
135
  var oFilterBarBuilder = FilterBarBuilder.create(this.getOpaInstance())
148
136
  .isDialogElement()
149
137
  .hasType("sap.ui.mdc.filterbar.vh.FilterBar");
150
138
 
151
- return this.prepareResult(
152
- oFilterBarBuilder
153
- .doResetSearch()
154
- .description("Resetting value help search field")
155
- .execute()
156
- );
139
+ return this.prepareResult(oFilterBarBuilder.doResetSearch().description("Resetting value help search field").execute());
157
140
  };
158
141
 
159
142
  /**
@@ -163,10 +146,9 @@ sap.ui.define(
163
146
  * @param {string} [vValue] The new target value.
164
147
  * @param {boolean} [bClearFirst] Set to <code>true</code> to clear previously set filters, otherwise all previously set values will be kept
165
148
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
166
- *
167
149
  * @public
168
150
  */
169
- DialogValueHelpActions.prototype.iChangeFilterField = function(vFieldIdentifier, vValue, bClearFirst) {
151
+ DialogValueHelpActions.prototype.iChangeFilterField = function (vFieldIdentifier, vValue, bClearFirst) {
170
152
  var aArguments = Utils.parseArguments([[String, Object], String, Boolean], arguments),
171
153
  oFilterBarBuilder = FilterBarBuilder.create(this.getOpaInstance())
172
154
  .isDialogElement()
@@ -201,10 +183,9 @@ sap.ui.define(
201
183
  * Alternatively, the 0-based row index can be used.
202
184
  * @param {object} [mState] Defines the expected state of the row
203
185
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
204
- *
205
186
  * @public
206
187
  */
207
- DialogValueHelpActions.prototype.iSelectRows = function(vRowValues, mState) {
188
+ DialogValueHelpActions.prototype.iSelectRows = function (vRowValues, mState) {
208
189
  var aArguments = Utils.parseArguments([[Object, Number], Object], arguments),
209
190
  oTableBuilder = TableBuilder.createWrapper(this.getOpaInstance(), "sap.ui.table.Table").isDialogElement();
210
191
  return this.prepareResult(
@@ -229,10 +210,9 @@ sap.ui.define(
229
210
  * @param {string | string[]} vValues The values to be set. If the operator requires more than one value, like BT (between),
230
211
  * an array with the two entries is expected
231
212
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
232
- *
233
213
  * @public
234
214
  */
235
- DialogValueHelpActions.prototype.iAddCondition = function(sOperator, vValues) {
215
+ DialogValueHelpActions.prototype.iAddCondition = function (sOperator, vValues) {
236
216
  return this.iChangeCondition(sOperator || "EQ", vValues, -1);
237
217
  };
238
218
 
@@ -244,10 +224,9 @@ sap.ui.define(
244
224
  * an array with the two entries is expected
245
225
  * @param {number} [iConditionIndex] The index of the condition to be altered. If not set, the index 0 is used
246
226
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
247
- *
248
227
  * @public
249
228
  */
250
- DialogValueHelpActions.prototype.iChangeCondition = function(sOperator, vValues, iConditionIndex) {
229
+ DialogValueHelpActions.prototype.iChangeCondition = function (sOperator, vValues, iConditionIndex) {
251
230
  iConditionIndex = iConditionIndex || 0;
252
231
  var bIsEmpty = vValues === undefined;
253
232
  vValues = bIsEmpty || Array.isArray(vValues) ? vValues : [vValues];
@@ -261,7 +240,7 @@ sap.ui.define(
261
240
  FEBuilder.create(this.getOpaInstance())
262
241
  .isDialogElement()
263
242
  .hasType("sap.ui.mdc.field.DefineConditionPanel")
264
- .do(function(oConditionsPanel) {
243
+ .do(function (oConditionsPanel) {
265
244
  var aConditions = [].concat(oConditionsPanel.getConditions());
266
245
  if (iConditionIndex === -1) {
267
246
  aConditions.push(oCondition);
@@ -287,16 +266,15 @@ sap.ui.define(
287
266
  *
288
267
  * @param {number} [iConditionIndex] The index of the condition to be removed. If not set, the index 0 is used
289
268
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
290
- *
291
269
  * @public
292
270
  */
293
- DialogValueHelpActions.prototype.iRemoveCondition = function(iConditionIndex) {
271
+ DialogValueHelpActions.prototype.iRemoveCondition = function (iConditionIndex) {
294
272
  iConditionIndex = iConditionIndex || 0;
295
273
  return this.prepareResult(
296
274
  FEBuilder.create(this.getOpaInstance())
297
275
  .isDialogElement()
298
276
  .hasType("sap.ui.mdc.field.DefineConditionPanel")
299
- .do(function(oConditionsPanel) {
277
+ .do(function (oConditionsPanel) {
300
278
  var aConditions = [].concat(oConditionsPanel.getConditions());
301
279
  aConditions.splice(iConditionIndex, 1);
302
280
  oConditionsPanel.setConditions(aConditions);
@@ -14,7 +14,7 @@ sap.ui.define(
14
14
  "sap/fe/test/builder/MdcTableBuilder",
15
15
  "sap/fe/test/Utils"
16
16
  ],
17
- function(DialogAssertions, FilterBarAPI, TableAPI, OpaBuilder, FEBuilder, FilterBarBuilder, TableBuilder, Utils) {
17
+ function (DialogAssertions, FilterBarAPI, TableAPI, OpaBuilder, FEBuilder, FilterBarBuilder, TableBuilder, Utils) {
18
18
  "use strict";
19
19
 
20
20
  /**
@@ -23,14 +23,13 @@ sap.ui.define(
23
23
  * @param {sap.fe.test.builder.DialogBuilder} oDialogBuilder The {@link sap.fe.test.builder.DialogBuilder} instance used to interact with the UI
24
24
  * @param {string} [vDialogDescription] Description (optional) of the dialog to be used for logging messages
25
25
  * @returns {sap.fe.test.api.DialogValueHelpAssertions} The new instance
26
- *
27
26
  * @extends sap.fe.test.api.DialogAssertions
28
27
  * @alias sap.fe.test.api.DialogValueHelpAssertions
29
28
  * @hideconstructor
30
29
  * @class
31
30
  * @public
32
31
  */
33
- var DialogValueHelpAssertions = function(oDialogBuilder, vDialogDescription) {
32
+ var DialogValueHelpAssertions = function (oDialogBuilder, vDialogDescription) {
34
33
  return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 0);
35
34
  };
36
35
  DialogValueHelpAssertions.prototype = Object.create(DialogAssertions.prototype);
@@ -42,10 +41,9 @@ sap.ui.define(
42
41
  *
43
42
  * @param {object} [mState] Defines the expected state of the filter bar
44
43
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
45
- *
46
44
  * @public
47
45
  */
48
- DialogValueHelpAssertions.prototype.iCheckFilterBar = function(mState) {
46
+ DialogValueHelpAssertions.prototype.iCheckFilterBar = function (mState) {
49
47
  return this.prepareResult(
50
48
  FilterBarBuilder.create(this.getOpaInstance())
51
49
  .isDialogElement()
@@ -71,10 +69,9 @@ sap.ui.define(
71
69
  * @param {string} [sOperator] The expected operator
72
70
  * @param {object} [mState] Defines the expected state of the filter field
73
71
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
74
- *
75
72
  * @public
76
73
  */
77
- DialogValueHelpAssertions.prototype.iCheckFilterField = function(vFieldIdentifier, vConditionValues, sOperator, mState) {
74
+ DialogValueHelpAssertions.prototype.iCheckFilterField = function (vFieldIdentifier, vConditionValues, sOperator, mState) {
78
75
  var aArguments = Utils.parseArguments([[String, Object], [String, Array, Object, Boolean], String, Object], arguments),
79
76
  oFilterBarBuilder = FilterBarBuilder.create(this.getOpaInstance())
80
77
  .isDialogElement()
@@ -107,10 +104,9 @@ sap.ui.define(
107
104
  * @param {string} [sSearchText] The expected text in the search field
108
105
  * @param {object} [mState] Defines the expected state of the search field
109
106
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
110
- *
111
107
  * @public
112
108
  */
113
- DialogValueHelpAssertions.prototype.iCheckSearchField = function(sSearchText, mState) {
109
+ DialogValueHelpAssertions.prototype.iCheckSearchField = function (sSearchText, mState) {
114
110
  var aArguments = Utils.parseArguments([String, Object], arguments),
115
111
  oFilterBarBuilder = FilterBarBuilder.create(this.getOpaInstance())
116
112
  .isDialogElement()
@@ -135,10 +131,9 @@ sap.ui.define(
135
131
  *
136
132
  * @param {object} [mState] Defines the expected state of the search field
137
133
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
138
- *
139
134
  * @public
140
135
  */
141
- DialogValueHelpAssertions.prototype.iCheckTable = function(mState) {
136
+ DialogValueHelpAssertions.prototype.iCheckTable = function (mState) {
142
137
  return this.prepareResult(
143
138
  TableBuilder.createWrapper(this.getOpaInstance(), "sap.ui.table.Table")
144
139
  .isDialogElement()
@@ -170,10 +165,9 @@ sap.ui.define(
170
165
  * @param {number} [iExpectedNumberOfRows] The expected number of rows considering <code>mRowValues</code> and <code>mRowState</code>
171
166
  * @param {object} [mState] Defines the expected state of the target row
172
167
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
173
- *
174
168
  * @public
175
169
  */
176
- DialogValueHelpAssertions.prototype.iCheckRows = function(mRowValues, iExpectedNumberOfRows, mState) {
170
+ DialogValueHelpAssertions.prototype.iCheckRows = function (mRowValues, iExpectedNumberOfRows, mState) {
177
171
  var aArguments = Utils.parseArguments([Object, Number, Object], arguments),
178
172
  iNumberOfRows = aArguments[1],
179
173
  aRowMatcher = TableAPI.createRowMatchers(aArguments[0], aArguments[2]),
@@ -182,7 +176,7 @@ sap.ui.define(
182
176
  // the order of the matchers matters here
183
177
  if (aRowMatcher.length) {
184
178
  // if matchers are defined, first match rows then check number of results
185
- oTableBuilder.hasRows(aRowMatcher, true).has(function(aRows) {
179
+ oTableBuilder.hasRows(aRowMatcher, true).has(function (aRows) {
186
180
  return Utils.isOfType(iNumberOfRows, Number) ? aRows.length === iNumberOfRows : aRows.length > 0;
187
181
  });
188
182
  } else {
@@ -224,7 +218,7 @@ sap.ui.define(
224
218
  oTabIdMatcher = FEBuilder.Matchers.id(RegExp(sIdSuffix + "$"));
225
219
 
226
220
  if (mState && mState.visible === false) {
227
- oBuilder.check(function(aIconTabFilters) {
221
+ oBuilder.check(function (aIconTabFilters) {
228
222
  return OpaBuilder.Matchers.filter(oTabIdMatcher)(aIconTabFilters).length === 0;
229
223
  });
230
224
  } else {
@@ -239,10 +233,9 @@ sap.ui.define(
239
233
  *
240
234
  * @param {object} [mState] Defines the expected state of the filter bar
241
235
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
242
- *
243
236
  * @public
244
237
  */
245
- DialogValueHelpAssertions.prototype.iCheckSearchAndSelect = function(mState) {
238
+ DialogValueHelpAssertions.prototype.iCheckSearchAndSelect = function (mState) {
246
239
  return _checkTabBuilder(this, "-VHP--fromList", mState);
247
240
  };
248
241
 
@@ -251,10 +244,9 @@ sap.ui.define(
251
244
  *
252
245
  * @param {object} [mState] Defines the expected state of the filter bar
253
246
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
254
- *
255
247
  * @public
256
248
  */
257
- DialogValueHelpAssertions.prototype.iCheckDefineConditions = function(mState) {
249
+ DialogValueHelpAssertions.prototype.iCheckDefineConditions = function (mState) {
258
250
  return _checkTabBuilder(this, "-VHP--defineCondition", mState);
259
251
  };
260
252
 
@@ -13,7 +13,7 @@ sap.ui.define(
13
13
  "sap/fe/test/builder/MdcFilterBarBuilder",
14
14
  "sap/fe/test/builder/MdcFilterFieldBuilder"
15
15
  ],
16
- function(BaseAPI, Utils, OpaBuilder, Action, FEBuilder, FilterBarBuilder, FilterFieldBuilder) {
16
+ function (BaseAPI, Utils, OpaBuilder, Action, FEBuilder, FilterBarBuilder, FilterFieldBuilder) {
17
17
  "use strict";
18
18
 
19
19
  /**
@@ -21,7 +21,6 @@ sap.ui.define(
21
21
  *
22
22
  * @typedef {object} FilterFieldIdentifier
23
23
  * @property {string} property The name of the property
24
- *
25
24
  * @name sap.fe.test.api.FilterFieldIdentifier
26
25
  * @public
27
26
  */
@@ -37,7 +36,7 @@ sap.ui.define(
37
36
  * @hideconstructor
38
37
  * @public
39
38
  */
40
- var FilterBarAPI = function(oFilterBarBuilder, vFilterBarDescription) {
39
+ var FilterBarAPI = function (oFilterBarBuilder, vFilterBarDescription) {
41
40
  if (!Utils.isOfType(oFilterBarBuilder, FilterBarBuilder)) {
42
41
  throw new Error("oFilterBarBuilder parameter must be a FilterBarBuilder instance");
43
42
  }
@@ -48,13 +47,14 @@ sap.ui.define(
48
47
 
49
48
  /**
50
49
  * Retrieve a filter field by its identifier.
50
+ *
51
51
  * @param {sap.fe.test.builder.FilterBarBuilder} oFilterBarBuilder The builder of the filter bar to which the field belongs
52
52
  * @param {string | sap.fe.test.api.FilterFieldIdentifier} vFieldIdentifier The identifier of the field in the filter bar
53
- * @param mState
53
+ * @param {any} mState
54
54
  * @returns {sap.fe.test.builder.FilterFieldBuilder} The FieldBuilder instance
55
55
  * @ui5-restricted
56
56
  */
57
- FilterBarAPI.createFilterFieldBuilder = function(oFilterBarBuilder, vFieldIdentifier, mState) {
57
+ FilterBarAPI.createFilterFieldBuilder = function (oFilterBarBuilder, vFieldIdentifier, mState) {
58
58
  var vFieldMatcher;
59
59
 
60
60
  if (Utils.isOfType(vFieldIdentifier, String)) {
@@ -75,7 +75,7 @@ sap.ui.define(
75
75
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
76
76
  * @public
77
77
  */
78
- FilterBarAPI.prototype.iOpenFilterAdaptation = function() {
78
+ FilterBarAPI.prototype.iOpenFilterAdaptation = function () {
79
79
  var oFilterBarBuilder = this.getBuilder();
80
80
  return this.prepareResult(
81
81
  oFilterBarBuilder
@@ -95,7 +95,7 @@ sap.ui.define(
95
95
  .hasType("sap.m.Panel")
96
96
  .isDialogElement()
97
97
  // ...and ensure that all filter fields are visible by expanding all filter groups (panels) if not yet done
98
- .doConditional(function(oPanel) {
98
+ .doConditional(function (oPanel) {
99
99
  return !oPanel.getExpanded();
100
100
  }, OpaBuilder.Actions.press("expandButton"))
101
101
  )
@@ -111,7 +111,7 @@ sap.ui.define(
111
111
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
112
112
  * @public
113
113
  */
114
- FilterBarAPI.prototype.iConfirmFilterAdaptation = function() {
114
+ FilterBarAPI.prototype.iConfirmFilterAdaptation = function () {
115
115
  return this.prepareResult(
116
116
  FilterBarBuilder.createAdaptationDialogBuilder(this.getOpaInstance())
117
117
  .doPressFooterButton(OpaBuilder.Matchers.resourceBundle("text", "sap.ui.mdc", "p13nDialog.OK"))
@@ -130,10 +130,9 @@ sap.ui.define(
130
130
  * @param {Function|Array|sap.ui.test.actions.Action} [vActions] The actions to be executed on found adaptation field
131
131
  * @param {string} sDescription The description of the check or adaptation
132
132
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
133
- *
134
133
  * @ui5-restricted
135
134
  */
136
- FilterBarAPI.prototype.filterFieldAdaptation = function(vFieldIdentifier, mState, vActions, sDescription) {
135
+ FilterBarAPI.prototype.filterFieldAdaptation = function (vFieldIdentifier, mState, vActions, sDescription) {
137
136
  var aArguments = Utils.parseArguments([[String, Object], Object, [Function, Array, Action], String], arguments),
138
137
  oBuilder = FEBuilder.create(this.getOpaInstance()),
139
138
  bPopoverOpen,
@@ -173,7 +172,7 @@ sap.ui.define(
173
172
  return this.prepareResult(
174
173
  oBuilder
175
174
  .success(
176
- function() {
175
+ function () {
177
176
  bPopoverOpen = FEBuilder.controlsExist(oAdaptationDialogBuilder);
178
177
 
179
178
  if (!bPopoverOpen) {
@@ -186,7 +185,7 @@ sap.ui.define(
186
185
 
187
186
  return oAdaptationDialogBuilder
188
187
  .has(OpaBuilder.Matchers.children(oAdaptColumnBuilder))
189
- .has(function(aFoundAdaptationColumns) {
188
+ .has(function (aFoundAdaptationColumns) {
190
189
  if (bCheckForNotVisible) {
191
190
  return aFoundAdaptationColumns.length === 0;
192
191
  }
@@ -13,7 +13,7 @@ sap.ui.define(
13
13
  "sap/ui/test/OpaBuilder",
14
14
  "sap/fe/test/builder/VMBuilder"
15
15
  ],
16
- function(FilterBarAPI, Utils, EditState, FEBuilder, Opa5, OpaBuilder, VMBuilder) {
16
+ function (FilterBarAPI, Utils, EditState, FEBuilder, Opa5, OpaBuilder, VMBuilder) {
17
17
  "use strict";
18
18
 
19
19
  /**
@@ -28,7 +28,7 @@ sap.ui.define(
28
28
  * @hideconstructor
29
29
  * @public
30
30
  */
31
- var FilterBarActions = function(oFilterBarBuilder, vFilterBarDescription) {
31
+ var FilterBarActions = function (oFilterBarBuilder, vFilterBarDescription) {
32
32
  return FilterBarAPI.call(this, oFilterBarBuilder, vFilterBarDescription);
33
33
  };
34
34
  FilterBarActions.prototype = Object.create(FilterBarAPI.prototype);
@@ -44,7 +44,7 @@ sap.ui.define(
44
44
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
45
45
  * @public
46
46
  */
47
- FilterBarActions.prototype.iChangeFilterField = function(vFieldIdentifier, vValue, bClearFirst) {
47
+ FilterBarActions.prototype.iChangeFilterField = function (vFieldIdentifier, vValue, bClearFirst) {
48
48
  var aArguments = Utils.parseArguments([[String, Object], String, Boolean], arguments),
49
49
  oFieldBuilder = FilterBarAPI.createFilterFieldBuilder(this.getBuilder(), aArguments[0]);
50
50
 
@@ -69,10 +69,9 @@ sap.ui.define(
69
69
  *
70
70
  * @param {string | sap.fe.test.api.FilterFieldIdentifier} vFieldIdentifier The identifier of the filter field
71
71
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, that can be used for chaining statements
72
- *
73
72
  * @public
74
73
  */
75
- FilterBarActions.prototype.iOpenValueHelp = function(vFieldIdentifier) {
74
+ FilterBarActions.prototype.iOpenValueHelp = function (vFieldIdentifier) {
76
75
  var oFieldBuilder = FilterBarAPI.createFilterFieldBuilder(this.getBuilder(), vFieldIdentifier);
77
76
  return this.prepareResult(
78
77
  oFieldBuilder
@@ -93,10 +92,9 @@ sap.ui.define(
93
92
  *
94
93
  * @param {string} [sSearchText] The new search text
95
94
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
96
- *
97
95
  * @public
98
96
  */
99
- FilterBarActions.prototype.iChangeSearchField = function(sSearchText) {
97
+ FilterBarActions.prototype.iChangeSearchField = function (sSearchText) {
100
98
  var oFilterBarBuilder = this.getBuilder();
101
99
  return this.prepareResult(
102
100
  oFilterBarBuilder
@@ -116,10 +114,9 @@ sap.ui.define(
116
114
  * Resets the search field.
117
115
  *
118
116
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
119
- *
120
117
  * @public
121
118
  */
122
- FilterBarActions.prototype.iResetSearchField = function() {
119
+ FilterBarActions.prototype.iResetSearchField = function () {
123
120
  var oFilterBarBuilder = this.getBuilder();
124
121
  return this.prepareResult(
125
122
  oFilterBarBuilder
@@ -134,10 +131,9 @@ sap.ui.define(
134
131
  *
135
132
  * @param {sap.fe.test.api.EditState} sEditState Value of an edit state
136
133
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
137
- *
138
134
  * @public
139
135
  */
140
- FilterBarActions.prototype.iChangeEditingStatus = function(sEditState) {
136
+ FilterBarActions.prototype.iChangeEditingStatus = function (sEditState) {
141
137
  var oFilterBarBuilder = this.getBuilder();
142
138
  return this.prepareResult(
143
139
  oFilterBarBuilder
@@ -157,10 +153,9 @@ sap.ui.define(
157
153
  * Executes the search with the current filters.
158
154
  *
159
155
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
160
- *
161
156
  * @public
162
157
  */
163
- FilterBarActions.prototype.iExecuteSearch = function() {
158
+ FilterBarActions.prototype.iExecuteSearch = function () {
164
159
  var oFilterBarBuilder = this.getBuilder();
165
160
  return this.prepareResult(
166
161
  oFilterBarBuilder
@@ -175,10 +170,9 @@ sap.ui.define(
175
170
  *
176
171
  * @param {string | sap.fe.test.api.FilterFieldIdentifier} vFieldIdentifier The identifier of the field
177
172
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
178
- *
179
173
  * @public
180
174
  */
181
- FilterBarActions.prototype.iAddAdaptationFilterField = function(vFieldIdentifier) {
175
+ FilterBarActions.prototype.iAddAdaptationFilterField = function (vFieldIdentifier) {
182
176
  return this.filterFieldAdaptation(
183
177
  vFieldIdentifier,
184
178
  { selected: false },
@@ -192,10 +186,9 @@ sap.ui.define(
192
186
  *
193
187
  * @param {string | sap.fe.test.api.FilterFieldIdentifier} vFieldIdentifier The identifier of the field
194
188
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
195
- *
196
189
  * @public
197
190
  */
198
- FilterBarActions.prototype.iRemoveAdaptationFilterField = function(vFieldIdentifier) {
191
+ FilterBarActions.prototype.iRemoveAdaptationFilterField = function (vFieldIdentifier) {
199
192
  return this.filterFieldAdaptation(
200
193
  vFieldIdentifier,
201
194
  { selected: true },
@@ -210,10 +203,9 @@ sap.ui.define(
210
203
  * @param {string} sShortcut Pattern for the shortcut
211
204
  * @param {string | sap.fe.test.api.FilterFieldIdentifier} [vFieldIdentifier] The identifier of the field
212
205
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
213
- *
214
206
  * @public
215
207
  */
216
- FilterBarActions.prototype.iExecuteKeyboardShortcut = function(sShortcut, vFieldIdentifier) {
208
+ FilterBarActions.prototype.iExecuteKeyboardShortcut = function (sShortcut, vFieldIdentifier) {
217
209
  var oBuilder = vFieldIdentifier
218
210
  ? FilterBarAPI.createFilterFieldBuilder(this.getBuilder(), vFieldIdentifier)
219
211
  : this.getBuilder();
@@ -239,12 +231,11 @@ sap.ui.define(
239
231
  * @param {string} [bSetAsDefault] Saves the new variant with option "Set as Default".
240
232
  * @param {string} [bApplyAutomatically] Saves the new variant with option "Apply Automatically".
241
233
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
242
- *
243
234
  * @public
244
235
  */
245
- FilterBarActions.prototype.iSaveVariant = function(sVariantName, bSetAsDefault, bApplyAutomatically) {
236
+ FilterBarActions.prototype.iSaveVariant = function (sVariantName, bSetAsDefault, bApplyAutomatically) {
246
237
  var fnSuccessFunction = Utils.isOfType(sVariantName, String)
247
- ? function(oFilterBar) {
238
+ ? function (oFilterBar) {
248
239
  return VMBuilder.create(this)
249
240
  .hasId(oFilterBar.getId() + "::VariantManagement")
250
241
  .doSaveAs(sVariantName, bSetAsDefault, bApplyAutomatically)
@@ -259,7 +250,7 @@ sap.ui.define(
259
250
  )
260
251
  .execute();
261
252
  }
262
- : function(oFilterBar) {
253
+ : function (oFilterBar) {
263
254
  return VMBuilder.create(this)
264
255
  .hasId(oFilterBar.getId() + "::VariantManagement")
265
256
  .doSave()
@@ -267,11 +258,7 @@ sap.ui.define(
267
258
  .execute();
268
259
  };
269
260
 
270
- return this.prepareResult(
271
- this.getBuilder()
272
- .success(fnSuccessFunction.bind(this))
273
- .execute()
274
- );
261
+ return this.prepareResult(this.getBuilder().success(fnSuccessFunction.bind(this)).execute());
275
262
  };
276
263
 
277
264
  /**
@@ -279,14 +266,13 @@ sap.ui.define(
279
266
  *
280
267
  * @param {string} sVariantName The name of the variant to be selected
281
268
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
282
- *
283
269
  * @public
284
270
  */
285
- FilterBarActions.prototype.iSelectVariant = function(sVariantName) {
271
+ FilterBarActions.prototype.iSelectVariant = function (sVariantName) {
286
272
  return this.prepareResult(
287
273
  this.getBuilder()
288
274
  .success(
289
- function(oFilterBar) {
275
+ function (oFilterBar) {
290
276
  return VMBuilder.create(this)
291
277
  .hasId(oFilterBar.getId() + "::VariantManagement")
292
278
  .doSelectVariant(sVariantName)
@@ -298,20 +284,20 @@ sap.ui.define(
298
284
  );
299
285
  };
300
286
 
301
- FilterBarActions.prototype.iSelectVisualFilter = function(sVisualFilterIdentifier, sLabelValue, bIsSelected) {
287
+ FilterBarActions.prototype.iSelectVisualFilter = function (sVisualFilterIdentifier, sLabelValue, bIsSelected) {
302
288
  // var that = this;
303
289
  return this.prepareResult(
304
290
  OpaBuilder.create(this)
305
291
  .hasType("sap.fe.core.controls.filterbar.VisualFilter")
306
292
  .hasId(new RegExp(sVisualFilterIdentifier, "i"))
307
- .success(function(aVisualFilter) {
293
+ .success(function (aVisualFilter) {
308
294
  var oVisualFilter = aVisualFilter[0];
309
295
  var selectItem;
310
296
  var oInteractiveChart = oVisualFilter.getItems()[1].getItems()[0];
311
297
  var aItems =
312
298
  (oInteractiveChart.isA("sap.suite.ui.microchart.InteractiveLineChart") && oInteractiveChart.getPoints()) ||
313
299
  (oInteractiveChart.isA("sap.suite.ui.microchart.InteractiveBarChart") && oInteractiveChart.getBars());
314
- aItems.forEach(function(oItem) {
300
+ aItems.forEach(function (oItem) {
315
301
  if (oItem.getLabel() == sLabelValue) {
316
302
  selectItem = oItem;
317
303
  }
@@ -320,16 +306,16 @@ sap.ui.define(
320
306
  selectItem = aItems[0];
321
307
  }
322
308
  if (oInteractiveChart.isA("sap.suite.ui.microchart.InteractiveLineChart")) {
323
- var aPoints = oInteractiveChart.getSelectedPoints();
309
+ var aLineChartPoints = oInteractiveChart.getSelectedPoints();
324
310
  return oInteractiveChart.fireSelectionChanged({
325
- selectedPoints: aPoints,
311
+ selectedPoints: aLineChartPoints,
326
312
  point: selectItem,
327
313
  selected: bIsSelected
328
314
  });
329
315
  } else if (oInteractiveChart.isA("sap.suite.ui.microchart.InteractiveBarChart")) {
330
- var aPoints = oInteractiveChart.getSelectedBars();
316
+ var aBarChartPoints = oInteractiveChart.getSelectedBars();
331
317
  return oInteractiveChart.fireSelectionChanged({
332
- selectedPoints: aPoints,
318
+ selectedPoints: aBarChartPoints,
333
319
  point: selectItem,
334
320
  selected: bIsSelected
335
321
  });
@@ -339,12 +325,12 @@ sap.ui.define(
339
325
  .execute()
340
326
  );
341
327
  };
342
- FilterBarActions.prototype.iOpenVisualFilterValueHelp = function(sVisualFilterIdentifier) {
328
+ FilterBarActions.prototype.iOpenVisualFilterValueHelp = function (sVisualFilterIdentifier) {
343
329
  return this.prepareResult(
344
330
  OpaBuilder.create(this)
345
331
  .hasType("sap.fe.core.controls.filterbar.VisualFilter")
346
332
  .hasId(new RegExp(sVisualFilterIdentifier, "i"))
347
- .success(function(aVisualFilter) {
333
+ .success(function (aVisualFilter) {
348
334
  var sVFId = aVisualFilter[0].getId();
349
335
  OpaBuilder.create(this)
350
336
  .hasType("sap.m.Button")