@sapui5/sap.fe.test 1.102.3 → 1.105.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 +4 -5
  2. package/src/sap/fe/test/.library +1 -1
  3. package/src/sap/fe/test/BaseActions.js +103 -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 -3
  9. package/src/sap/fe/test/FeMocks.ts +4 -7
  10. package/src/sap/fe/test/Flexibility.js +115 -162
  11. package/src/sap/fe/test/JestTemplatingHelper.js +196 -14
  12. package/src/sap/fe/test/JestTemplatingHelper.ts +173 -18
  13. package/src/sap/fe/test/JourneyRunner.js +31 -37
  14. package/src/sap/fe/test/ListReport.js +30 -13
  15. package/src/sap/fe/test/ObjectPage.js +43 -33
  16. package/src/sap/fe/test/Shell.js +0 -6
  17. package/src/sap/fe/test/TemplatePage.js +0 -2
  18. package/src/sap/fe/test/TemplatingTestUtils.js +20 -20
  19. package/src/sap/fe/test/UI5MockHelper.js +373 -320
  20. package/src/sap/fe/test/UI5MockHelper.ts +388 -241
  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 +9 -10
  30. package/src/sap/fe/test/api/DialogHelper.js +63 -0
  31. package/src/sap/fe/test/api/DialogMessageActions.js +2 -1
  32. package/src/sap/fe/test/api/DialogValueHelpActions.js +17 -39
  33. package/src/sap/fe/test/api/DialogValueHelpAssertions.js +47 -19
  34. package/src/sap/fe/test/api/FilterBarAPI.js +11 -12
  35. package/src/sap/fe/test/api/FilterBarActions.js +26 -40
  36. package/src/sap/fe/test/api/FilterBarAssertions.js +28 -47
  37. package/src/sap/fe/test/api/FooterActionsBase.js +3 -4
  38. package/src/sap/fe/test/api/FooterActionsOP.js +6 -10
  39. package/src/sap/fe/test/api/FooterAssertionsBase.js +5 -10
  40. package/src/sap/fe/test/api/FooterAssertionsOP.js +8 -13
  41. package/src/sap/fe/test/api/FormAPI.js +5 -6
  42. package/src/sap/fe/test/api/FormActions.js +20 -21
  43. package/src/sap/fe/test/api/FormAssertions.js +14 -20
  44. package/src/sap/fe/test/api/HeaderAPI.js +12 -27
  45. package/src/sap/fe/test/api/HeaderActions.js +10 -12
  46. package/src/sap/fe/test/api/HeaderActionsLR.js +76 -82
  47. package/src/sap/fe/test/api/HeaderAssertions.js +18 -27
  48. package/src/sap/fe/test/api/HeaderAssertionsLR.js +5 -8
  49. package/src/sap/fe/test/api/HeaderLR.js +7 -19
  50. package/src/sap/fe/test/api/KPICardAssertions.js +18 -37
  51. package/src/sap/fe/test/api/TableAPI.js +3 -13
  52. package/src/sap/fe/test/api/TableActions.js +2 -34
  53. package/src/sap/fe/test/api/TableAssertions.js +1 -24
  54. package/src/sap/fe/test/builder/FEBuilder.js +71 -75
  55. package/src/sap/fe/test/builder/MacroFieldBuilder.js +4 -3
  56. package/src/sap/fe/test/builder/MdcFieldBuilder.js +33 -29
  57. package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +102 -104
  58. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +9 -7
  59. package/src/sap/fe/test/builder/MdcTableBuilder.js +8 -4
  60. package/src/sap/fe/test/builder/VMBuilder.js +39 -55
  61. package/src/sap/fe/test/internal/ConsoleErrorChecker.js +241 -0
  62. package/src/sap/fe/test/internal/ConsoleErrorChecker.ts +206 -0
  63. package/src/sap/fe/test/internal/FEArrangements.js +28 -8
  64. package/src/sap/fe/test/library.js +3 -2
  65. package/src/sap/fe/test/library.ts +1 -0
@@ -45,7 +45,6 @@ sap.ui.define(
45
45
  * @param {string | sap.fe.test.api.ActionIdentifier} vActionIdentifier The identifier of the action
46
46
  * @param {object} [mState] Defines the expected state of the button
47
47
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
48
- *
49
48
  * @public
50
49
  */
51
50
  HeaderAssertions.prototype.iCheckAction = function (vActionIdentifier, mState) {
@@ -63,7 +62,6 @@ sap.ui.define(
63
62
  *
64
63
  * @param {object} [mState] Defines the expected state of the button
65
64
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
66
- *
67
65
  * @public
68
66
  */
69
67
  HeaderAssertions.prototype.iCheckEdit = function (mState) {
@@ -75,7 +73,6 @@ sap.ui.define(
75
73
  *
76
74
  * @param {object} [mState] Defines the expected state of the button
77
75
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
78
- *
79
76
  * @public
80
77
  */
81
78
  HeaderAssertions.prototype.iCheckDelete = function (mState) {
@@ -87,7 +84,6 @@ sap.ui.define(
87
84
  *
88
85
  * @param {object} [mState] Defines the expected state of the button
89
86
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
90
- *
91
87
  * @public
92
88
  */
93
89
  HeaderAssertions.prototype.iCheckRelatedApps = function (mState) {
@@ -99,7 +95,6 @@ sap.ui.define(
99
95
  *
100
96
  * @param {object | string} vAction The state map or label of the action
101
97
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
102
- *
103
98
  * @public
104
99
  */
105
100
  HeaderAssertions.prototype.iCheckMenuAction = function (vAction) {
@@ -112,7 +107,6 @@ sap.ui.define(
112
107
  * @param {number} iNumberOfItems The expected number of items
113
108
  * @param {boolean} [bIncludeHidden] Defines whether non-visible items should be counted
114
109
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
115
- *
116
110
  * @ui5-restricted
117
111
  */
118
112
  HeaderAssertions.prototype.iCheckNumberOfHeaderContentItems = function (iNumberOfItems, bIncludeHidden) {
@@ -148,7 +142,6 @@ sap.ui.define(
148
142
  * </pre></code>
149
143
  * @param {object} [mState] Defines the expected state of the field
150
144
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
151
- *
152
145
  * @public
153
146
  */
154
147
  HeaderAssertions.prototype.iCheckFieldInFieldGroup = function (vFieldIdentifier, vValue, mState) {
@@ -181,7 +174,6 @@ sap.ui.define(
181
174
  * @param {string} sTitle The title of the data point
182
175
  * @param {string} sValue The expected value of the data point
183
176
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
184
- *
185
177
  * @ui5-restricted
186
178
  */
187
179
  HeaderAssertions.prototype.iCheckDataPoint = function (sTitle, sValue) {
@@ -191,13 +183,22 @@ sap.ui.define(
191
183
  oHeaderContentBuilder
192
184
  .has(
193
185
  OpaBuilder.Matchers.childrenMatcher(
194
- OpaBuilder.create(this)
195
- .hasType("sap.m.ObjectNumber")
196
- .hasProperties({ number: sValue })
197
- .has(function (oObjectNumber) {
198
- return oObjectNumber.getParent();
199
- })
200
- .hasAggregationProperties("items", { text: sTitle })
186
+ OpaBuilder.Matchers.some([
187
+ OpaBuilder.create(this)
188
+ .hasType("sap.m.ObjectNumber")
189
+ .hasProperties({ number: sValue })
190
+ .has(function (oObjectNumber) {
191
+ return oObjectNumber.getParent();
192
+ })
193
+ .hasAggregationProperties("items", { text: sTitle }),
194
+ OpaBuilder.create(this)
195
+ .hasType("sap.m.ObjectStatus")
196
+ .hasProperties({ text: sValue })
197
+ .has(function (oObjectNumber) {
198
+ return oObjectNumber.getParent();
199
+ })
200
+ .hasAggregationProperties("items", { text: sTitle })
201
+ ])
201
202
  )
202
203
  )
203
204
  .description(Utils.formatMessage("Seeing header data point '{0}' with value '{1}'", sTitle, sValue))
@@ -213,7 +214,6 @@ sap.ui.define(
213
214
  * @param {string} [sTitle] Title of the object page header
214
215
  * @param {string} [sDescription] Description of the object page header
215
216
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
216
- *
217
217
  * @public
218
218
  */
219
219
  HeaderAssertions.prototype.iCheckTitle = function (sTitle, sDescription) {
@@ -244,7 +244,6 @@ sap.ui.define(
244
244
  *
245
245
  * @param {object} mState Defines the expected state of the button
246
246
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
247
- *
248
247
  * @public
249
248
  */
250
249
  HeaderAssertions.prototype.iCheckPaginatorDown = function (mState) {
@@ -264,7 +263,6 @@ sap.ui.define(
264
263
  *
265
264
  * @param {object} mState Defines the expected state of the button
266
265
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
267
- *
268
266
  * @public
269
267
  */
270
268
  HeaderAssertions.prototype.iCheckPaginatorUp = function (mState) {
@@ -283,8 +281,9 @@ sap.ui.define(
283
281
  * Checks a MicroChart shown in the header of an object page.
284
282
  *
285
283
  * TODO this function will not be public yet: Its signature doesn't fit the framework.
284
+ *
286
285
  * @param {object|string} vMicroChartIdentifier Id/Type or Title of MicroChart
287
- * @param sUoMLabel UoM label of the MicroChart
286
+ * @param {string} sUoMLabel UoM label of the MicroChart
288
287
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
289
288
  * @ui5-restricted
290
289
  */
@@ -340,7 +339,6 @@ sap.ui.define(
340
339
  * @param {sap.fe.test.api.HeaderFacetIdentifier} vFacetIdentifier The Identifier of the header facet
341
340
  * @param {object} [mState] Defines the expected state
342
341
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
343
- *
344
342
  * @public
345
343
  */
346
344
  HeaderAssertions.prototype.iCheckHeaderFacet = function (vFacetIdentifier, mState) {
@@ -373,9 +371,7 @@ sap.ui.define(
373
371
  * This is the case for the main object page, which does not show breadcrumb links.
374
372
  * If <code>sLink</code> is not provided, a check is executed to ensure the breadcrumb control does not exist at all. This is the case for the flexible column layout
375
373
  * showing multiple floorplans at the same time.
376
- *
377
374
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
378
- *
379
375
  * @ui5-restricted
380
376
  */
381
377
  HeaderAssertions.prototype.iCheckBreadCrumb = function (sLink) {
@@ -401,7 +397,6 @@ sap.ui.define(
401
397
  *
402
398
  * @param {object} [mState] Defines the expected state of the button
403
399
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
404
- *
405
400
  * @public
406
401
  */
407
402
  HeaderAssertions.prototype.iCheckSaveAsTile = function (mState) {
@@ -427,7 +422,6 @@ sap.ui.define(
427
422
  *
428
423
  * @param {object} [mState] Defines the expected state of the button
429
424
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
430
- *
431
425
  * @public
432
426
  */
433
427
  HeaderAssertions.prototype.iCheckSendEmail = function (mState) {
@@ -456,7 +450,6 @@ sap.ui.define(
456
450
  * @param {object | string} vLinkIdentifier The identifier of the field
457
451
  * @param {object} [mState] Defines the expected state of the link
458
452
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
459
- *
460
453
  * @private
461
454
  */
462
455
  HeaderAssertions.prototype.iCheckLink = function (vLinkIdentifier, mState) {
@@ -480,7 +473,6 @@ sap.ui.define(
480
473
  *
481
474
  * @param {number} iExpectedNumber The expected number of users
482
475
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
483
- *
484
476
  * @ui5-restricted
485
477
  */
486
478
  HeaderAssertions.prototype.iCheckNumberOfCollaboratingUsers = function (iExpectedNumber) {
@@ -507,7 +499,6 @@ sap.ui.define(
507
499
  *
508
500
  * @param {string} sInitials The initials of the user (displayed in the avatar)
509
501
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
510
- *
511
502
  * @ui5-restricted
512
503
  */
513
504
  HeaderAssertions.prototype.iCheckCollaboratingUser = function (sInitials) {
@@ -12,7 +12,7 @@ sap.ui.define(
12
12
  "sap/fe/test/builder/MdcFieldBuilder",
13
13
  "./APIHelper"
14
14
  ],
15
- function(HeaderLR, Utils, OpaBuilder, FEBuilder, FieldBuilder, APIHelper) {
15
+ function (HeaderLR, Utils, OpaBuilder, FEBuilder, FieldBuilder, APIHelper) {
16
16
  "use strict";
17
17
 
18
18
  /**
@@ -26,7 +26,7 @@ sap.ui.define(
26
26
  * @hideconstructor
27
27
  * @public
28
28
  */
29
- var HeaderAssertionsLR = function(oHeaderBuilder, vHeaderDescription) {
29
+ var HeaderAssertionsLR = function (oHeaderBuilder, vHeaderDescription) {
30
30
  return HeaderLR.call(this, oHeaderBuilder, vHeaderDescription);
31
31
  };
32
32
  HeaderAssertionsLR.prototype = Object.create(HeaderLR.prototype);
@@ -39,10 +39,9 @@ sap.ui.define(
39
39
  * @param {string | sap.fe.test.api.ActionIdentifier} [vActionIdentifier] The identifier of the action, or its label
40
40
  * @param {object} [mState] Defines the expected state of the button
41
41
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
42
- *
43
42
  * @public
44
43
  */
45
- HeaderAssertionsLR.prototype.iCheckAction = function(vActionIdentifier, mState) {
44
+ HeaderAssertionsLR.prototype.iCheckAction = function (vActionIdentifier, mState) {
46
45
  var aArguments = Utils.parseArguments([[Object, String], Object], arguments),
47
46
  oOverflowToolbarBuilder = this.createOverflowToolbarBuilder(this._sPageId);
48
47
  return this.prepareResult(
@@ -58,10 +57,9 @@ sap.ui.define(
58
57
  *
59
58
  * @param {object} [mState] Defines the expected state of the button
60
59
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
61
- *
62
60
  * @public
63
61
  */
64
- HeaderAssertionsLR.prototype.iCheckSaveAsTile = function(mState) {
62
+ HeaderAssertionsLR.prototype.iCheckSaveAsTile = function (mState) {
65
63
  var oOverflowToolbarBuilder = this.createOverflowToolbarBuilder(this._sPageId),
66
64
  sShareId = "fe::Share";
67
65
 
@@ -84,10 +82,9 @@ sap.ui.define(
84
82
  *
85
83
  * @param {object} [mState] Defines the expected state of the button
86
84
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
87
- *
88
85
  * @public
89
86
  */
90
- HeaderAssertionsLR.prototype.iCheckSendEmail = function(mState) {
87
+ HeaderAssertionsLR.prototype.iCheckSendEmail = function (mState) {
91
88
  var oOverflowToolbarBuilder = this.createOverflowToolbarBuilder(this._sPageId),
92
89
  sShareId = "fe::Share";
93
90
 
@@ -12,7 +12,7 @@ sap.ui.define(
12
12
  "sap/fe/test/builder/OverflowToolbarBuilder",
13
13
  "sap/fe/core/helpers/StableIdHelper"
14
14
  ],
15
- function(BaseAPI, Utils, OpaBuilder, FEBuilder, OverflowToolbarBuilder, StableIdHelper) {
15
+ function (BaseAPI, Utils, OpaBuilder, FEBuilder, OverflowToolbarBuilder, StableIdHelper) {
16
16
  "use strict";
17
17
 
18
18
  /**
@@ -26,7 +26,7 @@ sap.ui.define(
26
26
  * @hideconstructor
27
27
  * @private
28
28
  */
29
- var HeaderLR = function(oHeaderBuilder, vHeaderDescription) {
29
+ var HeaderLR = function (oHeaderBuilder, vHeaderDescription) {
30
30
  if (!Utils.isOfType(oHeaderBuilder, FEBuilder)) {
31
31
  throw new Error("oHeaderBuilder parameter must be a FEBuilder instance");
32
32
  }
@@ -43,28 +43,16 @@ sap.ui.define(
43
43
  *
44
44
  * @param {string} sPageId The id of page control.
45
45
  * @returns {object} OverflowToolbarBuilder object
46
- *
47
46
  * @ui5-restricted
48
47
  */
49
- HeaderLR.prototype.createOverflowToolbarBuilder = function(sPageId) {
48
+ HeaderLR.prototype.createOverflowToolbarBuilder = function (sPageId) {
50
49
  return OverflowToolbarBuilder.create(this.getOpaInstance())
51
50
  .hasType("sap.m.OverflowToolbar")
52
- .has(function(oOverflowToolbar) {
51
+ .has(function (oOverflowToolbar) {
53
52
  return (
54
- oOverflowToolbar
55
- .getParent()
56
- .getMetadata()
57
- .getName() === "sap.f.DynamicPageTitle" &&
58
- oOverflowToolbar
59
- .getParent()
60
- .getParent()
61
- .getMetadata()
62
- .getName() === "sap.f.DynamicPage" &&
63
- oOverflowToolbar
64
- .getParent()
65
- .getParent()
66
- .getId()
67
- .endsWith(sPageId)
53
+ oOverflowToolbar.getParent().getMetadata().getName() === "sap.f.DynamicPageTitle" &&
54
+ oOverflowToolbar.getParent().getParent().getMetadata().getName() === "sap.f.DynamicPage" &&
55
+ oOverflowToolbar.getParent().getParent().getId().endsWith(sPageId)
68
56
  );
69
57
  });
70
58
  };
@@ -3,7 +3,7 @@
3
3
  (c) Copyright 2009-2021 SAP SE. All rights reserved
4
4
 
5
5
  */
6
- sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuilder"], function(KPICardAPI, Utils, FEBuilder) {
6
+ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuilder"], function (KPICardAPI, Utils, FEBuilder) {
7
7
  "use strict";
8
8
 
9
9
  /**
@@ -16,7 +16,7 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
16
16
  * @hideconstructor
17
17
  * @public
18
18
  */
19
- var KPICardAssertions = function(oBuilderInstance) {
19
+ var KPICardAssertions = function (oBuilderInstance) {
20
20
  return KPICardAPI.call(this, oBuilderInstance);
21
21
  };
22
22
  KPICardAssertions.prototype = Object.create(KPICardAPI.prototype);
@@ -29,11 +29,11 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
29
29
  * @param {string} sTitle The expected title
30
30
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
31
31
  */
32
- KPICardAssertions.prototype.iSeeHeaderTitle = function(sTitle) {
32
+ KPICardAssertions.prototype.iSeeHeaderTitle = function (sTitle) {
33
33
  var oKPIBuilder = this.getBuilder();
34
34
  var vTitleMatcher = FEBuilder.create(this)
35
35
  .hasType("sap.m.Text")
36
- .has(function(oControl) {
36
+ .has(function (oControl) {
37
37
  return oControl.getId().endsWith("-title");
38
38
  })
39
39
  .hasProperties({ text: sTitle });
@@ -52,11 +52,11 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
52
52
  * @param {string} sSubtitle The expected title
53
53
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
54
54
  */
55
- KPICardAssertions.prototype.iSeeHeaderSubtitle = function(sSubtitle) {
55
+ KPICardAssertions.prototype.iSeeHeaderSubtitle = function (sSubtitle) {
56
56
  var oKPIBuilder = this.getBuilder();
57
57
  var vTitleMatcher = FEBuilder.create(this)
58
58
  .hasType("sap.m.Text")
59
- .has(function(oControl) {
59
+ .has(function (oControl) {
60
60
  return oControl.getId().endsWith("-subtitle");
61
61
  })
62
62
  .hasProperties({ text: sSubtitle });
@@ -75,11 +75,11 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
75
75
  * @param {string} sText The expected unit
76
76
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
77
77
  */
78
- KPICardAssertions.prototype.iSeeHeaderUnit = function(sText) {
78
+ KPICardAssertions.prototype.iSeeHeaderUnit = function (sText) {
79
79
  var oKPIBuilder = this.getBuilder();
80
80
  var vTitleMatcher = FEBuilder.create(this)
81
81
  .hasType("sap.m.Text")
82
- .has(function(oControl) {
82
+ .has(function (oControl) {
83
83
  return oControl.getId().endsWith("-unitOfMeasurement");
84
84
  })
85
85
  .hasProperties({ text: sText });
@@ -98,11 +98,11 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
98
98
  * @param {string} sText The expected detail value
99
99
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
100
100
  */
101
- KPICardAssertions.prototype.iSeeHeaderDetails = function(sText) {
101
+ KPICardAssertions.prototype.iSeeHeaderDetails = function (sText) {
102
102
  var oKPIBuilder = this.getBuilder();
103
103
  var vTitleMatcher = FEBuilder.create(this)
104
104
  .hasType("sap.m.Text")
105
- .has(function(oControl) {
105
+ .has(function (oControl) {
106
106
  return oControl.getId().endsWith("-details");
107
107
  })
108
108
  .hasProperties({ text: sText });
@@ -122,14 +122,12 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
122
122
  * @param {object} mStates Additionnal properties to check (indicator, valueColor, scale)
123
123
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
124
124
  */
125
- KPICardAssertions.prototype.iSeeHeaderValue = function(sValue, mStates) {
125
+ KPICardAssertions.prototype.iSeeHeaderValue = function (sValue, mStates) {
126
126
  var oKPIBuilder = this.getBuilder();
127
127
  var oProperties = mStates || {};
128
128
  oProperties.number = sValue;
129
129
 
130
- var vTitleMatcher = FEBuilder.create(this)
131
- .hasType("sap.f.cards.NumericIndicators")
132
- .hasProperties(oProperties);
130
+ var vTitleMatcher = FEBuilder.create(this).hasType("sap.f.cards.NumericIndicators").hasProperties(oProperties);
133
131
 
134
132
  var sDescription = mStates
135
133
  ? Utils.formatMessage("Checking card header value '{0}' in state '{1}'", sValue, mStates)
@@ -150,7 +148,7 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
150
148
  * @param {string} sUnit The expected unit of the side indicator
151
149
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
152
150
  */
153
- KPICardAssertions.prototype.iSeeSideIndicator = function(sTitle, sValue, sUnit) {
151
+ KPICardAssertions.prototype.iSeeSideIndicator = function (sTitle, sValue, sUnit) {
154
152
  var oKPIBuilder = this.getBuilder();
155
153
 
156
154
  var vIndicatorMatcher = FEBuilder.create(this)
@@ -158,21 +156,9 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
158
156
  .hasChildren(
159
157
  FEBuilder.create(this)
160
158
  .hasType("sap.f.cards.NumericSideIndicator")
161
- .hasChildren(
162
- FEBuilder.create(this)
163
- .hasType("sap.m.Text")
164
- .hasProperties({ text: sTitle })
165
- )
166
- .hasChildren(
167
- FEBuilder.create(this)
168
- .hasType("sap.m.Text")
169
- .hasProperties({ text: sTitle })
170
- )
171
- .hasChildren(
172
- FEBuilder.create(this)
173
- .hasType("sap.m.Text")
174
- .hasProperties({ text: sValue })
175
- )
159
+ .hasChildren(FEBuilder.create(this).hasType("sap.m.Text").hasProperties({ text: sTitle }))
160
+ .hasChildren(FEBuilder.create(this).hasType("sap.m.Text").hasProperties({ text: sTitle }))
161
+ .hasChildren(FEBuilder.create(this).hasType("sap.m.Text").hasProperties({ text: sValue }))
176
162
  );
177
163
 
178
164
  return this.prepareResult(
@@ -189,7 +175,7 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
189
175
  * @param {object} mProperties The properties to be checked on the chart (vizType). If null or empty, we just check if the chart is visible.
190
176
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
191
177
  */
192
- KPICardAssertions.prototype.iSeeChart = function(mProperties) {
178
+ KPICardAssertions.prototype.iSeeChart = function (mProperties) {
193
179
  var oKPIBuilder = this.getBuilder();
194
180
 
195
181
  var vChartMatcher = mProperties && Object.keys(mProperties).length ? FEBuilder.create(this).hasProperties(mProperties) : undefined;
@@ -198,12 +184,7 @@ sap.ui.define(["./KPICardAPI", "sap/fe/test/Utils", "sap/fe/test/builder/FEBuild
198
184
  ? Utils.formatMessage("Checking card chart with properties '{0}'", mProperties)
199
185
  : Utils.formatMessage("Checking card chart");
200
186
 
201
- return this.prepareResult(
202
- oKPIBuilder
203
- .doOnKPICardChart(vChartMatcher)
204
- .description(sDescription)
205
- .execute()
206
- );
187
+ return this.prepareResult(oKPIBuilder.doOnKPICardChart(vChartMatcher).description(sDescription).execute());
207
188
  };
208
189
  return KPICardAssertions;
209
190
  });
@@ -22,7 +22,6 @@ sap.ui.define(
22
22
  *
23
23
  * @typedef {object} ColumnIdentifier
24
24
  * @property {string} name The technical name of the column
25
- *
26
25
  * @name sap.fe.test.api.ColumnIdentifier
27
26
  * @public
28
27
  */
@@ -81,7 +80,6 @@ sap.ui.define(
81
80
  * Opens the column adaptation dialog of the table.
82
81
  *
83
82
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
84
- *
85
83
  * @public
86
84
  */
87
85
  TableAPI.prototype.iOpenColumnAdaptation = function () {
@@ -100,7 +98,6 @@ sap.ui.define(
100
98
  * Confirms and closes the adaptation dialog of the table.
101
99
  *
102
100
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
103
- *
104
101
  * @public
105
102
  */
106
103
  TableAPI.prototype.iConfirmColumnAdaptation = function () {
@@ -118,7 +115,6 @@ sap.ui.define(
118
115
  * Opens the sorting dialog of the table.
119
116
  *
120
117
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
121
- *
122
118
  * @public
123
119
  */
124
120
  TableAPI.prototype.iOpenColumnSorting = function () {
@@ -135,7 +131,6 @@ sap.ui.define(
135
131
  * Confirms and closes the sorting dialog of the table.
136
132
  *
137
133
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
138
- *
139
134
  * @public
140
135
  */
141
136
  TableAPI.prototype.iConfirmColumnSorting = function () {
@@ -153,7 +148,6 @@ sap.ui.define(
153
148
  * Opens the filtering dialog of the table.
154
149
  *
155
150
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
156
- *
157
151
  * @public
158
152
  */
159
153
  TableAPI.prototype.iOpenFilterDialog = function () {
@@ -170,7 +164,6 @@ sap.ui.define(
170
164
  * Confirms and closes the filtering dialog of the table.
171
165
  *
172
166
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
173
- *
174
167
  * @public
175
168
  */
176
169
  TableAPI.prototype.iConfirmFilterDialog = function () {
@@ -200,7 +193,6 @@ sap.ui.define(
200
193
  * @param {Function} fnOpenDialog A callback for opening the dialog
201
194
  * @param {Function} fnCloseDialog A callback for closing the dialog
202
195
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
203
- *
204
196
  * @ui5-restricted
205
197
  */
206
198
  TableAPI.prototype.personalization = function (
@@ -291,7 +283,6 @@ sap.ui.define(
291
283
  * @param {Function} fnOpenDialog A callback for opening the dialog
292
284
  * @param {Function} fnCloseDialog A callback for closing the dialog
293
285
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
294
- *
295
286
  * @ui5-restricted
296
287
  */
297
288
  TableAPI.prototype.sortingPersonalization = function (
@@ -338,6 +329,9 @@ sap.ui.define(
338
329
  );
339
330
  }
340
331
 
332
+ mState = aArguments[1];
333
+ var bCheckForNotVisible = mState && mState.visible === false;
334
+
341
335
  oDialogBuilder
342
336
  .has(OpaBuilder.Matchers.children(oAdaptColumnBuilder))
343
337
  .has(function (aCustomListItems) {
@@ -354,8 +348,6 @@ sap.ui.define(
354
348
  return FEBuilder.Matchers.atIndex(0)(aFoundAdaptationColumns);
355
349
  });
356
350
 
357
- mState = aArguments[1];
358
- var bCheckForNotVisible = mState && mState.visible === false;
359
351
  if (!bCheckForNotVisible && !Utils.isOfType(mState, [null, undefined])) {
360
352
  if (mState.sortOrder) {
361
353
  var sSortOrder = mState.sortOrder;
@@ -403,7 +395,6 @@ sap.ui.define(
403
395
  * @param {Function|Array|sap.ui.test.actions.Action} [vActions] The actions to be executed on found adaptation field
404
396
  * @param {string} sDescription The description of the check or adaptation
405
397
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
406
- *
407
398
  * @ui5-restricted
408
399
  */
409
400
  TableAPI.prototype.columnAdaptation = function (vColumnIdentifier, mState, vActions, sDescription) {
@@ -428,7 +419,6 @@ sap.ui.define(
428
419
  * @param {Function|Array|sap.ui.test.actions.Action} [vActions] The actions to be executed on found adaptation field
429
420
  * @param {string} sDescription The description of the check or adaptation
430
421
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
431
- *
432
422
  * @ui5-restricted
433
423
  */
434
424
  TableAPI.prototype.columnSorting = function (vColumnIdentifier, mState, vActions, sDescription) {