@sapui5/sap.fe.test 1.102.2 → 1.104.1

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 +3 -4
  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 -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 +99 -7
  12. package/src/sap/fe/test/JestTemplatingHelper.ts +91 -14
  13. package/src/sap/fe/test/JourneyRunner.js +31 -37
  14. package/src/sap/fe/test/ListReport.js +9 -13
  15. package/src/sap/fe/test/ObjectPage.js +35 -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 +16 -10
  20. package/src/sap/fe/test/UI5MockHelper.ts +28 -18
  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 +11 -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 +2 -20
  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
@@ -17,7 +17,7 @@ sap.ui.define(
17
17
  "sap/base/Log",
18
18
  "sap/base/util/ObjectPath"
19
19
  ],
20
- function(BaseObject, Opa5, Utils, BaseArrangements, BaseActions, BaseAssertions, Shell, opaQunit, Log, ObjectPath) {
20
+ function (BaseObject, Opa5, Utils, BaseArrangements, BaseActions, BaseAssertions, Shell, opaQunit, Log, ObjectPath) {
21
21
  "use strict";
22
22
 
23
23
  /**
@@ -34,19 +34,17 @@ sap.ui.define(
34
34
  * Constructs a new JourneyRunner instance.
35
35
  *
36
36
  * @class A JourneyRunner for executing integration tests with given settings.
37
- *
38
37
  * @param {object} [mSettings] The settings object
39
38
  * @param {object} [mSettings.pages] The available Opa pages
40
39
  * @param {object} [mSettings.opaConfig] The Opa configuration applied via {@link sap.ui.test.Opa5#sap.ui.test.Opa5.extendConfig}
41
40
  * @param {string} [mSettings.launchUrl] The URL to the launching page (usually a FLP.html)
42
41
  * @param {object} [mSettings.launchParameters] The URL launch parameters
43
42
  * @param {boolean} [mSettings.async] If false (default), only one JourneyRunner is executed at a time
44
- *
45
43
  * @alias sap.fe.test.JourneyRunner
46
44
  * @public
47
45
  */
48
46
  var JourneyRunner = BaseObject.extend("sap.fe.test.JourneyRunner", {
49
- constructor: function(mSettings) {
47
+ constructor: function (mSettings) {
50
48
  BaseObject.apply(this);
51
49
  // store a copy of the settings object
52
50
  this._mInstanceSettings = Utils.mergeObjects(
@@ -72,15 +70,14 @@ sap.ui.define(
72
70
  * @param {boolean} [mSettings.async] If false (default), only one JourneyRunner is executed at a time
73
71
  * @param {Function[] | string[]} vJourneys The journeys to be executed. If a journey is represented as a string, it will be interpreted
74
72
  * as a module path to the file that should be loaded. Else it is expected to be a function.
75
- * Alternatively, instead of being wrapped in an array, the journeys can also be given as separate parameters:
73
+ * Alternatively, instead of being wrapped in an array, the journeys can also be given as separate parameters:
76
74
  * <pre>.run(mSettings, Journey1, Journey2, ...)</pre>
77
75
  * @returns {object} A <code>Promise</code> that is resolved after all tests have been executed
78
- *
79
76
  * @function
80
77
  * @name sap.fe.test.JourneyRunner#run
81
78
  * @public
82
79
  */
83
- run: function(mSettings, vJourneys) {
80
+ run: function (mSettings, vJourneys) {
84
81
  var iJourneyParameterIndex = 1;
85
82
  if (!Utils.isOfType(mSettings, Object)) {
86
83
  iJourneyParameterIndex = 0;
@@ -90,7 +87,8 @@ sap.ui.define(
90
87
  }
91
88
 
92
89
  var aJourneys = Array.prototype.slice.call(arguments, iJourneyParameterIndex); // journey-related parameter(s) as array
93
- if (aJourneys && aJourneys.length && Array.isArray(aJourneys[0])) { // if the first journey parameter is an array...
90
+ if (aJourneys && aJourneys.length && Array.isArray(aJourneys[0])) {
91
+ // if the first journey parameter is an array...
94
92
  aJourneys = aJourneys[0]; // ...then unwrap it, to use this array itself
95
93
  }
96
94
  var bAsync = mSettings.async,
@@ -106,7 +104,7 @@ sap.ui.define(
106
104
  .then(this._preRunActions.bind(this, mSettings))
107
105
  .then(this._runActions.bind(this, aJourneys))
108
106
  .then(this._postRunActions.bind(this, mSettings))
109
- .catch(function(oError) {
107
+ .catch(function (oError) {
110
108
  Log.error("JourneyRunner.run failed", oError);
111
109
  });
112
110
 
@@ -127,12 +125,11 @@ sap.ui.define(
127
125
  *
128
126
  * @param {object} mSettings The settings object of the runner instance
129
127
  * @returns {sap.ui.test.Opa} An Opa instance for the base actions
130
- *
131
128
  * @function
132
129
  * @name sap.fe.test.JourneyRunner#getBaseActions
133
130
  * @protected
134
131
  */
135
- getBaseActions: function(mSettings) {
132
+ getBaseActions: function (mSettings) {
136
133
  return new BaseActions();
137
134
  },
138
135
 
@@ -146,12 +143,11 @@ sap.ui.define(
146
143
  *
147
144
  * @param {object} mSettings The settings object of the runner instance
148
145
  * @returns {sap.ui.test.Opa} An Opa instance for the base assertions
149
- *
150
146
  * @function
151
147
  * @name sap.fe.test.JourneyRunner#getBaseAssertions
152
148
  * @protected
153
149
  */
154
- getBaseAssertions: function(mSettings) {
150
+ getBaseAssertions: function (mSettings) {
155
151
  return new BaseAssertions();
156
152
  },
157
153
 
@@ -165,83 +161,83 @@ sap.ui.define(
165
161
  *
166
162
  * @param {object} mSettings The settings object of the runner instance
167
163
  * @returns {sap.ui.test.Opa} An Opa instance for the base arrangements
168
- *
169
164
  * @function
170
165
  * @name sap.fe.test.JourneyRunner#getBaseArrangements
171
166
  * @protected
172
167
  */
173
- getBaseArrangements: function(mSettings) {
168
+ getBaseArrangements: function (mSettings) {
174
169
  return new BaseArrangements(mSettings);
175
170
  },
176
171
 
177
- _preRunActions: function(mSettings) {
172
+ _preRunActions: function (mSettings) {
178
173
  Opa5.extendConfig(this._getOpaConfig(mSettings));
179
174
  Opa5.createPageObjects(mSettings.pages);
180
175
  },
181
176
 
182
- _runActions: function(aJourneys) {
177
+ _runActions: function (aJourneys) {
183
178
  var that = this,
184
179
  pPromiseChain = Promise.resolve(),
185
180
  fnRunnerResolve,
186
- pRunnerEnds = new Promise(function(resolve) {
181
+ pRunnerEnds = new Promise(function (resolve) {
187
182
  fnRunnerResolve = resolve;
188
183
  });
189
184
 
190
185
  Log.info("JourneyRunner started");
191
186
 
192
- QUnit.done(function() {
187
+ QUnit.done(function () {
193
188
  Log.info("JourneyRunner ended");
194
189
  fnRunnerResolve();
195
190
  });
196
191
 
197
- aJourneys.forEach(function(vJourney) {
192
+ aJourneys.forEach(function (vJourney) {
198
193
  if (Utils.isOfType(vJourney, String)) {
199
- pPromiseChain = pPromiseChain.then(function() {
200
- return new Promise(function(resolve, reject) {
201
- sap.ui.require([vJourney], function(oJourney) {
194
+ pPromiseChain = pPromiseChain.then(function () {
195
+ return new Promise(function (resolve, reject) {
196
+ sap.ui.require([vJourney], function (oJourney) {
202
197
  resolve(oJourney);
203
198
  });
204
199
  });
205
200
  });
206
201
  } else {
207
- pPromiseChain = pPromiseChain.then(function() {
202
+ pPromiseChain = pPromiseChain.then(function () {
208
203
  return vJourney;
209
204
  });
210
205
  }
211
206
  pPromiseChain = pPromiseChain.then(that._runJourney);
212
207
  });
213
- return pPromiseChain.then(function() {
208
+ return pPromiseChain.then(function () {
214
209
  return pRunnerEnds;
215
210
  });
216
211
  },
217
212
 
218
- _runJourney: function(vJourney) {
213
+ _runJourney: function (vJourney) {
219
214
  if (Utils.isOfType(vJourney, Function)) {
220
215
  vJourney.call();
221
216
  }
222
217
  },
223
218
 
224
- _postRunActions: function(mSettings) {
219
+ _postRunActions: function (mSettings) {
225
220
  this._removePages(mSettings.pages);
226
221
  Opa5.resetConfig();
227
222
  },
228
223
 
229
- _removePages: function(mPages) {
224
+ _removePages: function (mPages) {
230
225
  var that = this;
231
- mPages &&
232
- Object.keys(mPages).forEach(function(sPageName) {
226
+ if (mPages) {
227
+ Object.keys(mPages).forEach(function (sPageName) {
233
228
  var mPage = mPages[sPageName],
234
229
  sClassName = that._createClassName(mPage.namespace || "sap.ui.test.opa.pageObject", sPageName);
235
230
  // remove path entry to avoid error log flooding from OPA5 - it is newly created anyways
236
231
  ObjectPath.set(sClassName, undefined);
237
232
  });
233
+ }
238
234
  },
239
235
 
240
- _createClassName: function(sNameSpace, sName) {
236
+ _createClassName: function (sNameSpace, sName) {
241
237
  return sNameSpace + "." + sName;
242
238
  },
243
239
 
244
- _getOpaConfig: function(mSettings) {
240
+ _getOpaConfig: function (mSettings) {
245
241
  var oConfig = Object.assign(
246
242
  {
247
243
  viewNamespace: "sap.fe.templates",
@@ -272,12 +268,11 @@ sap.ui.define(
272
268
  * Gets the global journey runner instance.
273
269
  *
274
270
  * @returns {object} The global default {@link sap.fe.test.JourneyRunner} instance
275
- *
276
271
  * @function
277
272
  * @public
278
273
  * @static
279
274
  */
280
- JourneyRunner.getDefaultRunner = function() {
275
+ JourneyRunner.getDefaultRunner = function () {
281
276
  if (!_oDefaultRunner) {
282
277
  _oDefaultRunner = new JourneyRunner();
283
278
  }
@@ -288,12 +283,11 @@ sap.ui.define(
288
283
  * Sets the global journey runner instance.
289
284
  *
290
285
  * @param {sap.fe.test.JourneyRunner} oDefaultRunner Defines the global default {@link sap.fe.test.JourneyRunner} instance
291
- *
292
286
  * @function
293
287
  * @public
294
288
  * @static
295
289
  */
296
- JourneyRunner.setDefaultRunner = function(oDefaultRunner) {
290
+ JourneyRunner.setDefaultRunner = function (oDefaultRunner) {
297
291
  if (_oDefaultRunner) {
298
292
  _oDefaultRunner.destroy();
299
293
  }
@@ -309,7 +303,7 @@ sap.ui.define(
309
303
  * @public
310
304
  * @static
311
305
  */
312
- JourneyRunner.run = function() {
306
+ JourneyRunner.run = function () {
313
307
  var oRunner = JourneyRunner.getDefaultRunner();
314
308
  oRunner.run.apply(oRunner, arguments);
315
309
  };
@@ -61,19 +61,18 @@ sap.ui.define(
61
61
  * <code><pre>
62
62
  * var oListReportDefinition = new ListReport({ appId: "MyApp", componentId: "MyListReportId", entitySet: "MyEntitySet" });
63
63
  * </pre></code>
64
- *
65
64
  * @param {object} oPageDefinition The required parameters
66
65
  * @param {string} oPageDefinition.appId The app id (defined in the manifest root)
67
66
  * @param {string} oPageDefinition.componentId The component id (defined in the target section for the list report within the manifest)
68
67
  * @param {string} oPageDefinition.entitySet The entitySet (optional)(defined in the settings of the corresponding target component within the manifest)
69
68
  * @param {string} oPageDefinition.contextPath The contextPath (optional)(defined in the settings of the corresponding target component within the manifest)
70
- * @param {...object} [aAdditionalPageDefinitions] Additional custom page functions, provided in an object containing <code>actions</code> and <code>assertions</code>
69
+ * @param {...object} [aInAdditionalPageDefinitions] Additional custom page functions, provided in an object containing <code>actions</code> and <code>assertions</code>
71
70
  * @returns {sap.fe.test.ListReport} A list report page definition
72
71
  * @name sap.fe.test.ListReport
73
72
  * @extends sap.fe.test.TemplatePage
74
73
  * @public
75
74
  */
76
- function ListReport(oPageDefinition, aAdditionalPageDefinitions) {
75
+ function ListReport(oPageDefinition, aInAdditionalPageDefinitions) {
77
76
  var sAppId = oPageDefinition.appId,
78
77
  sComponentId = oPageDefinition.componentId,
79
78
  sContextPath = oPageDefinition.contextPath,
@@ -164,7 +163,6 @@ sap.ui.define(
164
163
  *
165
164
  * @param {boolean} [bCollapse] Defines whether the header should be collapsed, else it is expanded (default)
166
165
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
167
- *
168
166
  * @function
169
167
  * @name sap.fe.test.ListReport.actions#iCollapseExpandPageHeader
170
168
  * @public
@@ -422,9 +420,7 @@ sap.ui.define(
422
420
  .execute();
423
421
  },
424
422
  iSeeDeleteConfirmation: function () {
425
- return this._iSeeTheMessageToast(
426
- oResourceBundleCore.getText("C_TRANSACTION_HELPER_OBJECT_PAGE_DELETE_TOAST_SINGULAR")
427
- );
423
+ return this._iSeeTheMessageToast(oResourceBundleCore.getText("C_TRANSACTION_HELPER_DELETE_TOAST_SINGULAR"));
428
424
  },
429
425
  iSeePageTitle: function (sTitle) {
430
426
  return OpaBuilder.create(this)
@@ -436,7 +432,7 @@ sap.ui.define(
436
432
  iSeeVariantTitle: function (sTitle) {
437
433
  return OpaBuilder.create(this)
438
434
  .hasType("sap.m.Title")
439
- .hasId("fe::PageVariantManagement-text")
435
+ .hasId("fe::PageVariantManagement-vm-text")
440
436
  .hasProperties({ text: sTitle })
441
437
  .description("Seeing variant title '" + sTitle + "'")
442
438
  .execute();
@@ -444,7 +440,7 @@ sap.ui.define(
444
440
  iSeeControlVMFilterBarTitle: function (sTitle) {
445
441
  return OpaBuilder.create(this)
446
442
  .hasType("sap.m.Title")
447
- .hasId(FilterBarId + "::VariantManagement-text")
443
+ .hasId(FilterBarId + "::VariantManagement-vm-text")
448
444
  .hasProperties({ text: sTitle })
449
445
  .description("Seeing variant title '" + sTitle + "'")
450
446
  .execute();
@@ -453,7 +449,7 @@ sap.ui.define(
453
449
  var sTableId = sIconTabProperty ? getTableId(sIconTabProperty) : SingleTableId;
454
450
  return OpaBuilder.create(this)
455
451
  .hasType("sap.m.Title")
456
- .hasId(sTableId + "::VM-text")
452
+ .hasId(sTableId + "::VM-vm-text")
457
453
  .hasProperties({ text: sTitle })
458
454
  .description("Seeing variant title '" + sTitle + "'")
459
455
  .execute();
@@ -461,15 +457,15 @@ sap.ui.define(
461
457
  iSeeVariantModified: function (bIsModified, bControl) {
462
458
  var sLabelId;
463
459
  if (bControl) {
464
- sLabelId = FilterBarId + "::VariantManagement-modified";
460
+ sLabelId = FilterBarId + "::VariantManagement-vm-modified";
465
461
  } else {
466
- sLabelId = "fe::PageVariantManagement-modified";
462
+ sLabelId = "fe::PageVariantManagement-vm-modified";
467
463
  }
468
464
 
469
465
  bIsModified = bIsModified === undefined ? true : bIsModified;
470
466
  if (bIsModified) {
471
467
  return OpaBuilder.create(this)
472
- .hasType("sap.m.Label")
468
+ .hasType("sap.m.Text")
473
469
  .hasId(sLabelId)
474
470
  .hasProperties({ text: "*" })
475
471
  .description("Seeing variant state as 'modified'")
@@ -125,7 +125,6 @@ sap.ui.define(
125
125
  * <code><pre>
126
126
  * var oObjectPageDefinition = new ObjectPage({ appId: "MyApp", componentId: "MyObjectPageId", entitySet: "MyEntitySet" });
127
127
  * </pre></code>
128
- *
129
128
  * @param {object} oPageDefinition The required parameters
130
129
  * @param {string} oPageDefinition.appId The app id (defined in the manifest root)
131
130
  * @param {string} oPageDefinition.componentId The component id (defined in the target section for the list report within the manifest)
@@ -154,7 +153,7 @@ sap.ui.define(
154
153
  AnchorBarId = "fe::ObjectPage-anchBar",
155
154
  PaginatorId = "fe::Paginator",
156
155
  EditableHeaderTitleId = "EditableHeaderForm::EditableHeaderTitle",
157
- Page_EditMode = {
156
+ PageEditMode = {
158
157
  DISPLAY: "Display",
159
158
  EDITABLE: "Editable"
160
159
  },
@@ -262,7 +261,6 @@ sap.ui.define(
262
261
  *
263
262
  * @param {boolean} [bCollapse] Defines whether header should be collapsed, else it gets expanded (default)
264
263
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
265
- *
266
264
  * @function
267
265
  * @name sap.fe.test.ObjectPage.actions#iCollapseExpandPageHeader
268
266
  * @public
@@ -309,15 +307,15 @@ sap.ui.define(
309
307
  .execute();
310
308
  },
311
309
  iEnableLink: function (sText) {
312
- return (
313
- OpaBuilder.create(this)
314
- .hasType("sap.m.ColumnListItem")
315
- //.hasAggregationProperties("cells", { text: sText })
316
- .isDialogElement()
317
- .doPress("selectMulti")
318
- .description("The CheckBox for link " + sText + " is selected")
319
- .execute()
320
- );
310
+ var vAggregationMatcher = FEBuilder.Matchers.deepAggregationMatcher("cells/items/items", [
311
+ OpaBuilder.Matchers.properties({ text: sText })
312
+ ]);
313
+ return OpaBuilder.create(this)
314
+ .hasType("sap.m.ColumnListItem")
315
+ .has(vAggregationMatcher)
316
+ .doPress("selectMulti")
317
+ .description("The CheckBox for link " + sText + " is selected")
318
+ .execute();
321
319
  },
322
320
  iPressKeyboardShortcutOnSection: function (sShortcut, mProperties) {
323
321
  return this._iPressKeyboardShortcut(undefined, sShortcut, mProperties, "sap.uxap.ObjectPageSection");
@@ -340,7 +338,6 @@ sap.ui.define(
340
338
  * }
341
339
  * </pre></code>
342
340
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
343
- *
344
341
  * @function
345
342
  * @name sap.fe.test.ObjectPage.actions#iGoToSection
346
343
  * @public
@@ -391,7 +388,6 @@ sap.ui.define(
391
388
  *
392
389
  * @param {string} sName The name of the section
393
390
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
394
- *
395
391
  * @private
396
392
  */
397
393
  iOpenSectionWithTitle: function (sName) {
@@ -448,6 +444,19 @@ sap.ui.define(
448
444
  .description("Click on the message")
449
445
  )
450
446
  .execute();
447
+ },
448
+ iClickBackOnMessageView: function () {
449
+ return OpaBuilder.create(this)
450
+ .hasType("sap.m.MessageView")
451
+ .isDialogElement(true)
452
+ .doOnChildren(
453
+ OpaBuilder.create(this)
454
+ .hasType("sap.m.Button")
455
+ .hasProperties({ icon: "sap-icon://nav-back" })
456
+ .doPress()
457
+ .description("Click on the message view back")
458
+ )
459
+ .execute();
451
460
  }
452
461
  },
453
462
  /**
@@ -617,10 +626,10 @@ sap.ui.define(
617
626
  .execute();
618
627
  },
619
628
  iSeeObjectPageInDisplayMode: function () {
620
- return this._iSeeObjectPageInMode(Page_EditMode.DISPLAY);
629
+ return this._iSeeObjectPageInMode(PageEditMode.DISPLAY);
621
630
  },
622
631
  iSeeObjectPageInEditMode: function () {
623
- return this._iSeeObjectPageInMode(Page_EditMode.EDITABLE);
632
+ return this._iSeeObjectPageInMode(PageEditMode.EDITABLE);
624
633
  },
625
634
  _iSeeObjectPageInMode: function (sMode) {
626
635
  return OpaBuilder.create(this)
@@ -708,6 +717,14 @@ sap.ui.define(
708
717
  .description("SimpleForm has label '" + sTitle + "' is present")
709
718
  .execute();
710
719
  },
720
+ iSeeGridWithLabel: function (sText) {
721
+ return OpaBuilder.create(this)
722
+ .hasType("sap.ui.layout.Grid")
723
+ .isDialogElement(true)
724
+ .doOnChildren(OpaBuilder.create(this).hasType("sap.m.Label").hasProperties({ text: sText }))
725
+ .description("Grid Layout has label '" + sText + "' is present")
726
+ .execute();
727
+ },
711
728
  iSeeSelectLinksDialog: function () {
712
729
  return OpaBuilder.create(this)
713
730
  .hasType("sap.m.Title")
@@ -744,9 +761,7 @@ sap.ui.define(
744
761
  return this._iSeeTheMessageToast(oResourceBundleCore.getText("C_TRANSACTION_HELPER_OBJECT_SAVED"));
745
762
  },
746
763
  iSeeDeleteConfirmation: function () {
747
- return this._iSeeTheMessageToast(
748
- oResourceBundleCore.getText("C_TRANSACTION_HELPER_OBJECT_PAGE_DELETE_TOAST_SINGULAR")
749
- );
764
+ return this._iSeeTheMessageToast(oResourceBundleCore.getText("C_TRANSACTION_HELPER_DELETE_TOAST_SINGULAR"));
750
765
  },
751
766
  iSeeConfirmMessageBoxWithTitle: function (sTitle) {
752
767
  return OpaBuilder.create(this)
@@ -777,7 +792,7 @@ sap.ui.define(
777
792
  iSeeControlVMTableTitle: function (sTitle, sNavProperty) {
778
793
  return OpaBuilder.create(this)
779
794
  .hasType("sap.m.Title")
780
- .hasId(getTableId(sNavProperty) + "::VM-text")
795
+ .hasId(getTableId(sNavProperty) + "::VM-vm-text")
781
796
  .hasProperties({ text: sTitle })
782
797
  .description("Seeing variant title '" + sTitle + "'")
783
798
  .execute();
@@ -828,19 +843,6 @@ sap.ui.define(
828
843
  .description("MessageItem is correctly displayed")
829
844
  .execute();
830
845
  },
831
- iClickBackOnMessageView: function () {
832
- return OpaBuilder.create(this)
833
- .hasType("sap.m.MessageView")
834
- .isDialogElement(true)
835
- .doOnChildren(
836
- OpaBuilder.create(this)
837
- .hasType("sap.m.Button")
838
- .hasProperties({ icon: "sap-icon://nav-back" })
839
- .doPress()
840
- .description("Click on the message view back")
841
- )
842
- .execute();
843
- },
844
846
  iCheckVisibilityOfButtonWithText: function (sText, bExpectedVisibility) {
845
847
  return OpaBuilder.create(this)
846
848
  .hasType("sap.m.Button")
@@ -12,7 +12,6 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
12
12
  * @class Provides a test page definition for the shell.
13
13
  *
14
14
  * When using {@link sap.fe.test.JourneyRunner}, this page is made available by default via <code>onTheShell</code>.
15
- *
16
15
  * @param {...object} [aAdditionalPageDefinitions] Additional custom page functions, provided in an object containing <code>actions</code> and <code>assertions</code>
17
16
  * @returns {sap.fe.test.Shell} A shell page definition
18
17
  * @name sap.fe.test.Shell
@@ -29,7 +28,6 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
29
28
  * Navigates back via shell back button.
30
29
  *
31
30
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
32
- *
33
31
  * @function
34
32
  * @name sap.fe.test.Shell#iNavigateBack
35
33
  * @public
@@ -41,7 +39,6 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
41
39
  * Navigates to the launch pad via the home button.
42
40
  *
43
41
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
44
- *
45
42
  * @function
46
43
  * @name sap.fe.test.Shell#iNavigateHome
47
44
  * @public
@@ -61,7 +58,6 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
61
58
  * Opens the navigation menu in the shell header.
62
59
  *
63
60
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
64
- *
65
61
  * @function
66
62
  * @name sap.fe.test.Shell#iOpenNavigationMenu
67
63
  * @public
@@ -78,7 +74,6 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
78
74
  *
79
75
  * @param {string} sItem The label of the navigation item
80
76
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
81
- *
82
77
  * @function
83
78
  * @name sap.fe.test.Shell#iNavigateViaMenu
84
79
  * @public
@@ -95,7 +90,6 @@ sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"
95
90
  *
96
91
  * @param {string} sTarget The target application (hash)
97
92
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
98
- *
99
93
  * @function
100
94
  * @name sap.fe.test.Shell#iPressTile
101
95
  * @public
@@ -241,7 +241,6 @@ sap.ui.define(
241
241
 
242
242
  /**
243
243
  * @class Provides a test page definition for a template page with the corresponding parameters.
244
- *
245
244
  * @param {object | string} vViewId The viewId
246
245
  * @param {...object} [aAdditionalPageDefinitions] Additional custom page functions, provided in an object containing <code>actions</code> and <code>assertions</code>
247
246
  * @returns {sap.fe.test.TemplatePage} A list report page definition
@@ -368,7 +367,6 @@ sap.ui.define(
368
367
  * Confirms the visibility of the current page.
369
368
  *
370
369
  * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
371
- *
372
370
  * @function
373
371
  * @name sap.fe.test.TemplatePage.assertions#iSeeThisPage
374
372
  * @public
@@ -12,7 +12,7 @@ sap.ui.define(
12
12
  "sap/fe/core/TemplateModel",
13
13
  "sap/fe/macros/ResourceModel"
14
14
  ],
15
- function(ODataMetaModel, XMLPreprocessor, XMLTemplateProcessor, macroLibrary, TemplateModel) {
15
+ function (ODataMetaModel, XMLPreprocessor, XMLTemplateProcessor, macroLibrary, TemplateModel) {
16
16
  "use strict";
17
17
  /**
18
18
  * Unit Test parts of XML fragments for mocked metadata against expected results.
@@ -48,14 +48,14 @@ sap.ui.define(
48
48
  * ]
49
49
  * @param {boolean} useMacros Enables macros during the test. Typically, a test should only template an indivdual fragement, so
50
50
  * the macros are switched off. For some special tests they can be enabled with this parameter
51
- * @param mResourceModel Required resource model from which to get the semantic texts
52
- * @param sandbox Sandbox used to stub getText method for semantic key tests
51
+ * @param {any} mResourceModel Required resource model from which to get the semantic texts
52
+ * @param {any} sandbox Sandbox used to stub getText method for semantic key tests
53
53
  */
54
54
  function testFragments(QUnit, sTitle, oMetaMockData, aFragmentTests, useMacros, mResourceModel, sandbox) {
55
55
  var sServiceUrl = "./test/",
56
56
  //Mock the requestor for metadata only
57
57
  oRequestor = {
58
- read: function() {
58
+ read: function () {
59
59
  return Promise.resolve(oMetaMockData);
60
60
  },
61
61
  mHeaders: {}
@@ -76,7 +76,7 @@ sap.ui.define(
76
76
  };
77
77
 
78
78
  //Inject models and bindingContexts
79
- Object.keys(mBindingContexts).forEach(function(sKey) {
79
+ Object.keys(mBindingContexts).forEach(function (sKey) {
80
80
  var oModel = mModels[sKey] || oMetaModel;
81
81
  if (!(oModel instanceof sap.ui.model.Model) && !(oModel instanceof sap.ui.model.odata.v4.ODataMetaModel)) {
82
82
  oModel = new TemplateModel(oModel, oMetaModel);
@@ -100,12 +100,12 @@ sap.ui.define(
100
100
 
101
101
  QUnit.module("Smoke Tests for " + sTitle);
102
102
 
103
- QUnit.test("Check if metadata is available", function(assert) {
103
+ QUnit.test("Check if metadata is available", function (assert) {
104
104
  return Promise.all([
105
- oMetaModel.requestObject("/").then(function(oEntityContainer) {
105
+ oMetaModel.requestObject("/").then(function (oEntityContainer) {
106
106
  assert.ok(oEntityContainer, "Entity Container found");
107
107
  }),
108
- oMetaModel.requestObject("/$").then(function(oMetadataDocument) {
108
+ oMetaModel.requestObject("/$").then(function (oMetadataDocument) {
109
109
  assert.ok(oMetadataDocument, "Metadata Document found");
110
110
  })
111
111
  ]);
@@ -126,9 +126,9 @@ sap.ui.define(
126
126
  oFragment.sFragmentName +
127
127
  (oFragment.sDescription ? " (" + oFragment.sDescription + ")" : ""),
128
128
  {
129
- beforeEach: function() {
129
+ beforeEach: function () {
130
130
  if (mResourceModel) {
131
- mResourceBundleStub = sandbox.stub(mResourceModel, "getText").callsFake(function(sKey) {
131
+ mResourceBundleStub = sandbox.stub(mResourceModel, "getText").callsFake(function (sKey) {
132
132
  if (sKey === "T_NEW_OBJECT") {
133
133
  return "New Object";
134
134
  } else {
@@ -137,7 +137,7 @@ sap.ui.define(
137
137
  });
138
138
  }
139
139
  },
140
- afterEach: function() {
140
+ afterEach: function () {
141
141
  if (mResourceBundleStub) {
142
142
  mResourceBundleStub.restore();
143
143
  }
@@ -145,14 +145,14 @@ sap.ui.define(
145
145
  }
146
146
  );
147
147
 
148
- oFragment.tests.forEach(function(oScope, index) {
149
- QUnit.test(oScope.description || "Test " + oFragment.fileType + " scope: " + index, function(assert) {
148
+ oFragment.tests.forEach(function (oScope, index) {
149
+ QUnit.test(oScope.description || "Test " + oFragment.fileType + " scope: " + index, function (assert) {
150
150
  return oMetaModel
151
151
  .requestObject("/$")
152
- .then(function() {
152
+ .then(function () {
153
153
  return XMLTemplateProcessor.loadTemplatePromise(oFragment.sFragmentName, oFragment.fileType);
154
154
  })
155
- .then(function(oDocumentElement) {
155
+ .then(function (oDocumentElement) {
156
156
  return templateFragment(
157
157
  assert,
158
158
  oDocumentElement,
@@ -160,7 +160,7 @@ sap.ui.define(
160
160
  Object.assign({}, oFragment.mModels, oScope.mModels)
161
161
  );
162
162
  })
163
- .then(function(oDocumentElement) {
163
+ .then(function (oDocumentElement) {
164
164
  var aElements = [].filter.call(
165
165
  oDocumentElement.ownerDocument.querySelectorAll("*"),
166
166
  hasUnitTestIdAttribute
@@ -172,13 +172,13 @@ sap.ui.define(
172
172
  return oElement.getAttribute("unittest:id") !== null;
173
173
  }
174
174
 
175
- function testAttributes(oElement, oExpectedResults, sTestId) {
175
+ function testAttributes(oElement, oExpectedResults, sSubTestId) {
176
176
  function testSingleAttribute(sAttributeName) {
177
177
  if (oExpectedResults[sAttributeName] === undefined) {
178
178
  assert.ok(
179
179
  !oElement.hasAttribute(sAttributeName),
180
180
  'unittest:id="' +
181
- sTestId +
181
+ sSubTestId +
182
182
  "\": attribute '" +
183
183
  sAttributeName +
184
184
  "' is expected not to be rendered"
@@ -189,7 +189,7 @@ sap.ui.define(
189
189
  sResult,
190
190
  oExpectedResults[sAttributeName],
191
191
  'unittest:id="' +
192
- sTestId +
192
+ sSubTestId +
193
193
  "\": attribute '" +
194
194
  sAttributeName +
195
195
  "' properly created as " +
@@ -216,7 +216,7 @@ sap.ui.define(
216
216
  "All tests have been executed for this test case"
217
217
  );
218
218
  })
219
- .catch(function(vException) {
219
+ .catch(function (vException) {
220
220
  var sExpectedException = oScope.sExpectedException;
221
221
  if (vException && sExpectedException) {
222
222
  assert.strictEqual(