@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
@@ -11,12 +11,12 @@ sap.ui.define(
11
11
  "sap/base/strings/formatMessage",
12
12
  "sap/base/strings/capitalize"
13
13
  ],
14
- function(LoaderExtensions, UriParameters, mergeObjects, formatMessageRaw, capitalize) {
14
+ function (LoaderExtensions, UriParameters, mergeObjects, formatMessageRaw, capitalize) {
15
15
  "use strict";
16
16
 
17
17
  var Utils = {};
18
18
 
19
- Utils.getManifest = function(sComponentName) {
19
+ Utils.getManifest = function (sComponentName) {
20
20
  var oUshellContainer = sap.ushell && sap.ushell.Container;
21
21
  if (!oUshellContainer) {
22
22
  var appPath = Utils.getNoFLPAppPath();
@@ -39,7 +39,7 @@ sap.ui.define(
39
39
 
40
40
  var oTargetManifest = oDefaultManifest;
41
41
  if (sDeltaManifest) {
42
- sDeltaManifest.split(",").forEach(function(sSingleDeltaManifest) {
42
+ sDeltaManifest.split(",").forEach(function (sSingleDeltaManifest) {
43
43
  if (sSingleDeltaManifest.indexOf("/") !== 0) {
44
44
  sSingleDeltaManifest = sComponentName + "/" + sSingleDeltaManifest;
45
45
  }
@@ -62,15 +62,14 @@ sap.ui.define(
62
62
  return oTargetManifest;
63
63
  };
64
64
 
65
- Utils.getNoFLPAppPath = function() {
65
+ Utils.getNoFLPAppPath = function () {
66
66
  /*demokit.html scenario - parameter app = appName expected*/
67
67
  var oUriParameters = new UriParameters(window.location.href);
68
68
  var sApp = oUriParameters.get("app") || "SalesOrder";
69
- var appPath = Utils.getAppInfo(sApp).appPath;
70
- return appPath;
69
+ return Utils.getAppInfo(sApp).appPath;
71
70
  };
72
71
 
73
- Utils.getAppInfo = function(sApp) {
72
+ Utils.getAppInfo = function (sApp) {
74
73
  var oApps = {
75
74
  "SalesOrder-manage": {
76
75
  appName: "SalesOrder",
@@ -156,10 +155,10 @@ sap.ui.define(
156
155
  return oApps[sApp];
157
156
  };
158
157
 
159
- Utils.isOfType = function(vToTest, vValidTypes, bNullAndUndefinedAreValid) {
158
+ Utils.isOfType = function (vToTest, vValidTypes, bNullAndUndefinedAreValid) {
160
159
  var aValidTypes = Array.isArray(vValidTypes) ? vValidTypes : [vValidTypes];
161
160
 
162
- return aValidTypes.reduce(function(bIsOfType, vTypeToCheck) {
161
+ return aValidTypes.reduce(function (bIsOfType, vTypeToCheck) {
163
162
  if (bIsOfType) {
164
163
  return true;
165
164
  }
@@ -195,18 +194,18 @@ sap.ui.define(
195
194
  }, false);
196
195
  };
197
196
 
198
- Utils.isArguments = function(vValue) {
197
+ Utils.isArguments = function (vValue) {
199
198
  return Object.prototype.toString.call(vValue) === "[object Arguments]";
200
199
  };
201
200
 
202
- Utils.parseArguments = function(aExpectedTypes) {
201
+ Utils.parseArguments = function (aExpectedTypes) {
203
202
  var aArguments = Array.prototype.slice.call(arguments, 1);
204
203
 
205
204
  if (aArguments.length === 1 && Utils.isArguments(aArguments[0])) {
206
205
  aArguments = Array.prototype.slice.call(aArguments[0], 0);
207
206
  }
208
207
 
209
- return aExpectedTypes.reduce(function(aActualArguments, vExpectedType) {
208
+ return aExpectedTypes.reduce(function (aActualArguments, vExpectedType) {
210
209
  if (Utils.isOfType(aArguments[0], vExpectedType, true)) {
211
210
  aActualArguments.push(aArguments.shift());
212
211
  } else {
@@ -216,7 +215,7 @@ sap.ui.define(
216
215
  }, []);
217
216
  };
218
217
 
219
- Utils.formatObject = function(mObject) {
218
+ Utils.formatObject = function (mObject) {
220
219
  if (Utils.isOfType(mObject, [null, undefined])) {
221
220
  return "";
222
221
  }
@@ -224,7 +223,7 @@ sap.ui.define(
224
223
  return (
225
224
  "[" +
226
225
  mObject
227
- .map(function(oElement) {
226
+ .map(function (oElement) {
228
227
  return Utils.formatObject(oElement);
229
228
  })
230
229
  .join(", ") +
@@ -235,7 +234,7 @@ sap.ui.define(
235
234
  return (
236
235
  "{" +
237
236
  Object.keys(mObject)
238
- .map(function(sKey) {
237
+ .map(function (sKey) {
239
238
  return sKey + ": " + Utils.formatObject(mObject[sKey]);
240
239
  })
241
240
  .join(", ") +
@@ -245,18 +244,18 @@ sap.ui.define(
245
244
  return mObject.toString();
246
245
  };
247
246
 
248
- Utils.formatMessage = function(sMessage) {
249
- var aParameters = Array.prototype.slice.call(arguments, 1).map(function(vParameter) {
247
+ Utils.formatMessage = function (sMessage) {
248
+ var aParameters = Array.prototype.slice.call(arguments, 1).map(function (vParameter) {
250
249
  return Utils.formatObject(vParameter);
251
250
  });
252
251
  return formatMessageRaw(sMessage && sMessage.replace(/'/g, "''"), aParameters);
253
252
  };
254
253
 
255
- Utils.mergeObjects = function() {
254
+ Utils.mergeObjects = function () {
256
255
  return mergeObjects.apply(this, [{}].concat(Array.prototype.slice.call(arguments)));
257
256
  };
258
257
 
259
- Utils.getAggregation = function(oManagedObject, sAggregationName) {
258
+ Utils.getAggregation = function (oManagedObject, sAggregationName) {
260
259
  if (!oManagedObject) {
261
260
  return null;
262
261
  }
@@ -267,7 +266,7 @@ sap.ui.define(
267
266
  return fnAggregation.call(oManagedObject);
268
267
  };
269
268
 
270
- Utils.pushToArray = function(vElement, vTarget, bAtTheBeginning) {
269
+ Utils.pushToArray = function (vElement, vTarget, bAtTheBeginning) {
271
270
  if (vTarget === undefined) {
272
271
  vTarget = [];
273
272
  } else if (!Array.isArray(vTarget)) {
@@ -5,7 +5,7 @@
5
5
  */
6
6
  sap.ui.define(
7
7
  ["sap/fe/test/Utils", "sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/m/p13n/BasePanel"],
8
- function(Utils, Opa5, OpaBuilder, FEBuilder, MdcP13nBasePanel) {
8
+ function (Utils, Opa5, OpaBuilder, FEBuilder, MdcP13nBasePanel) {
9
9
  "use strict";
10
10
 
11
11
  /**
@@ -14,7 +14,6 @@ sap.ui.define(
14
14
  * @typedef {object} TableIdentifier
15
15
  * @property {string} property The name of the navigation property used for the table
16
16
  * @property {string} [qualifier] The name of a qualifier for the table
17
- *
18
17
  * @name sap.fe.test.api.TableIdentifier
19
18
  * @public
20
19
  */
@@ -24,7 +23,6 @@ sap.ui.define(
24
23
  *
25
24
  * @typedef {object} DialogIdentifier
26
25
  * @property {sap.fe.test.api.DialogType} type The type of the dialog
27
- *
28
26
  * @name sap.fe.test.api.DialogIdentifier
29
27
  * @public
30
28
  */
@@ -36,7 +34,6 @@ sap.ui.define(
36
34
  * @property {string} service The name of the service
37
35
  * @property {string} action The name of the action
38
36
  * @property {boolean} [unbound] Defines whether the action is a bound action (default: false)
39
- *
40
37
  * @name sap.fe.test.api.ActionIdentifier
41
38
  * @public
42
39
  */
@@ -48,7 +45,6 @@ sap.ui.define(
48
45
  * @property {string} [fieldGroup] The name of the field group containing the field
49
46
  * @property {string} property The name of the field
50
47
  * @property {string} [connectedFields] The name of the connected field containing the field
51
- *
52
48
  * @name sap.fe.test.api.FieldIdentifier
53
49
  * @public
54
50
  */
@@ -59,7 +55,6 @@ sap.ui.define(
59
55
  * @typedef {object} SectionIdentifier
60
56
  * @property {string} section The name of the section facet
61
57
  * @property {string} [subSection] The name of the sub-section facet
62
- *
63
58
  * @name sap.fe.test.api.SectionIdentifier
64
59
  * @public
65
60
  */
@@ -69,7 +64,6 @@ sap.ui.define(
69
64
  *
70
65
  * @typedef {object} ActionDialogFieldIdentifier
71
66
  * @property {string} property The name of the field
72
- *
73
67
  * @name sap.fe.test.api.ActionDialogFieldIdentifier
74
68
  * @public
75
69
  */
@@ -103,7 +97,7 @@ sap.ui.define(
103
97
  return oAnd;
104
98
  }
105
99
 
106
- var BaseApi = function(oOpaBuilder, vIdentifier) {
100
+ var BaseApi = function (oOpaBuilder, vIdentifier) {
107
101
  this._oBuilder = oOpaBuilder;
108
102
  this._vIdentifier = vIdentifier;
109
103
  };
@@ -127,7 +121,7 @@ sap.ui.define(
127
121
  * @public
128
122
  * @ui5-restricted
129
123
  */
130
- BaseApi.prototype.getBuilder = function() {
124
+ BaseApi.prototype.getBuilder = function () {
131
125
  return new this._oBuilder.constructor(this._oBuilder.getOpaInstance(), this._oBuilder.build());
132
126
  };
133
127
 
@@ -138,15 +132,15 @@ sap.ui.define(
138
132
  * @public
139
133
  * @ui5-restricted
140
134
  */
141
- BaseApi.prototype.getOpaInstance = function() {
135
+ BaseApi.prototype.getOpaInstance = function () {
142
136
  return this._oBuilder.getOpaInstance();
143
137
  };
144
138
 
145
- BaseApi.prototype.getIdentifier = function() {
139
+ BaseApi.prototype.getIdentifier = function () {
146
140
  return this._vIdentifier;
147
141
  };
148
142
 
149
- BaseApi.prototype.prepareResult = function(oWaitForResult) {
143
+ BaseApi.prototype.prepareResult = function (oWaitForResult) {
150
144
  var oParentChain = _findParentChainFunction(oWaitForResult, this.isAction ? "when" : "then");
151
145
  oWaitForResult.and = this;
152
146
  if (!Utils.isOfType(this.isAction, [null, undefined])) {
@@ -159,12 +153,10 @@ sap.ui.define(
159
153
  * Creates a matcher for actions.
160
154
  *
161
155
  * @param {sap.fe.api.ActionIdentifier | string} vActionIdentifier Identifier to be used for the matcher.
162
- *
163
156
  * @returns {object} A matcher
164
- *
165
157
  * @private
166
158
  */
167
- BaseApi.prototype.createActionMatcher = function(vActionIdentifier) {
159
+ BaseApi.prototype.createActionMatcher = function (vActionIdentifier) {
168
160
  var vMatcher, sActionId;
169
161
 
170
162
  if (!Utils.isOfType(vActionIdentifier, String)) {
@@ -189,12 +181,10 @@ sap.ui.define(
189
181
  * Creates a matcher for fields.
190
182
  *
191
183
  * @param {sap.fe.test.api.FieldIdentifier | string} vFieldIdentifier Identifier to be used for the matcher
192
- *
193
184
  * @returns {object} A matcher
194
- *
195
185
  * @private
196
186
  */
197
- BaseApi.prototype.createFieldMatcher = function(vFieldIdentifier) {
187
+ BaseApi.prototype.createFieldMatcher = function (vFieldIdentifier) {
198
188
  var vMatcher, sFieldId;
199
189
  if (!Utils.isOfType(vFieldIdentifier, String)) {
200
190
  if (typeof vFieldIdentifier.property === "string") {
@@ -210,7 +200,7 @@ sap.ui.define(
210
200
  }
211
201
  return OpaBuilder.Matchers.some.apply(
212
202
  null,
213
- ["DataField", "DataFieldWithURL", "DataFieldForAnnotation"].reduce(function(aMatchers, sDataFieldType) {
203
+ ["DataField", "DataFieldWithURL", "DataFieldForAnnotation"].reduce(function (aMatchers, sDataFieldType) {
214
204
  return aMatchers.concat([
215
205
  FEBuilder.Matchers.id(new RegExp(Utils.formatMessage("::{0}::{1}$", sDataFieldType, sFieldId)))
216
206
  ]);
@@ -232,15 +222,12 @@ sap.ui.define(
232
222
  * Creates a matcher for FormElements (sap.ui.layout.form.FormElement).
233
223
  *
234
224
  * @param {sap.fe.test.api.FieldIdentifier | string} vFormElementIdentifier Identifier of the field to be used for the matcher
235
- *
236
225
  * @param {string} sDataFieldType Added as prefix for the id. Can be values like 'DataField',
237
226
  * 'DataFieldWithUrl', 'DataFieldWithNavigationPath', etc.
238
- *
239
227
  * @returns {object} A matcher
240
- *
241
228
  * @private
242
229
  */
243
- BaseApi.prototype.createFormElementMatcher = function(vFormElementIdentifier, sDataFieldType) {
230
+ BaseApi.prototype.createFormElementMatcher = function (vFormElementIdentifier, sDataFieldType) {
244
231
  var vMatcher, sFormElementId;
245
232
  if (!Utils.isOfType(vFormElementIdentifier, String)) {
246
233
  if (vFormElementIdentifier.property && typeof vFormElementIdentifier.property === "string") {
@@ -271,12 +258,10 @@ sap.ui.define(
271
258
  * }
272
259
  * </pre></code>
273
260
  * if passed as string, the content of the field will be checked with property 'title'
274
- *
275
261
  * @returns {object} A matcher
276
- *
277
262
  * @private
278
263
  */
279
- BaseApi.prototype.createFieldGroupMatcher = function(vFieldGroupIdentifier) {
264
+ BaseApi.prototype.createFieldGroupMatcher = function (vFieldGroupIdentifier) {
280
265
  var vMatcher, sFieldGroupId;
281
266
  if (!Utils.isOfType(vFieldGroupIdentifier, String)) {
282
267
  if (vFieldGroupIdentifier.fieldGroup && typeof vFieldGroupIdentifier.fieldGroup === "string") {
@@ -3,129 +3,126 @@
3
3
  (c) Copyright 2009-2021 SAP SE. All rights reserved
4
4
 
5
5
  */
6
- sap.ui.define(["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"], function(
7
- BaseAPI,
8
- Utils,
9
- OpaBuilder
10
- ) {
11
- "use strict";
6
+ sap.ui.define(
7
+ ["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"],
8
+ function (BaseAPI, Utils, OpaBuilder) {
9
+ "use strict";
12
10
 
13
- /**
14
- * Constructs a new ChartActions instance.
15
- *
16
- * TODO this API does not fit the criteria for public API and needs some rework. Not considered critical for apps though.
17
- *
18
- * @param {sap.fe.test.builder.FEBuilder} oBuilderInstance The {@link sap.fe.test.builder.FEBuilder} instance used to interact with the UI
19
- * @param {string} [vChartDescription] Description (optional) of the chart to be used for logging messages
20
- * @returns {sap.fe.test.api.ChartActions} The new instance
21
- * @class
22
- * @private
23
- */
24
- var Actions = function(oBuilderInstance, vChartDescription) {
25
- return BaseAPI.call(this, oBuilderInstance, vChartDescription);
26
- };
27
- Actions.prototype = Object.create(BaseAPI.prototype);
28
- Actions.prototype.constructor = Actions;
29
- Actions.prototype.isAction = true;
11
+ /**
12
+ * Constructs a new ChartActions instance.
13
+ *
14
+ * TODO this API does not fit the criteria for public API and needs some rework. Not considered critical for apps though.
15
+ *
16
+ * @param {sap.fe.test.builder.FEBuilder} oBuilderInstance The {@link sap.fe.test.builder.FEBuilder} instance used to interact with the UI
17
+ * @param {string} [vChartDescription] Description (optional) of the chart to be used for logging messages
18
+ * @returns {sap.fe.test.api.ChartActions} The new instance
19
+ * @class
20
+ * @private
21
+ */
22
+ var Actions = function (oBuilderInstance, vChartDescription) {
23
+ return BaseAPI.call(this, oBuilderInstance, vChartDescription);
24
+ };
25
+ Actions.prototype = Object.create(BaseAPI.prototype);
26
+ Actions.prototype.constructor = Actions;
27
+ Actions.prototype.isAction = true;
30
28
 
31
- /**
32
- * Selects the specified rows.
33
- *
34
- * @param {object} [mRowValues] a map of columns (either name or index) to its value, e.g. <code>{ 0: "Max", "Last Name": "Mustermann" }</code>
35
- * @param {object} [mRowState] a map of states. Supported row states are
36
- * <code><pre>
37
- * {
38
- * selected: true|false,
39
- * focused: true|false
40
- * }
41
- * </pre></code>
42
- *
43
- * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
44
- *
45
- * @private
46
- */
29
+ /**
30
+ * Selects the specified rows.
31
+ *
32
+ * @param {object} [mRowValues] a map of columns (either name or index) to its value, e.g. <code>{ 0: "Max", "Last Name": "Mustermann" }</code>
33
+ * @param {object} [mRowState] a map of states. Supported row states are
34
+ * <code><pre>
35
+ * {
36
+ * selected: true|false,
37
+ * focused: true|false
38
+ * }
39
+ * </pre></code>
40
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
41
+ * @private
42
+ */
47
43
 
48
- Actions.prototype.iSelectItems = function(innerData, bClearSelection) {
49
- if (typeof bClearSelection === "boolean") {
50
- bClearSelection = bClearSelection;
51
- } else {
52
- bClearSelection = true;
53
- }
54
- return OpaBuilder.create(this)
55
- .hasType("sap.chart.Chart")
56
- .check(function(oChart) {
57
- var bResult;
58
- var vizFrame = oChart[0]._getVizFrame();
59
- if (vizFrame) {
60
- var data = innerData
61
- ? [
62
- {
63
- data: innerData
64
- }
65
- ]
66
- : [];
67
- bResult = vizFrame.vizSelection(data, {
68
- clearSelection: bClearSelection
69
- });
70
- }
71
- return bResult;
72
- }, true)
73
- .description("Do not see the First Column Expand Button")
74
- .execute();
75
- };
44
+ Actions.prototype.iSelectItems = function (innerData, bClearSelection) {
45
+ if (typeof bClearSelection === "boolean") {
46
+ bClearSelection = bClearSelection;
47
+ } else {
48
+ bClearSelection = true;
49
+ }
50
+ return OpaBuilder.create(this)
51
+ .hasType("sap.chart.Chart")
52
+ .check(function (oChart) {
53
+ var bResult;
54
+ var vizFrame = oChart[0]._getVizFrame();
55
+ if (vizFrame) {
56
+ var data = innerData
57
+ ? [
58
+ {
59
+ data: innerData
60
+ }
61
+ ]
62
+ : [];
63
+ bResult = vizFrame.vizSelection(data, {
64
+ clearSelection: bClearSelection
65
+ });
66
+ }
67
+ return bResult;
68
+ }, true)
69
+ .description("Do not see the First Column Expand Button")
70
+ .execute();
71
+ };
76
72
 
77
- Actions.prototype.iChangeChartType = function(sType) {
78
- return OpaBuilder.create(this)
79
- .hasType("sap.ui.core.Icon")
80
- .hasProperties({
81
- src: "sap-icon://vertical-bar-chart"
82
- })
83
- .doPress()
84
- .success(function() {
85
- return OpaBuilder.create(this)
86
- .hasType("sap.m.StandardListItem")
87
- .hasProperties({
88
- icon: "sap-icon://horizontal-bar-chart"
89
- })
90
- .doPress()
91
- .description("blablabla")
92
- .execute();
93
- })
94
- .description("Opened the Dialog")
95
- .execute();
96
- };
73
+ Actions.prototype.iChangeChartType = function (sType) {
74
+ return OpaBuilder.create(this)
75
+ .hasType("sap.ui.core.Icon")
76
+ .hasProperties({
77
+ src: "sap-icon://vertical-bar-chart"
78
+ })
79
+ .doPress()
80
+ .success(function () {
81
+ return OpaBuilder.create(this)
82
+ .hasType("sap.m.StandardListItem")
83
+ .hasProperties({
84
+ icon: "sap-icon://horizontal-bar-chart"
85
+ })
86
+ .doPress()
87
+ .description("blablabla")
88
+ .execute();
89
+ })
90
+ .description("Opened the Dialog")
91
+ .execute();
92
+ };
97
93
 
98
- Actions.prototype.iDrillDown = function(sDimension) {
99
- return OpaBuilder.create(this)
100
- .hasType("sap.m.Button")
101
- .hasProperties({
102
- tooltip: "View By"
103
- })
104
- .doPress()
105
- .success(function() {
106
- return OpaBuilder.create(this)
107
- .hasType("sap.m.StandardListItem")
108
- .hasProperties({
109
- title: sDimension
110
- })
111
- .doPress()
112
- .description("blablabla")
113
- .execute();
114
- })
115
- .description("Opened the Dialog")
116
- .execute();
117
- };
94
+ Actions.prototype.iDrillDown = function (sDimension) {
95
+ return OpaBuilder.create(this)
96
+ .hasType("sap.m.Button")
97
+ .hasProperties({
98
+ tooltip: "View By"
99
+ })
100
+ .doPress()
101
+ .success(function () {
102
+ return OpaBuilder.create(this)
103
+ .hasType("sap.m.StandardListItem")
104
+ .hasProperties({
105
+ title: sDimension
106
+ })
107
+ .doPress()
108
+ .description("blablabla")
109
+ .execute();
110
+ })
111
+ .description("Opened the Dialog")
112
+ .execute();
113
+ };
118
114
 
119
- Actions.prototype.iExecuteActionWithText = function(sText) {
120
- return OpaBuilder.create(this)
121
- .hasType("sap.m.Button")
122
- .hasProperties({
123
- text: sText
124
- })
125
- .doPress()
126
- .description("Clicked on button" + sText)
127
- .execute();
128
- };
115
+ Actions.prototype.iExecuteActionWithText = function (sText) {
116
+ return OpaBuilder.create(this)
117
+ .hasType("sap.m.Button")
118
+ .hasProperties({
119
+ text: sText
120
+ })
121
+ .doPress()
122
+ .description("Clicked on button" + sText)
123
+ .execute();
124
+ };
129
125
 
130
- return Actions;
131
- });
126
+ return Actions;
127
+ }
128
+ );
@@ -5,7 +5,7 @@
5
5
  */
6
6
  sap.ui.define(
7
7
  ["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/ui/core/SortOrder"],
8
- function(BaseAPI, Utils, OpaBuilder, FEBuilder, SortOrder) {
8
+ function (BaseAPI, Utils, OpaBuilder, FEBuilder, SortOrder) {
9
9
  "use strict";
10
10
 
11
11
  /**
@@ -19,17 +19,17 @@ sap.ui.define(
19
19
  * @class
20
20
  * @private
21
21
  */
22
- var ChartAssertions = function(oBuilderInstance, vChartDescription) {
22
+ var ChartAssertions = function (oBuilderInstance, vChartDescription) {
23
23
  return BaseAPI.call(this, oBuilderInstance, vChartDescription);
24
24
  };
25
25
  ChartAssertions.prototype = Object.create(BaseAPI.prototype);
26
26
  ChartAssertions.prototype.constructor = ChartAssertions;
27
27
  ChartAssertions.prototype.isAction = false;
28
28
 
29
- ChartAssertions.prototype.iCheckItems = function(iNumberOfItems, sTab) {
29
+ ChartAssertions.prototype.iCheckItems = function (iNumberOfItems, sTab) {
30
30
  return OpaBuilder.create(this)
31
31
  .hasType("sap.ui.mdc.Chart")
32
- .check(function(aCharts) {
32
+ .check(function (aCharts) {
33
33
  var oChart;
34
34
  if (sTab && aCharts && aCharts.length > 1) {
35
35
  for (var i = 0; i < aCharts.length; i++) {
@@ -41,11 +41,7 @@ sap.ui.define(
41
41
  } else {
42
42
  oChart = aCharts[0];
43
43
  }
44
- var aContexts = oChart
45
- .getControlDelegate()
46
- ._getChart(oChart)
47
- .getBinding("data")
48
- .getContexts();
44
+ var aContexts = oChart.getControlDelegate()._getChart(oChart).getBinding("data").getContexts();
49
45
  return (
50
46
  (aContexts && (iNumberOfItems === undefined ? aContexts.length !== 0 : aContexts.length === iNumberOfItems)) ||
51
47
  (!aContexts && iNumberOfItems === 0)
@@ -55,27 +51,27 @@ sap.ui.define(
55
51
  .execute();
56
52
  };
57
53
 
58
- ChartAssertions.prototype.iSeeChartType = function(sChartType) {
54
+ ChartAssertions.prototype.iSeeChartType = function (sChartType) {
59
55
  return OpaBuilder.create(this)
60
56
  .hasType("sap.ui.mdc.Chart")
61
- .check(function(oChart) {
57
+ .check(function (oChart) {
62
58
  return sChartType === oChart[0].getChartType();
63
59
  }, true)
64
60
  .description("Chart type is " + sChartType)
65
61
  .execute();
66
62
  };
67
63
 
68
- ChartAssertions.prototype.iSeeChartVisible = function() {
64
+ ChartAssertions.prototype.iSeeChartVisible = function () {
69
65
  return OpaBuilder.create(this)
70
66
  .hasType("sap.ui.mdc.Chart")
71
- .check(function(oChart) {
67
+ .check(function (oChart) {
72
68
  return oChart[0].getVisible() === true;
73
69
  }, true)
74
70
  .description("Chart is Visible")
75
71
  .execute();
76
72
  };
77
73
 
78
- ChartAssertions.prototype.iCheckBreadCrumb = function(sLink) {
74
+ ChartAssertions.prototype.iCheckBreadCrumb = function (sLink) {
79
75
  return OpaBuilder.create(this)
80
76
  .hasType("sap.m.Breadcrumbs")
81
77
  .hasProperties({ currentLocationText: sLink })
@@ -83,36 +79,36 @@ sap.ui.define(
83
79
  .execute();
84
80
  };
85
81
 
86
- ChartAssertions.prototype.iCheckVisibleDimensions = function(aDimensions) {
82
+ ChartAssertions.prototype.iCheckVisibleDimensions = function (aDimensions) {
87
83
  return OpaBuilder.create(this)
88
84
  .hasType("sap.chart.Chart")
89
- .check(function(oChart) {
85
+ .check(function (oChart) {
90
86
  return oChart[0].getVisibleDimensions().toString() === aDimensions.toString();
91
87
  })
92
88
  .description("Visible Dimensions are checked correctly")
93
89
  .execute();
94
90
  };
95
- ChartAssertions.prototype.iCheckVisibleMeasures = function(aMeasures) {
91
+ ChartAssertions.prototype.iCheckVisibleMeasures = function (aMeasures) {
96
92
  return OpaBuilder.create(this)
97
93
  .hasType("sap.chart.Chart")
98
- .check(function(oChart) {
94
+ .check(function (oChart) {
99
95
  return oChart[0].getVisibleMeasures().toString() === aMeasures.toString();
100
96
  })
101
97
  .description("Visible Measures are checked correctly")
102
98
  .execute();
103
99
  };
104
100
 
105
- ChartAssertions.prototype.iCheckChartNoDataText = function(sNoDataText) {
101
+ ChartAssertions.prototype.iCheckChartNoDataText = function (sNoDataText) {
106
102
  return OpaBuilder.create(this)
107
103
  .hasType("sap.ui.mdc.Chart")
108
- .check(function(oChart) {
104
+ .check(function (oChart) {
109
105
  return sNoDataText === oChart[0].getNoDataText();
110
106
  })
111
107
  .description("No Data text is " + sNoDataText)
112
108
  .execute();
113
109
  };
114
110
 
115
- ChartAssertions.prototype.iCheckButtonWithText = function(sText) {
111
+ ChartAssertions.prototype.iCheckButtonWithText = function (sText) {
116
112
  return OpaBuilder.create(this)
117
113
  .hasType("sap.m.Button")
118
114
  .hasProperties({ text: sText })
@@ -120,7 +116,7 @@ sap.ui.define(
120
116
  .execute();
121
117
  };
122
118
 
123
- ChartAssertions.prototype.iCheckMessageToastWithText = function(sText) {
119
+ ChartAssertions.prototype.iCheckMessageToastWithText = function (sText) {
124
120
  return FEBuilder.createMessageToastBuilder(sText).execute(this);
125
121
  };
126
122