@sapui5/sap.fe.test 1.143.0 → 1.145.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.
@@ -47,28 +47,45 @@ sap.ui.define(["sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/build
47
47
  createMenuAndListActionMatcher: function (vAction, bReturnAction) {
48
48
  var vActionMatcher;
49
49
  if (Utils.isOfType(vAction, String)) {
50
- vAction = { text: vAction };
50
+ vAction = { text: vAction, title: vAction };
51
51
  }
52
- if (Utils.isOfType(vAction, Object)) {
53
- if (vAction.visible === false) {
54
- var mStatesWOVisible = Object.assign(vAction);
55
- delete mStatesWOVisible.visible;
56
- vActionMatcher = OpaBuilder.Matchers.some(
57
- // either button is visible=false ...
58
- OpaBuilder.Matchers.aggregationMatcher("items", FEBuilder.Matchers.states(vAction)),
59
- // ... or it wasn't rendered at all (no match in the aggregation)
60
- OpaBuilder.Matchers.not(
61
- OpaBuilder.Matchers.aggregationMatcher("items", FEBuilder.Matchers.states(mStatesWOVisible))
62
- )
63
- );
64
- } else {
65
- vActionMatcher = bReturnAction
66
- ? [OpaBuilder.Matchers.aggregation("items", FEBuilder.Matchers.states(vAction)), FEBuilder.Matchers.atIndex(0)]
67
- : OpaBuilder.Matchers.aggregationMatcher("items", FEBuilder.Matchers.states(vAction));
68
- }
69
- } else {
52
+ if (!Utils.isOfType(vAction, Object)) {
70
53
  throw new Error("vAction parameter must be a string or object");
71
54
  }
55
+ if (vAction.text && !vAction.title) {
56
+ vAction = Object.assign({}, vAction, { title: vAction.text });
57
+ }
58
+
59
+ var mText = Object.assign({}, vAction);
60
+ var mTitle = Object.assign({}, vAction);
61
+
62
+ delete mText.title;
63
+ delete mTitle.text;
64
+
65
+ var itemStateMatcher = OpaBuilder.Matchers.some(FEBuilder.Matchers.states(mText), FEBuilder.Matchers.states(mTitle));
66
+
67
+ if (vAction.visible === false) {
68
+ var mTextNoVis = Object.assign({}, mText);
69
+ delete mTextNoVis.visible;
70
+
71
+ var mTitleNoVis = Object.assign({}, mTitle);
72
+ delete mTitleNoVis.visible;
73
+
74
+ var itemStateMatcherNoVis = OpaBuilder.Matchers.some(
75
+ FEBuilder.Matchers.states(mTextNoVis),
76
+ FEBuilder.Matchers.states(mTitleNoVis)
77
+ );
78
+ vActionMatcher = OpaBuilder.Matchers.some(
79
+ // either it is visible=false...
80
+ OpaBuilder.Matchers.aggregationMatcher("items", itemStateMatcher),
81
+ // ...or it wasn't rendered at all
82
+ OpaBuilder.Matchers.not(OpaBuilder.Matchers.aggregationMatcher("items", itemStateMatcherNoVis))
83
+ );
84
+ } else {
85
+ vActionMatcher = bReturnAction
86
+ ? [OpaBuilder.Matchers.aggregation("items", itemStateMatcher), FEBuilder.Matchers.atIndex(0)]
87
+ : OpaBuilder.Matchers.aggregationMatcher("items", itemStateMatcher);
88
+ }
72
89
  return vActionMatcher;
73
90
  },
74
91
 
@@ -103,11 +120,11 @@ sap.ui.define(["sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/build
103
120
  }
104
121
 
105
122
  return FEBuilder.create()
106
- .hasType("sap.m.SelectList")
123
+ .hasType("sap.m.List")
107
124
  .isDialogElement(true)
108
125
  .has(APIHelper.createMenuAndListActionMatcher(vAction, true))
109
126
  .doPress()
110
- .description(Utils.formatMessage("Executing action '{0}' from currently open selection list", vAction));
127
+ .description(Utils.formatMessage("Executing action '{0}' from currently open list", vAction));
111
128
  }
112
129
  };
113
130
 
@@ -117,7 +117,7 @@ sap.ui.define(
117
117
 
118
118
  /**
119
119
  * Gets a new builder instance based on the given one.
120
- * @returns {sap.ui.test.OpaBuilder} An OpaBuilder instance
120
+ * @returns {module:sap/ui/test/OpaBuilder} An OpaBuilder instance
121
121
  * @public
122
122
  * @ui5-restricted
123
123
  */
@@ -4,134 +4,158 @@
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
6
6
  */
7
- sap.ui.define(["./DialogAPI", "sap/fe/test/Utils"], function (DialogAPI, Utils) {
8
- "use strict";
7
+ sap.ui.define(
8
+ ["./DialogAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"],
9
+ function (DialogAPI, Utils, OpaBuilder, FEBuilder) {
10
+ "use strict";
9
11
 
10
- /**
11
- * Constructs a new DialogAssertions instance.
12
- * @param {sap.fe.test.builder.DialogBuilder} oDialogBuilder The {@link sap.fe.test.builder.DialogBuilder} instance used to interact with the UI
13
- * @param {string} [vDialogDescription] Description (optional) of the dialog to be used for logging messages
14
- * @param {number} [iConfirmButtonIndex] Index of the 'confirm' button in the button aggregation; the default setting is 0 (first button from the left)
15
- * @returns {sap.fe.test.api.DialogAssertions} The new instance
16
- * @alias sap.fe.test.api.DialogAssertions
17
- * @class
18
- * @hideconstructor
19
- * @public
20
- */
21
- var DialogAssertions = function (oDialogBuilder, vDialogDescription, iConfirmButtonIndex) {
22
- return DialogAPI.call(this, oDialogBuilder, vDialogDescription, iConfirmButtonIndex);
23
- };
24
- DialogAssertions.prototype = Object.create(DialogAPI.prototype);
25
- DialogAssertions.prototype.constructor = DialogAssertions;
26
- DialogAssertions.prototype.isAction = false;
12
+ /**
13
+ * Constructs a new DialogAssertions instance.
14
+ * @param {sap.fe.test.builder.DialogBuilder} oDialogBuilder The {@link sap.fe.test.builder.DialogBuilder} instance used to interact with the UI
15
+ * @param {string} [vDialogDescription] Description (optional) of the dialog to be used for logging messages
16
+ * @param {number} [iConfirmButtonIndex] Index of the 'confirm' button in the button aggregation; the default setting is 0 (first button from the left)
17
+ * @returns {sap.fe.test.api.DialogAssertions} The new instance
18
+ * @alias sap.fe.test.api.DialogAssertions
19
+ * @class
20
+ * @hideconstructor
21
+ * @public
22
+ */
23
+ var DialogAssertions = function (oDialogBuilder, vDialogDescription, iConfirmButtonIndex) {
24
+ return DialogAPI.call(this, oDialogBuilder, vDialogDescription, iConfirmButtonIndex);
25
+ };
26
+ DialogAssertions.prototype = Object.create(DialogAPI.prototype);
27
+ DialogAssertions.prototype.constructor = DialogAssertions;
28
+ DialogAssertions.prototype.isAction = false;
27
29
 
28
- /**
29
- * Checks the dialog.
30
- * @param {object} [mDialogState] Defines the expected state of the dialog
31
- * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
32
- * @public
33
- */
34
- DialogAssertions.prototype.iCheckState = function (mDialogState) {
35
- return this.prepareResult(
36
- this.getBuilder()
37
- .hasState(mDialogState)
38
- .description(Utils.formatMessage("Checking dialog '{0}' in state '{1}'", this.getIdentifier(), mDialogState))
39
- .execute()
40
- );
41
- };
30
+ /**
31
+ * Checks the dialog.
32
+ * @param {object} [mDialogState] Defines the expected state of the dialog
33
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
34
+ * @public
35
+ */
36
+ DialogAssertions.prototype.iCheckState = function (mDialogState) {
37
+ return this.prepareResult(
38
+ this.getBuilder()
39
+ .hasState(mDialogState)
40
+ .description(Utils.formatMessage("Checking dialog '{0}' in state '{1}'", this.getIdentifier(), mDialogState))
41
+ .execute()
42
+ );
43
+ };
42
44
 
43
- /**
44
- * Checks the confirmation button of the dialog.
45
- * @param {object} [mButtonState] Defines the expected state of the button
46
- * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
47
- * @public
48
- */
49
- DialogAssertions.prototype.iCheckConfirm = function (mButtonState) {
50
- return this.prepareResult(
51
- this.getBuilder()
52
- .hasFooterButton(this._getConfirmButtonMatcher(), mButtonState)
53
- .description(
54
- Utils.formatMessage(
55
- "Checking dialog '{0}' having confirmation button with state '{1}'",
56
- this.getIdentifier(),
57
- mButtonState
45
+ /**
46
+ * Checks the confirmation button of the dialog.
47
+ * @param {object} [mButtonState] Defines the expected state of the button
48
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
49
+ * @public
50
+ */
51
+ DialogAssertions.prototype.iCheckConfirm = function (mButtonState) {
52
+ return this.prepareResult(
53
+ this.getBuilder()
54
+ .hasFooterButton(this._getConfirmButtonMatcher(), mButtonState)
55
+ .description(
56
+ Utils.formatMessage(
57
+ "Checking dialog '{0}' having confirmation button with state '{1}'",
58
+ this.getIdentifier(),
59
+ mButtonState
60
+ )
58
61
  )
59
- )
60
- .execute()
61
- );
62
- };
62
+ .execute()
63
+ );
64
+ };
63
65
 
64
- /**
65
- * Checks the cancellation button of the dialog.
66
- * @param {object} [mButtonState] Defines the expected state of the button
67
- * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
68
- * @public
69
- */
70
- DialogAssertions.prototype.iCheckCancel = function (mButtonState) {
71
- return this.prepareResult(
72
- this.getBuilder()
73
- .hasFooterButton(this._getCancelButtonMatcher(), mButtonState)
74
- .description(
75
- Utils.formatMessage(
76
- "Checking dialog '{0}' having cancellation button with state '{1}'",
77
- this.getIdentifier(),
78
- mButtonState
66
+ /**
67
+ * Checks the cancellation button of the dialog.
68
+ * @param {object} [mButtonState] Defines the expected state of the button
69
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
70
+ * @public
71
+ */
72
+ DialogAssertions.prototype.iCheckCancel = function (mButtonState) {
73
+ return this.prepareResult(
74
+ this.getBuilder()
75
+ .hasFooterButton(this._getCancelButtonMatcher(), mButtonState)
76
+ .description(
77
+ Utils.formatMessage(
78
+ "Checking dialog '{0}' having cancellation button with state '{1}'",
79
+ this.getIdentifier(),
80
+ mButtonState
81
+ )
79
82
  )
80
- )
81
- .execute()
82
- );
83
- };
83
+ .execute()
84
+ );
85
+ };
84
86
 
85
- /**
86
- * Checks the content and state of a field in a dialog.
87
- * @param {sap.fe.test.api.DialogFieldIdentifier} vFieldIdentifier The identifier of the field
88
- * @param {string | Array | object} [vValue] Expected value(s) of the field.
89
- * if passed as an object, the following pattern will be considered:
90
- * <code><pre>
91
- * {
92
- * value: <string>, // optional
93
- * }
94
- * </pre></code>
95
- * @param {object} [mState] Defines the expected state of the field
96
- * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
97
- * @public
98
- */
99
- DialogAssertions.prototype.iCheckDialogField = function (vFieldIdentifier, vValue, mState) {
100
- var aArguments = Utils.parseArguments([Object, [String, Array, Object], Object], arguments);
101
- return this.prepareResult(
102
- this._createFieldBuilder(vFieldIdentifier, this.getIdentifier())
103
- .hasValue(aArguments[1])
104
- .hasState(aArguments[2])
105
- .description(
106
- Utils.formatMessage(
107
- "Checking field '{1}' of dialog '{0}' with content '{2}' and state '{3}'",
108
- this.getIdentifier(),
109
- aArguments[0],
110
- aArguments[1],
111
- aArguments[2]
87
+ /**
88
+ * Checks the content and state of a field in a dialog.
89
+ * @param {sap.fe.test.api.DialogFieldIdentifier} vFieldIdentifier The identifier of the field
90
+ * @param {string | Array | object} [vValue] Expected value(s) of the field.
91
+ * if passed as an object, the following pattern will be considered:
92
+ * <code><pre>
93
+ * {
94
+ * value: <string>, // optional
95
+ * }
96
+ * </pre></code>
97
+ * @param {object} [mState] Defines the expected state of the field
98
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
99
+ * @public
100
+ */
101
+ DialogAssertions.prototype.iCheckDialogField = function (vFieldIdentifier, vValue, mState) {
102
+ var aArguments = Utils.parseArguments([Object, [String, Array, Object], Object], arguments);
103
+ return this.prepareResult(
104
+ this._createFieldBuilder(vFieldIdentifier, this.getIdentifier())
105
+ .hasValue(aArguments[1])
106
+ .hasState(aArguments[2])
107
+ .description(
108
+ Utils.formatMessage(
109
+ "Checking field '{1}' of dialog '{0}' with content '{2}' and state '{3}'",
110
+ this.getIdentifier(),
111
+ aArguments[0],
112
+ aArguments[1],
113
+ aArguments[2]
114
+ )
112
115
  )
113
- )
114
- .execute()
115
- );
116
- };
116
+ .execute()
117
+ );
118
+ };
117
119
 
118
- /**
119
- * Checks the content and state of a field in an action parameter dialog.
120
- * @param {sap.fe.test.api.ActionDialogFieldIdentifier} vFieldIdentifier The identifier of the field
121
- * @param {string | Array | object} [vValue] Expected value(s) of the field.
122
- * if passed as an object, the following pattern will be considered:
123
- * <code><pre>
124
- * {
125
- * value: <string>, // optional
126
- * }
127
- * </pre></code>
128
- * @param {object} [mState] Defines the expected state of the field
129
- * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
130
- * @public
131
- */
132
- DialogAssertions.prototype.iCheckActionParameterDialogField = function (vFieldIdentifier, vValue, mState) {
133
- return this.iCheckDialogField(vFieldIdentifier, vValue, mState);
134
- };
120
+ /**
121
+ * Checks the content and state of a field in an action parameter dialog.
122
+ * @param {sap.fe.test.api.ActionDialogFieldIdentifier} vFieldIdentifier The identifier of the field
123
+ * @param {string | Array | object} [vValue] Expected value(s) of the field.
124
+ * if passed as an object, the following pattern will be considered:
125
+ * <code><pre>
126
+ * {
127
+ * value: <string>, // optional
128
+ * }
129
+ * </pre></code>
130
+ * @param {object} [mState] Defines the expected state of the field
131
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
132
+ * @public
133
+ */
134
+ DialogAssertions.prototype.iCheckActionParameterDialogField = function (vFieldIdentifier, vValue, mState) {
135
+ return this.iCheckDialogField(vFieldIdentifier, vValue, mState);
136
+ };
135
137
 
136
- return DialogAssertions;
137
- });
138
+ /**
139
+ * Checks a Contact popup dialog.
140
+ * @param {object} [mState] The expected state of dialog elements
141
+ * Example: { controlType: "sap.m.Title", text: "Domestic HK Customer 1" }
142
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
143
+ * @public
144
+ */
145
+ DialogAssertions.prototype.iCheckContactDialog = function (mState) {
146
+ var contactLinkMatcher = OpaBuilder.Matchers.children(FEBuilder.Matchers.states(mState)),
147
+ oContactPopoverBuilder = FEBuilder.createPopoverBuilder(this.getOpaInstance(), contactLinkMatcher);
148
+
149
+ return this.prepareResult(
150
+ oContactPopoverBuilder
151
+ .check(function (oPopover) {
152
+ return oPopover[0].length === 1;
153
+ })
154
+ .description(Utils.formatMessage("Checking contact dialog having state '{0}'", mState))
155
+ .execute()
156
+ );
157
+ };
158
+
159
+ return DialogAssertions;
160
+ }
161
+ );
@@ -125,6 +125,23 @@ sap.ui.define(
125
125
  );
126
126
  };
127
127
 
128
+ /**
129
+ * Clicks a link for a contact-field within a form.
130
+ * @param {string} linkContent The content of the link to be clicked
131
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
132
+ * @public
133
+ */
134
+ FormActions.prototype.iClickContactLink = function (linkContent) {
135
+ return this.prepareResult(
136
+ OpaBuilder.create(this)
137
+ .hasType("sap.m.Link")
138
+ .hasProperties({ text: linkContent })
139
+ .doPress()
140
+ .description("Clicking link with content '" + linkContent + "'")
141
+ .execute()
142
+ );
143
+ };
144
+
128
145
  FormActions.prototype.iClickObjectStatus = function (vFieldIdentifier) {
129
146
  return this.prepareResult(
130
147
  this.createFieldBuilder(vFieldIdentifier)
@@ -206,11 +206,9 @@ sap.ui.define(
206
206
 
207
207
  /**
208
208
  * Clicks a link within the object page header.
209
- *
210
- * TODO this function will not made public as it is, it needs some refactoring to behave similar to the FormActions#iClickLink function.
211
- * @param {string} vLinkIdentifier The label of the link to be clicked (TODO it actually must be the link text with the current implementation)
209
+ * @param {string} vLinkIdentifier The content of the link to be clicked. It currently has to be the link text itself, not the label of the field.
212
210
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
213
- * @ui5-restricted
211
+ * @public
214
212
  */
215
213
  HeaderActions.prototype.iClickLink = function (vLinkIdentifier) {
216
214
  // TODO this function needs to aligned with onForm().iClickLink - for now vLinkIdentifier must be the link text!
@@ -198,6 +198,165 @@ sap.ui.define(
198
198
  );
199
199
  };
200
200
 
201
+ /**
202
+ * Checks a progress indicator data point in the object page header.
203
+ * @param {string} Title The title of the progress indicator
204
+ * @param {number} PercentValue The expected value of the progress indicator
205
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
206
+ * @public
207
+ */
208
+ HeaderAssertions.prototype.iCheckProgressIndicator = function (Title, PercentValue) {
209
+ var oHeaderContentBuilder = this.getObjectPageDynamicHeaderContentBuilder(this._sHeaderContentId);
210
+
211
+ return this.prepareResult(
212
+ oHeaderContentBuilder
213
+ .has(
214
+ OpaBuilder.Matchers.childrenMatcher(
215
+ OpaBuilder.create(this)
216
+ .hasType("sap.m.ProgressIndicator")
217
+ .check(function (aObjects) {
218
+ for (let i = 0; i < aObjects.length; i++) {
219
+ const oProgressIndicator = aObjects[i];
220
+ const currentValue = oProgressIndicator.getProperty("percentValue");
221
+
222
+ if (currentValue === PercentValue) {
223
+ //return true;
224
+
225
+ const aParentContent = oProgressIndicator.getParent().getParent().getItems();
226
+ for (let j = 0; j < aParentContent.length; j++) {
227
+ const oItem = aParentContent[j];
228
+ if (oItem.getMetadata().getName() === "sap.m.Title") {
229
+ if (oItem.getContent().getProperty("text") === Title) {
230
+ return true;
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ return false;
237
+ })
238
+ .execute()
239
+ )
240
+ )
241
+ .description(
242
+ Utils.formatMessage("Seeing header data point progress indicator '{0}' with value '{1}'", Title, PercentValue)
243
+ )
244
+ .execute()
245
+ );
246
+ };
247
+ /**
248
+ * Checks a rating indicator data point in the object page header.
249
+ * @param {string} Title The title of the rating indicator
250
+ * @param {number} Value The expected value of the rating indicator
251
+ * @param {number} MaxValue The expected maximum value of the rating indicator
252
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
253
+ * @public
254
+ */
255
+ HeaderAssertions.prototype.iCheckRatingIndicator = function (Title, Value, MaxValue) {
256
+ var oHeaderContentBuilder = this.getObjectPageDynamicHeaderContentBuilder(this._sHeaderContentId);
257
+
258
+ return this.prepareResult(
259
+ oHeaderContentBuilder
260
+ .has(
261
+ OpaBuilder.Matchers.childrenMatcher(
262
+ OpaBuilder.create(this)
263
+ .hasType("sap.m.RatingIndicator")
264
+ .check(function (aObjects) {
265
+ for (let i = 0; i < aObjects.length; i++) {
266
+ const oRatingIndicator = aObjects[i];
267
+ const currentValue = oRatingIndicator.getProperty("value");
268
+ const currentMaxValue = oRatingIndicator.getProperty("maxValue");
269
+
270
+ if (currentValue === Value && currentMaxValue === MaxValue) {
271
+ //return true;
272
+
273
+ const aParentContent = oRatingIndicator.getParent().getParent().getItems();
274
+ for (let j = 0; j < aParentContent.length; j++) {
275
+ const oItem = aParentContent[j];
276
+ if (oItem.getMetadata().getName() === "sap.m.Title") {
277
+ if (oItem.getContent().getProperty("text") === Title) {
278
+ return true;
279
+ }
280
+ }
281
+ }
282
+ }
283
+ }
284
+ return false;
285
+ })
286
+ .execute()
287
+ )
288
+ )
289
+ .description(
290
+ Utils.formatMessage(
291
+ "Seeing header data point rating indicator '{0}' with value '{1}' and max value '{2}'",
292
+ Title,
293
+ Value,
294
+ MaxValue
295
+ )
296
+ )
297
+ .execute()
298
+ );
299
+ };
300
+ /**
301
+ * Checks a data point of type ObjectNumberin the object page header.
302
+ * @param {string} Title The title of the data point
303
+ * @param {string} Value The expected value of the data point
304
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
305
+ * @ui5-restricted
306
+ */
307
+ HeaderAssertions.prototype.iCheckDataPointObjectNumber = function (Title, Value) {
308
+ var oHeaderContentBuilder = this.getObjectPageDynamicHeaderContentBuilder(this._sHeaderContentId);
309
+
310
+ return this.prepareResult(
311
+ oHeaderContentBuilder
312
+ .has(
313
+ OpaBuilder.Matchers.childrenMatcher(
314
+ OpaBuilder.create(this)
315
+ .hasType("sap.m.ObjectNumber")
316
+ .hasProperties({ number: Value })
317
+ .has(function (oObjectNumber) {
318
+ return oObjectNumber.getParent().getParent();
319
+ })
320
+ .hasAggregationProperties("items", { text: Title })
321
+ .execute()
322
+ )
323
+ )
324
+ .description(Utils.formatMessage("Seeing header data point object number '{0}' with value '{1}'", Title, Value))
325
+ .execute()
326
+ );
327
+ };
328
+ /**
329
+ * Checks a data point of type ObjectStatus in the object page header.
330
+ * @param {string} Title The title of the data point
331
+ * @param {string} Value The expected value of the data point
332
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
333
+ * @ui5-restricted
334
+ */
335
+ HeaderAssertions.prototype.iCheckDataPointObjectStatus = function (Title, Value) {
336
+ var oHeaderContentBuilder = this.getObjectPageDynamicHeaderContentBuilder(this._sHeaderContentId);
337
+
338
+ return this.prepareResult(
339
+ oHeaderContentBuilder
340
+ .has(
341
+ OpaBuilder.Matchers.childrenMatcher(
342
+ OpaBuilder.create(this)
343
+ .hasType("sap.m.Title")
344
+ .hasProperties({ text: Title })
345
+ .has(function (myObject) {
346
+ return myObject.getParent();
347
+ })
348
+ .hasChildren(OpaBuilder.create(this).hasType("sap.m.ObjectStatus").execute())
349
+ .check(function (aObject) {
350
+ return aObject[0].getItems()[1].getContent().getProperty("text") === Value;
351
+ })
352
+ .execute()
353
+ )
354
+ )
355
+ .description(Utils.formatMessage("Seeing header data point object status '{0}' with value '{1}'", Title, Value))
356
+ .execute()
357
+ );
358
+ };
359
+
201
360
  /**
202
361
  * Checks a data point in the object page header.
203
362
  * @param {string} sTitle The title of the data point
@@ -217,16 +376,18 @@ sap.ui.define(
217
376
  .hasType("sap.m.ObjectNumber")
218
377
  .hasProperties({ number: sValue })
219
378
  .has(function (oObjectNumber) {
220
- return oObjectNumber.getParent();
379
+ return oObjectNumber.getParent().getParent();
221
380
  })
222
- .hasAggregationProperties("items", { text: sTitle }),
381
+ .hasAggregationProperties("items", { text: sTitle })
382
+ .execute(),
223
383
  OpaBuilder.create(this)
224
384
  .hasType("sap.m.ObjectStatus")
225
385
  .hasProperties({ text: sValue })
226
386
  .has(function (oObjectNumber) {
227
- return oObjectNumber.getParent();
387
+ return oObjectNumber.getParent().getParent();
228
388
  })
229
389
  .hasAggregationProperties("items", { text: sTitle })
390
+ .execute()
230
391
  ])
231
392
  )
232
393
  )
@@ -305,12 +466,10 @@ sap.ui.define(
305
466
 
306
467
  /**
307
468
  * Checks a MicroChart shown in the header of an object page.
308
- *
309
- * TODO this function will not be public yet: Its signature doesn't fit the framework.
310
469
  * @param {object|string} vMicroChartIdentifier Id/Type or Title of MicroChart
311
470
  * @param {string} sUoMLabel UoM label of the MicroChart
312
471
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
313
- * @ui5-restricted
472
+ * @public
314
473
  */
315
474
  HeaderAssertions.prototype.iCheckMicroChart = function (vMicroChartIdentifier, sUoMLabel) {
316
475
  var oOpaBuilder = OpaBuilder.create(this.getOpaInstance());
@@ -255,7 +255,7 @@ sap.ui.define(
255
255
  * </pre></code>
256
256
  * @param {Function|Array|sap.ui.test.actions.Action} [vActions] The actions to be executed on found field
257
257
  * @param {string} sDescription The description of the check or adaptation
258
- * @param {sap.ui.test.OpaBuilder} oDialogBuilder The dialog builder
258
+ * @param {module:sap/ui/test/OpaBuilder} oDialogBuilder The dialog builder
259
259
  * @param {Function} fnOpenDialog A callback for opening the dialog
260
260
  * @param {Function} fnCloseDialog A callback for closing the dialog
261
261
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
@@ -344,7 +344,7 @@ sap.ui.define(
344
344
  * </pre></code>
345
345
  * @param {Function|Array|sap.ui.test.actions.Action} [vActions] The actions to be executed on found field
346
346
  * @param {string} sDescription The description of the check or adaptation
347
- * @param {sap.ui.test.OpaBuilder} oDialogBuilder The dialog builder
347
+ * @param {module:sap/ui/test/OpaBuilder} oDialogBuilder The dialog builder
348
348
  * @param {Function} fnOpenDialog A callback for opening the dialog
349
349
  * @param {Function} fnCloseDialog A callback for closing the dialog
350
350
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
@@ -117,7 +117,7 @@ sap.ui.define(
117
117
  * Remark: Currently there is no official API to retrieve this button; an alternative way to achieve the same
118
118
  * result might be to check oMenuButton.getButtonMode() === "Split" && oMenuButton.getUseDefaultActionOnly()
119
119
  * first, and then call oMenuButton.fireDefaultAction(), but the interface parameter vContentAction expects
120
- * a sap.m.button nonetheless. Hence, we currently use the internal aggregation names as a workaround.
120
+ * a sap.m.Button nonetheless. Hence, we currently use the internal aggregation names as a workaround.
121
121
  */
122
122
  return oMenuButton.getAggregation("_button")
123
123
  ? oMenuButton.getAggregation("_button").getAggregation("_textButton")
@@ -89,6 +89,7 @@ sap.ui.define(
89
89
  oContent.isA("sap.m.ObjectStatus") ||
90
90
  oContent.isA("sap.m.InputBase") ||
91
91
  oContent.isA("sap.m.Avatar") ||
92
+ oContent.isA("sap.fe.macros.controls.Avatar") ||
92
93
  oContent.isA("sap.m.ObjectIdentifier") ||
93
94
  oContent.isA("sap.m.RatingIndicator") ||
94
95
  oContent.isA("sap.m.ProgressIndicator") ||
@@ -105,6 +106,7 @@ sap.ui.define(
105
106
  FEBuilder.Matchers.state("controlType", "sap.m.ObjectStatus"),
106
107
  FEBuilder.Matchers.state("controlType", "sap.m.InputBase"),
107
108
  FEBuilder.Matchers.state("controlType", "sap.m.Avatar"),
109
+ FEBuilder.Matchers.state("controlType", "sap.fe.macros.controls.Avatar"),
108
110
  FEBuilder.Matchers.state("controlType", "sap.m.ObjectIdentifier"),
109
111
  FEBuilder.Matchers.state("controlType", "sap.m.RatingIndicator"),
110
112
  FEBuilder.Matchers.state("controlType", "sap.m.ProgressIndicator")