@sapui5/sap.fe.test 1.97.0 → 1.98.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 (72) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/test/.library +1 -1
  3. package/src/sap/fe/test/BaseActions.js +1 -1
  4. package/src/sap/fe/test/BaseArrangements.js +1 -1
  5. package/src/sap/fe/test/BaseAssertions.js +1 -1
  6. package/src/sap/fe/test/ConfirmDialog.js +1 -1
  7. package/src/sap/fe/test/FCLView.js +1 -1
  8. package/src/sap/fe/test/Flexibility.js +1 -1
  9. package/src/sap/fe/test/FlexibleColumnLayout.js +1 -1
  10. package/src/sap/fe/test/JourneyRunner.js +9 -4
  11. package/src/sap/fe/test/ListReport.js +9 -4
  12. package/src/sap/fe/test/LocationUtil.js +1 -1
  13. package/src/sap/fe/test/ObjectPage.js +20 -12
  14. package/src/sap/fe/test/Shell.js +1 -1
  15. package/src/sap/fe/test/Stubs.js +1 -1
  16. package/src/sap/fe/test/TemplatePage.js +1 -1
  17. package/src/sap/fe/test/TemplatingTestUtils.js +2 -2
  18. package/src/sap/fe/test/UI5MockHelper.js +211 -45
  19. package/src/sap/fe/test/UI5MockHelper.ts +103 -8
  20. package/src/sap/fe/test/Utils.js +1 -13
  21. package/src/sap/fe/test/api/APIHelper.js +1 -1
  22. package/src/sap/fe/test/api/BaseAPI.js +2 -8
  23. package/src/sap/fe/test/api/ChartActions.js +1 -1
  24. package/src/sap/fe/test/api/ChartAssertions.js +5 -5
  25. package/src/sap/fe/test/api/DialogAPI.js +1 -1
  26. package/src/sap/fe/test/api/DialogActions.js +1 -1
  27. package/src/sap/fe/test/api/DialogAssertions.js +1 -1
  28. package/src/sap/fe/test/api/DialogCreateActions.js +1 -1
  29. package/src/sap/fe/test/api/DialogCreateAssertions.js +1 -1
  30. package/src/sap/fe/test/api/DialogMessageActions.js +1 -1
  31. package/src/sap/fe/test/api/DialogMessageAssertions.js +1 -1
  32. package/src/sap/fe/test/api/DialogType.js +1 -1
  33. package/src/sap/fe/test/api/DialogValueHelpActions.js +1 -1
  34. package/src/sap/fe/test/api/DialogValueHelpAssertions.js +1 -1
  35. package/src/sap/fe/test/api/EditState.js +1 -1
  36. package/src/sap/fe/test/api/FilterBarAPI.js +1 -1
  37. package/src/sap/fe/test/api/FilterBarActions.js +1 -1
  38. package/src/sap/fe/test/api/FilterBarAssertions.js +1 -1
  39. package/src/sap/fe/test/api/FooterAPI.js +1 -1
  40. package/src/sap/fe/test/api/FooterActionsBase.js +1 -1
  41. package/src/sap/fe/test/api/FooterActionsOP.js +1 -1
  42. package/src/sap/fe/test/api/FooterAssertionsBase.js +1 -1
  43. package/src/sap/fe/test/api/FooterAssertionsOP.js +1 -1
  44. package/src/sap/fe/test/api/FormAPI.js +1 -1
  45. package/src/sap/fe/test/api/FormActions.js +1 -1
  46. package/src/sap/fe/test/api/FormAssertions.js +1 -1
  47. package/src/sap/fe/test/api/HeaderAPI.js +1 -1
  48. package/src/sap/fe/test/api/HeaderActions.js +1 -1
  49. package/src/sap/fe/test/api/HeaderActionsLR.js +1 -1
  50. package/src/sap/fe/test/api/HeaderAssertions.js +1 -1
  51. package/src/sap/fe/test/api/HeaderAssertionsLR.js +1 -1
  52. package/src/sap/fe/test/api/HeaderLR.js +1 -1
  53. package/src/sap/fe/test/api/KPICardAPI.js +1 -1
  54. package/src/sap/fe/test/api/KPICardActions.js +42 -0
  55. package/src/sap/fe/test/api/KPICardAssertions.js +20 -16
  56. package/src/sap/fe/test/api/TableAPI.js +1 -1
  57. package/src/sap/fe/test/api/TableActions.js +1 -1
  58. package/src/sap/fe/test/api/TableAssertions.js +12 -1
  59. package/src/sap/fe/test/builder/DialogBuilder.js +1 -1
  60. package/src/sap/fe/test/builder/FEBuilder.js +1 -1
  61. package/src/sap/fe/test/builder/KPIBuilder.js +12 -3
  62. package/src/sap/fe/test/builder/MacroFieldBuilder.js +1 -1
  63. package/src/sap/fe/test/builder/MdcFieldBuilder.js +1 -1
  64. package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +1 -1
  65. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +1 -1
  66. package/src/sap/fe/test/builder/MdcTableBuilder.js +23 -1
  67. package/src/sap/fe/test/builder/OverflowToolbarBuilder.js +1 -1
  68. package/src/sap/fe/test/builder/VMBuilder.js +1 -1
  69. package/src/sap/fe/test/internal/FEArrangements.js +1 -1
  70. package/src/sap/fe/test/internal/FEJourneyRunner.js +1 -1
  71. package/src/sap/fe/test/library.js +2 -2
  72. package/src/sap/fe/test/massEdit.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.test",
3
- "version": "1.97.0",
3
+ "version": "1.98.0",
4
4
  "description": "SAPUI5 Library sap.fe.test",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.97.0</version>
9
+ <version>1.98.0</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.test</documentation>
12
12
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/Utils"], function(
6
6
  Opa5,
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  ["sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/ui/thirdparty/jquery", "sap/base/util/UriParameters", "./Utils", "./Stubs"],
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/Utils"], function(
6
6
  Opa5,
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"], function(OpaBuilder, Opa5, Utils) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  /**
6
6
  * Actions and assertions to be used with a page hosted in an FCL
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/ui/qunit/QUnitUtils"], function(Opa5, OpaBuilder, QUnitUtils) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/base/util/merge", "./TemplatePage", "sap/ui/test/OpaBuilder", "sap/m/library"], function(
6
6
  mergeObjects,
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  /* global QUnit */
6
6
  sap.ui.define(
@@ -70,7 +70,9 @@ sap.ui.define(
70
70
  * @param {object} [mSettings.launchParameters] The URL launch parameters
71
71
  * @param {boolean} [mSettings.async] If false (default), only one JourneyRunner is executed at a time
72
72
  * @param {Function[] | string[]} vJourneys The journeys to be executed. If a journey is represented as a string, it will be interpreted
73
- * as a module path to the file that should be loaded. Else it is expected to be a function
73
+ * as a module path to the file that should be loaded. Else it is expected to be a function.
74
+ * Alternatively, instead of being wrapped in an array, the journeys can also be given as separate parameters:
75
+ * <pre>.run(mSettings, Journey1, Journey2, ...)</pre>
74
76
  * @returns {object} A <code>Promise</code> that is resolved after all tests have been executed
75
77
  *
76
78
  * @function
@@ -86,8 +88,11 @@ sap.ui.define(
86
88
  mSettings = Utils.mergeObjects(this._mInstanceSettings, mSettings);
87
89
  }
88
90
 
89
- var aJourneys = Utils.getParametersArray(iJourneyParameterIndex, arguments),
90
- bAsync = mSettings.async,
91
+ var aJourneys = Array.prototype.slice.call(arguments, iJourneyParameterIndex); // journey-related parameter(s) as array
92
+ if (aJourneys && aJourneys.length && Array.isArray(aJourneys[0])) { // if the first journey parameter is an array...
93
+ aJourneys = aJourneys[0]; // ...then unwrap it, to use this array itself
94
+ }
95
+ var bAsync = mSettings.async,
91
96
  pSyncPromise;
92
97
 
93
98
  if (bAsync) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -17,7 +17,8 @@ sap.ui.define(
17
17
  "sap/fe/test/api/FooterAssertionsBase",
18
18
  "sap/fe/test/api/HeaderActionsLR",
19
19
  "sap/fe/test/api/HeaderAssertionsLR",
20
- "sap/fe/test/api/KPICardAssertions"
20
+ "sap/fe/test/api/KPICardAssertions",
21
+ "sap/fe/test/api/KPICardActions"
21
22
  ],
22
23
  function(
23
24
  Utils,
@@ -33,7 +34,8 @@ sap.ui.define(
33
34
  FooterAssertionsBase,
34
35
  HeaderActionsLR,
35
36
  HeaderAssertionsLR,
36
- KPICardAssertions
37
+ KPICardAssertions,
38
+ KPICardActions
37
39
  ) {
38
40
  "use strict";
39
41
 
@@ -131,6 +133,9 @@ sap.ui.define(
131
133
  id: sChartId
132
134
  });
133
135
  },
136
+ onKPICard: function() {
137
+ return new KPICardActions(KPIBuilder.create(this));
138
+ },
134
139
  /**
135
140
  * Returns a {@link sap.fe.test.api.FilterBarActions} instance.
136
141
  *
@@ -350,7 +355,7 @@ sap.ui.define(
350
355
  },
351
356
  iSeeFlpLink: function(sDescription) {
352
357
  return OpaBuilder.create(this)
353
- .hasType("sap.ui.mdc.link.PanelListItem")
358
+ .hasType("sap.m.Link")
354
359
  .isDialogElement(true)
355
360
  .hasProperties({ text: sDescription })
356
361
  .description("FLP link with text '" + sDescription + "' is present")
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"], function(OpaBuilder, Opa5, Utils) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -297,13 +297,15 @@ sap.ui.define(
297
297
  .execute();
298
298
  },
299
299
  iEnableLink: function(sText) {
300
- return OpaBuilder.create(this)
301
- .hasType("sap.m.ColumnListItem")
302
- .hasAggregationProperties("cells", { text: sText })
303
- .isDialogElement()
304
- .doPress("selectMulti")
305
- .description("The CheckBox for link " + sText + " is selected")
306
- .execute();
300
+ return (
301
+ OpaBuilder.create(this)
302
+ .hasType("sap.m.ColumnListItem")
303
+ //.hasAggregationProperties("cells", { text: sText })
304
+ .isDialogElement()
305
+ .doPress("selectMulti")
306
+ .description("The CheckBox for link " + sText + " is selected")
307
+ .execute()
308
+ );
307
309
  },
308
310
  iPressKeyboardShortcutOnSection: function(sShortcut, mProperties) {
309
311
  return this._iPressKeyboardShortcut(undefined, sShortcut, mProperties, "sap.uxap.ObjectPageSection");
@@ -641,7 +643,7 @@ sap.ui.define(
641
643
  },
642
644
  iSeeFlpLink: function(sDescription) {
643
645
  return OpaBuilder.create(this)
644
- .hasType("sap.ui.mdc.link.PanelListItem")
646
+ .hasType("sap.m.Link")
645
647
  .isDialogElement(true)
646
648
  .hasProperties({ text: sDescription })
647
649
  .description("FLP link with text '" + sDescription + "' is present")
@@ -814,12 +816,18 @@ sap.ui.define(
814
816
  .hasType("sap.m.MessageView")
815
817
  .check(function(oMessageView) {
816
818
  var messages = oMessageView[0].getItems();
817
- return (
819
+ var bMessageObjectHasExpectedValues =
818
820
  messages[iMessagePosition].getGroupName() === oBoundMessageInfo.GroupLabel &&
819
821
  messages[iMessagePosition].getTitle() === oBoundMessageInfo.MessageText &&
820
822
  messages[iMessagePosition].getSubtitle() === oBoundMessageInfo.SubTitle &&
821
- messages[iMessagePosition].getActiveTitle() === oBoundMessageInfo.ActiveTitle
822
- );
823
+ messages[iMessagePosition].getActiveTitle() === oBoundMessageInfo.ActiveTitle;
824
+ if (oBoundMessageInfo.Description) {
825
+ return (
826
+ bMessageObjectHasExpectedValues &&
827
+ messages[iMessagePosition].getGroupName() === oBoundMessageInfo.GroupLabel
828
+ );
829
+ }
830
+ return bMessageObjectHasExpectedValues;
823
831
  }, true)
824
832
  .isDialogElement(true)
825
833
  .description("MessageItem is correctly displayed")
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/test/OpaBuilder", "sap/ui/test/Opa5", "sap/fe/test/Utils"], function(OpaBuilder, Opa5, Utils) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  /**
6
6
  * Actions and assertions to be used with a page hosted in an FCL
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -131,7 +131,7 @@ sap.ui.define(
131
131
  if (sKey === "T_NEW_OBJECT") {
132
132
  return "New Object";
133
133
  } else {
134
- return "(Unnamed Object)";
134
+ return "Unnamed Object";
135
135
  }
136
136
  });
137
137
  }