@sapui5/sap.fe.test 1.110.1 → 1.111.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 (84) hide show
  1. package/package.json +2 -19
  2. package/src/sap/fe/test/.library +1 -1
  3. package/src/sap/fe/test/BaseActions.js +26 -2
  4. package/src/sap/fe/test/BaseArrangements.js +2 -2
  5. package/src/sap/fe/test/BaseAssertions.js +2 -2
  6. package/src/sap/fe/test/CollaborationClient.js +10 -10
  7. package/src/sap/fe/test/ConfirmDialog.js +2 -2
  8. package/src/sap/fe/test/FCLView.js +2 -2
  9. package/src/sap/fe/test/FeMocks.js +10 -11
  10. package/src/sap/fe/test/FeMocks.ts +3 -1
  11. package/src/sap/fe/test/Flexibility.js +2 -2
  12. package/src/sap/fe/test/FlexibleColumnLayout.js +2 -2
  13. package/src/sap/fe/test/JestFlexibilityHelper.js +12 -13
  14. package/src/sap/fe/test/JestTemplatingHelper.js +305 -403
  15. package/src/sap/fe/test/JestTemplatingHelper.ts +5 -5
  16. package/src/sap/fe/test/JourneyRunner.js +2 -2
  17. package/src/sap/fe/test/ListReport.js +103 -13
  18. package/src/sap/fe/test/LocationUtil.js +2 -2
  19. package/src/sap/fe/test/ObjectPage.js +3 -3
  20. package/src/sap/fe/test/Shell.js +2 -2
  21. package/src/sap/fe/test/Stubs.js +2 -2
  22. package/src/sap/fe/test/TemplatePage.js +2 -2
  23. package/src/sap/fe/test/TemplatingTestUtils.js +2 -2
  24. package/src/sap/fe/test/UI5MockHelper.js +76 -90
  25. package/src/sap/fe/test/Utils.js +2 -2
  26. package/src/sap/fe/test/api/APIHelper.js +2 -2
  27. package/src/sap/fe/test/api/BaseAPI.js +11 -2
  28. package/src/sap/fe/test/api/ChartActions.js +2 -2
  29. package/src/sap/fe/test/api/ChartAssertions.js +2 -2
  30. package/src/sap/fe/test/api/CollaborationAPI.js +32 -35
  31. package/src/sap/fe/test/api/DialogAPI.js +2 -2
  32. package/src/sap/fe/test/api/DialogActions.js +2 -2
  33. package/src/sap/fe/test/api/DialogAssertions.js +2 -2
  34. package/src/sap/fe/test/api/DialogCreateActions.js +2 -2
  35. package/src/sap/fe/test/api/DialogCreateAssertions.js +2 -2
  36. package/src/sap/fe/test/api/DialogHelper.js +2 -2
  37. package/src/sap/fe/test/api/DialogMassEditActions.js +2 -2
  38. package/src/sap/fe/test/api/DialogMassEditAssertions.js +2 -2
  39. package/src/sap/fe/test/api/DialogMessageActions.js +2 -2
  40. package/src/sap/fe/test/api/DialogMessageAssertions.js +2 -2
  41. package/src/sap/fe/test/api/DialogType.js +2 -2
  42. package/src/sap/fe/test/api/DialogValueHelpActions.js +2 -2
  43. package/src/sap/fe/test/api/DialogValueHelpAssertions.js +2 -2
  44. package/src/sap/fe/test/api/EditState.js +2 -2
  45. package/src/sap/fe/test/api/FilterBarAPI.js +2 -2
  46. package/src/sap/fe/test/api/FilterBarActions.js +2 -2
  47. package/src/sap/fe/test/api/FilterBarAssertions.js +4 -4
  48. package/src/sap/fe/test/api/FooterAPI.js +2 -2
  49. package/src/sap/fe/test/api/FooterActionsBase.js +2 -2
  50. package/src/sap/fe/test/api/FooterActionsOP.js +2 -2
  51. package/src/sap/fe/test/api/FooterAssertionsBase.js +2 -2
  52. package/src/sap/fe/test/api/FooterAssertionsOP.js +2 -2
  53. package/src/sap/fe/test/api/FormAPI.js +2 -2
  54. package/src/sap/fe/test/api/FormActions.js +2 -2
  55. package/src/sap/fe/test/api/FormAssertions.js +2 -2
  56. package/src/sap/fe/test/api/HeaderAPI.js +2 -2
  57. package/src/sap/fe/test/api/HeaderActions.js +2 -2
  58. package/src/sap/fe/test/api/HeaderActionsLR.js +2 -2
  59. package/src/sap/fe/test/api/HeaderAssertions.js +2 -2
  60. package/src/sap/fe/test/api/HeaderAssertionsLR.js +2 -2
  61. package/src/sap/fe/test/api/HeaderLR.js +2 -2
  62. package/src/sap/fe/test/api/KPICardAPI.js +2 -2
  63. package/src/sap/fe/test/api/KPICardActions.js +2 -2
  64. package/src/sap/fe/test/api/KPICardAssertions.js +2 -2
  65. package/src/sap/fe/test/api/TableAPI.js +2 -2
  66. package/src/sap/fe/test/api/TableActions.js +2 -2
  67. package/src/sap/fe/test/api/TableAssertions.js +20 -5
  68. package/src/sap/fe/test/builder/DialogBuilder.js +2 -2
  69. package/src/sap/fe/test/builder/FEBuilder.js +2 -2
  70. package/src/sap/fe/test/builder/KPIBuilder.js +2 -2
  71. package/src/sap/fe/test/builder/MacroFieldBuilder.js +3 -3
  72. package/src/sap/fe/test/builder/MdcFieldBuilder.js +5 -5
  73. package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +2 -2
  74. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +2 -2
  75. package/src/sap/fe/test/builder/MdcTableBuilder.js +10 -6
  76. package/src/sap/fe/test/builder/OverflowToolbarBuilder.js +2 -2
  77. package/src/sap/fe/test/builder/VMBuilder.js +2 -2
  78. package/src/sap/fe/test/internal/ConsoleErrorChecker.js +41 -53
  79. package/src/sap/fe/test/internal/FEArrangements.js +3 -3
  80. package/src/sap/fe/test/internal/FEJourneyRunner.js +2 -2
  81. package/src/sap/fe/test/library-preload.js +17993 -0
  82. package/src/sap/fe/test/library-preload.js.map +1 -0
  83. package/src/sap/fe/test/library.js +4 -4
  84. package/src/sap/fe/test/manifest.json +35 -0
@@ -320,7 +320,7 @@ export const getConverterContextForTest = function (
320
320
  };
321
321
  const metaModelCache: any = {};
322
322
  export const getMetaModel = async function (sMetadataUrl: string) {
323
- const oRequestor = _MetadataRequestor.create({}, "4.0", {});
323
+ const oRequestor = _MetadataRequestor.create({}, "4.0", undefined, {});
324
324
  if (!metaModelCache[sMetadataUrl]) {
325
325
  const oMetaModel = new (ODataMetaModel as any)(oRequestor, sMetadataUrl, undefined, null);
326
326
  await oMetaModel.fetchEntityContainer();
@@ -585,14 +585,14 @@ export function serializeControl(controlToSerialize: Control | Control[]) {
585
585
  data += `,\n${getTab()} ${oControlKey}: ${control.mProperties[oControlKey]}`;
586
586
  } else if (control.mBindingInfos.hasOwnProperty(oControlKey)) {
587
587
  const bindingDetail = control.mBindingInfos[oControlKey];
588
- data += `,\n${getTab()} ${oControlKey}: formatter(${bindingDetail.parts.map(
589
- (bindingInfo: any) => `\n${getTab(1)}${bindingInfo.model ? bindingInfo.model : ""}>${bindingInfo.path}`
590
- )})`;
588
+ data += `,\n${getTab()} ${oControlKey}: ${JSON.stringify(bindingDetail)}`;
591
589
  }
592
590
  }
593
591
  for (const oControlKey in control.mAssociations) {
594
592
  if (control.mAssociations.hasOwnProperty(oControlKey)) {
595
- data += `,\n${getTab()} ${oControlKey}: ${control.mAssociations[oControlKey][0]}`;
593
+ data += `,\n${getTab()} ${oControlKey}: ${
594
+ (control.mAssociations[oControlKey]?.join?.(",") ?? control.mAssociations[oControlKey]) || undefined
595
+ }`;
596
596
  }
597
597
  }
598
598
  for (const oControlKey in control.mEventRegistry) {
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -209,12 +209,58 @@ sap.ui.define(
209
209
  .description("Navigating via link '" + sText + "'")
210
210
  .execute();
211
211
  },
212
- iOpenIconTabWithTitle: function (sName) {
212
+ /**
213
+ * Navigates to or focuses on the defined view of a Multiple Views List Report table.
214
+ *
215
+ * @param {string | sap.fe.test.api.ViewIdentifier} vViewIdentifier The identifier of a view as defined in the manifest file, or its label passed as a string
216
+ * if passed as an object, the following pattern will be considered:
217
+ * <code><pre>
218
+ * {
219
+ * key: <string>,
220
+ * }
221
+ * </pre></code>
222
+ * Depending on property 'keepPreviousPersonalization' in the manifest the key could be set different within the id of the table. If necessary please check the UI control tree within the debugger.
223
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
224
+ * @function
225
+ * @name sap.fe.test.ListReport.actions#iGoToView
226
+ * @public
227
+ */
228
+ iGoToView: function (vViewIdentifier) {
229
+ var viewKey =
230
+ Utils.isOfType(vViewIdentifier, Object) && typeof vViewIdentifier.key === "string"
231
+ ? { key: "fe::table::" + vViewIdentifier.key + "::LineItem" }
232
+ : { text: vViewIdentifier };
213
233
  return OpaBuilder.create(this)
214
234
  .hasId(IconTabBarId)
215
- .has(OpaBuilder.Matchers.aggregation("items", OpaBuilder.Matchers.properties({ text: sName })))
235
+ .has(OpaBuilder.Matchers.aggregation("items", OpaBuilder.Matchers.properties(viewKey)))
236
+ .check(function (aItems) {
237
+ return aItems.length > 0;
238
+ })
216
239
  .doPress()
217
- .description("Selecting Icon Tab " + sName)
240
+ .description(
241
+ "Selecting view '" +
242
+ (Utils.isOfType(vViewIdentifier, Object) ? vViewIdentifier.key : vViewIdentifier) +
243
+ "'"
244
+ )
245
+ .execute();
246
+ },
247
+ /**
248
+ * TODO This function is only here for legacy reasons and therefore private. Use iGoToView instead.
249
+ *
250
+ * @param {string} sName The name of the view within the List Report table
251
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
252
+ * @private
253
+ */
254
+ iOpenIconTabWithTitle: function (sName) {
255
+ // return this.iGoToView(sName);
256
+ return OpaBuilder.create(this)
257
+ .timeout(1)
258
+ .check(function () {
259
+ return false;
260
+ })
261
+ .error(
262
+ "Test function iOpenIconTabWithTitle() is deprecated - please use function iGoToView() with the same parameter"
263
+ )
218
264
  .execute();
219
265
  },
220
266
  iSaveVariant: function (sVariantName, bSetAsDefault, bApplyAutomatically) {
@@ -535,15 +581,59 @@ sap.ui.define(
535
581
  .description("Draft indicator is visible and locked" + (user ? " by '" + user + "'" : ""))
536
582
  .execute();
537
583
  },
584
+ /**
585
+ * Checks the view of a Multiple View List Report table.
586
+ *
587
+ * @param {string | sap.fe.test.api.ViewIdentifier} vViewIdentifier The identifier of a view as defined in the manifest file, or its label passed as a string
588
+ * if passed as an object, the following pattern will be considered:
589
+ * <code><pre>
590
+ * {
591
+ * key: <string>,
592
+ * }
593
+ * </pre></code>
594
+ * Depending on property 'keepPreviousPersonalization' in the manifest, the key could be set differently within the id of the table. If necessary please check the UI control tree within the debugger.
595
+ * @param {object} mState An object containing properties of the view to be checked
596
+ * Example:
597
+ * <code><pre>
598
+ * {
599
+ * count: <number of records expected>,
600
+ * }
601
+ * </pre></code>
602
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
603
+ * @function
604
+ * @name sap.fe.test.ListReport.assertions#iCheckView
605
+ * @public
606
+ */
607
+ iCheckView: function (vViewIdentifier, mState) {
608
+ var viewKey =
609
+ Utils.isOfType(vViewIdentifier, Object) && typeof vViewIdentifier.key === "string"
610
+ ? { key: "fe::table::" + vViewIdentifier.key + "::LineItem" }
611
+ : { text: vViewIdentifier };
612
+
613
+ return OpaBuilder.create(this)
614
+ .hasId(IconTabBarId)
615
+ .has(OpaBuilder.Matchers.aggregation("items", OpaBuilder.Matchers.properties(viewKey)))
616
+ .has(FEBuilder.Matchers.atIndex(0))
617
+ .hasProperties(mState)
618
+ .description(Utils.formatMessage("Checking view '{0}' with properties '{1}'", vViewIdentifier, mState))
619
+ .execute();
620
+ },
621
+ /**
622
+ * TODO This function is only here for legacy reasons and therefore private. Use iCheckView instead.
623
+ *
624
+ * @param {object} mProperties Object containing the text: property and any other properties to be checked
625
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
626
+ * @private
627
+ */
538
628
  iSeeIconTabWithProperties: function (mProperties) {
539
- return (
540
- OpaBuilder.create(this)
541
- .hasId(IconTabBarId)
542
- .has(OpaBuilder.Matchers.aggregationMatcher("items", OpaBuilder.Matchers.properties(mProperties)))
543
- //.hasAggregationProperties("items", mProperties)
544
- .description(Utils.formatMessage("Seeing Icon Tab with properties '{0}'", mProperties))
545
- .execute()
546
- );
629
+ // return this.iCheckView(mProperties.text, mProperties);
630
+ return OpaBuilder.create(this)
631
+ .timeout(1)
632
+ .check(function () {
633
+ return false;
634
+ })
635
+ .error("Test function iSeeIconTabWithProperties() is deprecated - please use function iCheckView()")
636
+ .execute();
547
637
  },
548
638
  iSeeNumOfOperators: function (sFieldName, numItems) {
549
639
  return OpaBuilder.create(this)
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -960,7 +960,7 @@ sap.ui.define(
960
960
  if (aBoundMessagesInfo instanceof Array) {
961
961
  aNewBoundMessagesInfo = aBoundMessagesInfo;
962
962
  } else {
963
- Object.keys(aBoundMessagesInfo).map(function (oElement) {
963
+ Object.keys(aBoundMessagesInfo).forEach(function (oElement) {
964
964
  aNewBoundMessagesInfo.push(aBoundMessagesInfo[oElement]);
965
965
  });
966
966
  }
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5
 
@@ -1,5 +1,5 @@
1
- /*
2
- * !
1
+ /*!
2
+ *
3
3
  SAP UI development toolkit for HTML5 (SAPUI5)
4
4
  (c) Copyright 2009-2021 SAP SE. All rights reserved
5
5