@openui5/sap.ui.mdc 1.93.3 → 1.96.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 (237) hide show
  1. package/.reuse/dep5 +6 -11
  2. package/THIRDPARTY.txt +10 -16
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +236 -334
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
  7. package/src/sap/ui/mdc/Chart.js +150 -22
  8. package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
  9. package/src/sap/ui/mdc/ChartNew.js +107 -66
  10. package/src/sap/ui/mdc/Control.js +4 -3
  11. package/src/sap/ui/mdc/Element.js +5 -4
  12. package/src/sap/ui/mdc/Field.js +2 -2
  13. package/src/sap/ui/mdc/FilterBar.js +1 -10
  14. package/src/sap/ui/mdc/FilterField.js +28 -4
  15. package/src/sap/ui/mdc/Link.js +2 -2
  16. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  17. package/src/sap/ui/mdc/Table.js +160 -79
  18. package/src/sap/ui/mdc/TableDelegate.js +20 -3
  19. package/src/sap/ui/mdc/ValueHelp.js +1474 -0
  20. package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
  21. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
  22. package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
  23. package/src/sap/ui/mdc/chart/Item.js +2 -3
  24. package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
  25. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
  26. package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
  27. package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
  28. package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
  29. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
  30. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
  31. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
  32. package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
  33. package/src/sap/ui/mdc/condition/Condition.js +2 -2
  34. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  35. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  36. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  37. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
  38. package/src/sap/ui/mdc/condition/Operator.js +4 -4
  39. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  40. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
  41. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
  42. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
  43. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
  44. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
  45. package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
  46. package/src/sap/ui/mdc/enum/SelectType.js +43 -0
  47. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  49. package/src/sap/ui/mdc/field/ConditionType.js +19 -4
  50. package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
  51. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  52. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  53. package/src/sap/ui/mdc/field/DefineConditionPanel.js +38 -14
  54. package/src/sap/ui/mdc/field/FieldBase.js +92 -41
  55. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
  56. package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
  57. package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
  58. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
  65. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
  66. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  67. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
  69. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  70. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  71. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  72. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  73. package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
  74. package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
  75. package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
  76. package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
  77. package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
  78. package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
  79. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
  80. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
  81. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
  82. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  83. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
  84. package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
  85. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  86. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
  87. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  88. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  89. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
  90. package/src/sap/ui/mdc/library.js +588 -8
  91. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  92. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  93. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  94. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  95. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  96. package/src/sap/ui/mdc/link/Factory.js +1 -1
  97. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  98. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  99. package/src/sap/ui/mdc/link/Panel.js +1 -1
  100. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  101. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  102. package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
  103. package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
  104. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  105. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  106. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  107. package/src/sap/ui/mdc/messagebundle.properties +31 -5
  108. package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
  109. package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
  110. package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
  111. package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
  112. package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
  113. package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
  114. package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
  115. package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
  116. package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
  117. package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
  118. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
  119. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
  120. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
  121. package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
  122. package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
  123. package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
  124. package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
  125. package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
  126. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
  127. package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
  128. package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
  129. package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
  130. package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
  131. package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
  132. package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
  133. package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
  134. package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
  135. package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
  136. package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
  137. package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
  138. package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
  139. package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
  140. package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
  141. package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
  142. package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
  143. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
  144. package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
  145. package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
  146. package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
  147. package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
  148. package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
  149. package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
  150. package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
  151. package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
  152. package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
  153. package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
  154. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
  155. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -3
  156. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  157. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
  158. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
  159. package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
  160. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
  161. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
  162. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
  163. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
  164. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
  165. package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
  166. package/src/sap/ui/mdc/p13n/Engine.js +3 -2
  167. package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
  168. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  169. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  170. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +22 -24
  171. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
  172. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
  173. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
  174. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
  175. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
  176. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
  177. package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
  178. package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
  179. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
  180. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
  181. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
  182. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
  183. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
  184. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
  185. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
  186. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
  187. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
  188. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
  189. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
  190. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
  191. package/src/sap/ui/mdc/table/Column.js +35 -9
  192. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  193. package/src/sap/ui/mdc/table/GridTableType.js +0 -1
  194. package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
  195. package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
  196. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  197. package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
  198. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  199. package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
  200. package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
  201. package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
  202. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
  203. package/src/sap/ui/mdc/ui/Container.js +2 -2
  204. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  205. package/src/sap/ui/mdc/util/Common.js +26 -0
  206. package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
  207. package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
  208. package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
  209. package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
  210. package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
  211. package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
  212. package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
  213. package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
  214. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
  215. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
  216. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
  217. package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
  218. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
  219. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
  220. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
  221. package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
  222. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
  223. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
  224. package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
  225. package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
  226. package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
  227. package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
  228. package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
  229. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
  230. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
  231. package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
  232. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
  233. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
  234. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
  235. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
  236. package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
  237. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
@@ -1,10 +1,11 @@
1
1
  /*!
2
2
  * ${copyright}
3
3
  */
4
-
5
4
  sap.ui.define([
6
5
  "sap/ui/test/Opa5",
7
- "test-resources/sap/ui/mdc/testutils/opa/table/TestObjects"
6
+ "test-resources/sap/ui/mdc/testutils/opa/table/TestObjects",
7
+ "test-resources/sap/ui/mdc/testutils/opa/filterbar/TestObjects",
8
+ "test-resources/sap/ui/mdc/testutils/opa/chartNew/TestObjects"
8
9
  ], function() {
9
10
  "use strict";
10
11
  });
@@ -0,0 +1,48 @@
1
+ /*!
2
+ * ${copyright}
3
+ */
4
+
5
+ sap.ui.define([
6
+ "sap/ui/test/actions/Action"
7
+ ], function(Action) {
8
+ "use strict";
9
+
10
+ /**
11
+ * @class
12
+ * The <code>ContextMenu</code> action is used to simulate a right-click interaction
13
+ * with a control.
14
+ *
15
+ * @extends sap.ui.test.actions.Action
16
+ * @public
17
+ * @alias sap.ui.mdc.ActionToolbarTesting.pages.OpenContextMenu
18
+ * @author SAP SE
19
+ * @since 1.96
20
+ */
21
+ var ContextMenu = Action.extend("sap.ui.mdc.ActionToolbarTesting.pages.OpenContextMenu", /** @lends sap.ui.mdc.ActionToolbarTesting.pages.OpenContextMenu.prototype */ {
22
+ metadata : {
23
+ publicMethods : [ "executeOn" ]
24
+ },
25
+
26
+ /**
27
+ * Focuses on a given control and triggers a <code>contextmenu</code> event for it.
28
+ * Logs an error if the control is not visible (for example, if it has no DOM representation)
29
+ *
30
+ * @param {sap.ui.core.Control} oControl The control on which the <code>contextmenu</code> event is triggered
31
+ * @public
32
+ */
33
+ executeOn : function (oControl) {
34
+ var $ActionDomRef = this.$(oControl);
35
+
36
+ if ($ActionDomRef.length) {
37
+ this.oLogger.timestamp("sap.ui.comp.actions.ContextMenu");
38
+ this.oLogger.debug("Right-clicked the control " + oControl);
39
+
40
+ this._tryOrSimulateFocusin($ActionDomRef, oControl);
41
+
42
+ $ActionDomRef.triggerHandler("contextmenu");
43
+ }
44
+ }
45
+ });
46
+
47
+ return ContextMenu;
48
+ });
@@ -0,0 +1,310 @@
1
+ sap.ui.define([
2
+ "sap/ui/test/actions/Press",
3
+ "sap/base/Log",
4
+ "sap/ui/test/matchers/Ancestor",
5
+ "sap/ui/test/matchers/PropertyStrictEquals"
6
+ ], function (Press, Log, Ancestor, PropertyStrictEquals) {
7
+ "use strict";
8
+
9
+ var oCore = sap.ui.test.Opa5.getWindow().sap.ui.getCore();
10
+
11
+ var waitForMDCChartWithId = function(sId, oSettings) {
12
+ return this.waitFor({
13
+ id: sId,
14
+ controlType: "sap.ui.mdc.ChartNew",
15
+ success: function(oMDCChartNew) {
16
+ if (oSettings && typeof oSettings.success === "function") {
17
+ oSettings.success.call(this, oMDCChartNew);
18
+ }
19
+ },
20
+ actions: oSettings.actions ? oSettings.actions : []
21
+ });
22
+ };
23
+
24
+ var iClickOnOverflowToolbarButton = function(oMDCChart, oSettings) {
25
+ this.waitFor({
26
+ controlType: "sap.m.OverflowToolbar",
27
+ matchers: new Ancestor(oMDCChart),
28
+ success: function(aOverflowToolbars) {
29
+ var oOverflowToolbar = aOverflowToolbars[0];
30
+ oSettings.matchers.push(new Ancestor(oOverflowToolbar, false));
31
+ this.waitFor({
32
+ controlType: oSettings.controlType,
33
+ matchers: oSettings.matchers,
34
+ actions: new Press()
35
+ });
36
+
37
+ if (oSettings && typeof oSettings.success === "function") {
38
+ oSettings.success.call(this);
39
+ }
40
+ }
41
+ });
42
+ };
43
+
44
+
45
+ var iClickOnOverflowToolbarButtonWithIcon = function(oMDCChart, sIcon, oSettings) {
46
+
47
+ var oTempSettings = oSettings ? oSettings : {};
48
+ oTempSettings.controlType = "sap.m.OverflowToolbarButton";
49
+ oTempSettings.matchers = [
50
+ new PropertyStrictEquals({
51
+ name: "icon",
52
+ value: sIcon
53
+ })
54
+ ];
55
+
56
+ iClickOnOverflowToolbarButton.call(this, oMDCChart, oTempSettings);
57
+ };
58
+
59
+ var iClickOnOverflowToolbarToggleButtonWithIcon = function(oMDCChart, sIcon, oSettings) {
60
+
61
+ var oTempSettings = oSettings ? oSettings : {};
62
+ oTempSettings.controlType = "sap.m.OverflowToolbarToggleButton";
63
+ oTempSettings.matchers = [
64
+ new PropertyStrictEquals({
65
+ name: "icon",
66
+ value: sIcon
67
+ })
68
+ ];
69
+
70
+ iClickOnOverflowToolbarButton.call(this, oMDCChart, oTempSettings);
71
+ };
72
+
73
+ var iClickOnButtonWithText = function(oMDCChart, sText, oSettings) {
74
+
75
+ var oTempSettings = oSettings ? oSettings : {};
76
+ oTempSettings.controlType = "sap.m.Button";
77
+ oTempSettings.matchers = [
78
+ new PropertyStrictEquals({
79
+ name: "text",
80
+ value: sText
81
+ })
82
+ ];
83
+
84
+ iClickOnOverflowToolbarButton.call(this, oMDCChart, oTempSettings);
85
+ };
86
+
87
+ return {
88
+ /**
89
+ * Clicks on the "Zoom In" button in the toolbar of a mdc chart.
90
+ * @param {string} sId The id of the mdc chart
91
+ */
92
+ iClickOnZoomIn : function(sId){
93
+ waitForMDCChartWithId.call(this, sId, {
94
+ success: function(oMDCChart){
95
+ iClickOnOverflowToolbarButtonWithIcon.call(this, oMDCChart, "sap-icon://zoom-in");
96
+ }
97
+ });
98
+ },
99
+
100
+ /**
101
+ * Clicks on the "Zoom Out" button in the toolbar of a mdc chart.
102
+ * @param {string} sId The id of the mdc chart
103
+ */
104
+ iClickOnZoomOut : function(sId){
105
+ waitForMDCChartWithId.call(this, sId, {
106
+ success: function(oMDCChart){
107
+ iClickOnOverflowToolbarButtonWithIcon.call(this, oMDCChart, "sap-icon://zoom-out");
108
+ }
109
+ });
110
+ },
111
+
112
+ /**
113
+ * Clicks on the "Legend" toggle button in the toolbar of a mdc chart.
114
+ * @param {string} sId The id of the mdc chart
115
+ */
116
+ iClickOnTheLegendToggleButton : function(sId){
117
+ waitForMDCChartWithId.call(this, sId, {
118
+ success: function(oMDCChart){
119
+ iClickOnOverflowToolbarToggleButtonWithIcon.call(this, oMDCChart, "sap-icon://legend");
120
+ }
121
+ });
122
+ },
123
+
124
+ /**
125
+ * Clicks on the "Show Details" button in the toolbar of a mdc chart.
126
+ * @param {*} sId The id of the mdc chart
127
+ */
128
+ iClickOnTheSelectionDetailsButton: function(sId){
129
+
130
+ waitForMDCChartWithId.call(this, sId, {
131
+ success: function(oMDCChart){
132
+ this.waitFor({
133
+ controlType: "sap.m.Button",
134
+ id: sId + "-selectionDetails-button",
135
+ actions: new Press()
136
+ });
137
+ }
138
+ });
139
+ },
140
+
141
+ /**
142
+ * Clicks on the "Drilldown" button in the toolbar of a mdc chart.
143
+ * @param {string} sId The id of the mdc chart.
144
+ */
145
+ iClickOnTheDrillDownButton: function(sId){
146
+ waitForMDCChartWithId.call(this, sId, {
147
+ success: function(oMDCChart){
148
+ iClickOnButtonWithText.call(this, oMDCChart, oCore.getLibraryResourceBundle("sap.ui.mdc").getText("chart.CHART_DRILLDOWN_TITLE"));
149
+ }
150
+ });
151
+ },
152
+
153
+ /**
154
+ * Clicks on the "Chart Type" button in the toolbar of a mdc chart.
155
+ * @param {string} sId The id of the mdc chart.
156
+ */
157
+ iClickOnTheChartTypeButton: function(sId, oSettings){
158
+ waitForMDCChartWithId.call(this, sId, {
159
+ success: function(oMDCChart){
160
+ this.waitFor({
161
+ controlType: "sap.ui.mdc.chart.ChartTypeButton",
162
+ matchers: new Ancestor(oMDCChart),
163
+ actions: new Press(),
164
+ success: function(){
165
+ if (oSettings && typeof oSettings.success === "function") {
166
+ oSettings.success.call(this);
167
+ }
168
+ }
169
+ });
170
+ }
171
+ });
172
+ },
173
+
174
+ /**
175
+ * Clicks on the "Personalisation" button in the toolbar of a mdc chart.
176
+ * @param {string} sId The id of the mdc chart.
177
+ */
178
+ iClickOnThePersonalisationButton: function(sId){
179
+ waitForMDCChartWithId.call(this, sId, {
180
+ success: function(oMDCChart){
181
+ iClickOnOverflowToolbarButtonWithIcon.call(this, oMDCChart, "sap-icon://action-settings");
182
+ }
183
+ });
184
+ },
185
+
186
+ /**
187
+ * Selects a specific chart type for a mdc chart in an open chart type popover
188
+ * @param {string} sChartTypeName The name of the chart type
189
+ */
190
+ iSelectChartTypeInPopover: function(sChartTypeName){
191
+ return this.waitFor({
192
+ controlType: "sap.m.StandardListItem",
193
+ success: function(aListItems) {
194
+
195
+ var oListItem = aListItems.filter(function(oItem){
196
+ return oItem.getTitle() == sChartTypeName;
197
+ })[0];
198
+
199
+ if (!oListItem){
200
+ Log.error("No chart type with name " + sChartTypeName + " was found in open popovers");
201
+ } else {
202
+ new Press().executeOn(oListItem);
203
+ }
204
+ },
205
+ errorMessage: "No chartType list items found"
206
+ });
207
+ },
208
+
209
+ /**
210
+ * Clicks on an drill-down breadcrumb with given name for given mdc chart
211
+ * @param {string} sName The name of the chart type
212
+ * @param {string} sId Id of the mdc chart.
213
+ */
214
+ iClickOnTheBreadcrumbWithName: function(sName, sId){
215
+
216
+ waitForMDCChartWithId.call(this, sId, {
217
+ success: function(oMDCChart){
218
+ this.waitFor({
219
+ controlType: "sap.m.Link",
220
+ matchers: new Ancestor(oMDCChart),
221
+ success: function(aLinks){
222
+ var aFilteredLinks = aLinks.filter(function(oLink){return (oLink.getText() === sName && oLink.getParent().getParent().getId() === sId);});
223
+
224
+ if (aFilteredLinks.length == 1){
225
+ new Press().executeOn(aFilteredLinks[0]);
226
+ } else {
227
+ Log.error("Expected 1 Link with text " + sName + " but found " + aFilteredLinks.length);
228
+ }
229
+ }
230
+ });
231
+ }
232
+ });
233
+ },
234
+
235
+ /**
236
+ * Selects a specific dimension to drill-down for a mdc chart in an open chart drill-down popover
237
+ * @param {string} sDrillName Name of the Dimension which should be drilled-down
238
+ */
239
+ iSelectANewDrillDimensionInPopover: function(sDrillName){
240
+ return this.waitFor({
241
+ controlType: "sap.m.StandardListItem",
242
+ success: function(aListItems) {
243
+
244
+ var oListItem = aListItems.filter(function(oItem){
245
+ return oItem.getTitle() == sDrillName;
246
+ })[0];
247
+
248
+ if (!oListItem){
249
+ Log.error("No chart type with name " + sDrillName + " was found in open popovers");
250
+ } else {
251
+ new Press().executeOn(oListItem);
252
+ }
253
+ },
254
+ errorMessage: "No chartType list items found"
255
+ });
256
+ },
257
+
258
+ /**
259
+ * Performs a drill-down on the MDC Chart
260
+ * @param {string} sId The id of the MDC Chart
261
+ * @param {string} sDrillName Name of the Dimension which should be drilled-down.
262
+ */
263
+ iDrillDownInDimension: function(sId, sDrillName) {
264
+ waitForMDCChartWithId.call(this, sId, {
265
+ success: function(oMDCChart){
266
+ iClickOnButtonWithText.call(this, oMDCChart, oCore.getLibraryResourceBundle("sap.ui.comp").getText("CHART_DRILLDOWNBTN_TEXT"), {
267
+ success: function(){
268
+ this.iSelectChartTypeInPopover(sDrillName);
269
+ }
270
+ });
271
+ }
272
+ });
273
+ },
274
+
275
+ /**
276
+ * Performs a drill-down on the MDC Chart
277
+ * @param {string} sId The id of the MDC Chart
278
+ * @param {string} sChartTypeName Name of the Dimension which should be drilled-down.
279
+ */
280
+ iSelectAChartType: function(sId, sChartTypeName) {
281
+ waitForMDCChartWithId.call(this, sId, {
282
+ success: function(oMDCChart){
283
+ this.iClickOnTheChartTypeButton.call(this, sId, {
284
+ success: function(){
285
+ this.iSelectANewDrillDimensionInPopover(sChartTypeName);
286
+ }
287
+ });
288
+ }
289
+ });
290
+ },
291
+
292
+ /**
293
+ * Selects given datapoints on given chart.
294
+ * @param {array} aDataPoints Datapoint objects to select
295
+ * @param {string} sId Id of the mdc chart
296
+ */
297
+ iSelectTheDatapoint: function (aDataPoints, sId){
298
+
299
+ },
300
+
301
+ /**
302
+ * Selectes given categories (dimensions) for the given mdc chart
303
+ * @param {object} oCategories Categories to select
304
+ * @param {string} sId Id of the mdc chart
305
+ */
306
+ iSelectTheCategories: function (oCategories, sId){
307
+
308
+ }
309
+ };
310
+ });
@@ -0,0 +1,39 @@
1
+ sap.ui.define([
2
+ "./ActionsBase",
3
+ "sap/ui/thirdparty/jquery"
4
+ ], function (ActionsBase, jQuery) {
5
+ "use strict";
6
+
7
+ var oActions = {
8
+ /**
9
+ * Selects given datapoints on given chart.
10
+ * <b>Note:</b> The API used on the inner chart for this seems unstable. Ensure the chart is 100% correctly set up, otherwise the call won't work and no error will be thrown
11
+ * @param {array} aDataPoints Datapoint objects to select (see sap.chart.Chart#setSelectedDataPoints)
12
+ * @param {string} sId Id of the mdc chart
13
+ */
14
+ iSelectTheDatapoint: function (aDataPoints, sId){
15
+ return this.waitFor({
16
+ id: sId,
17
+ success: function(oMDCChart){
18
+ oMDCChart._getInnerChart().setSelectedDataPoints(aDataPoints);
19
+ }
20
+ });
21
+ },
22
+
23
+ /**
24
+ * Selectes given categories (dimensions) for the given mdc chart
25
+ * @param {object} oCategories Categories to select (see sap.chart.Chart#setSelectedCategories for more information)
26
+ * @param {string} sId Id of the mdc chart
27
+ */
28
+ iSelectTheCategories: function (oCategories, sId){
29
+ return this.waitFor({
30
+ id: sId,
31
+ success: function(oMDCChart){
32
+ oMDCChart._getInnerChart().setSelectedCategories(oCategories);
33
+ }
34
+ });
35
+ }
36
+ };
37
+
38
+ return jQuery.extend(ActionsBase, oActions);
39
+ });
@@ -0,0 +1,118 @@
1
+ sap.ui.define([
2
+ "sap/ui/test/Opa5"
3
+ ], function (Opa5) {
4
+ "use strict";
5
+
6
+ return {
7
+ /**
8
+ * Assertion to check that there is a mdc chart visible on the screen.
9
+ */
10
+ iShouldSeeAChart: function() {
11
+ //return Opa5.assert.ok(true);
12
+
13
+ return this.waitFor({
14
+ controlType: "sap.ui.mdc.ChartNew",
15
+ check: function(aChart) {
16
+ return aChart.length === 1;
17
+ },
18
+ success: function(aChart) {
19
+ Opa5.assert.ok(aChart.length, 'MDC Chart is on the screen');
20
+ },
21
+ errorMessage: "No MDC Chart found"
22
+ });
23
+ },
24
+
25
+ /**
26
+ * Assertion to check that there is a legend visible on the screen for given mdc chart.
27
+ * @param {string} sId Id of the chart to be checked for a visible legend
28
+ */
29
+ iShouldSeeALegend: function(sId) {
30
+
31
+ },
32
+
33
+ /**
34
+ * Assertion to check that there is no legend visible on the screen for given mdc chart.
35
+ * @param {string} sId Id of the chart to be checked for a visible legend
36
+ */
37
+ iShouldSeeNoLegend: function(sId) {
38
+
39
+ },
40
+
41
+ /**
42
+ * Assertion to check that there is a chart type popover visible on the screen.
43
+ */
44
+ iShouldSeeAChartTypePopover: function() {
45
+
46
+ return this.waitFor({
47
+ controlType: "sap.m.Popover",
48
+ success: function(aPopovers) {
49
+ Opa5.assert.ok(aPopovers.length, "Dialogs were found");
50
+
51
+ var oDialog = aPopovers.filter(function(oDialog){return (oDialog.getId().toLowerCase().includes("btncharttypepopover"));})[0];
52
+ Opa5.assert.ok(oDialog, "Chart Type dialog is opened");
53
+ },
54
+ errorMessage: "No Dialogs found"
55
+ });
56
+
57
+ },
58
+
59
+ /**
60
+ * Assertion to check that there is chart visible with given chart type.
61
+ * @param {string} sChartId Id of the chart to be checked for a chart type
62
+ * @param {string} sChartType Chart type which should be selected for the given chart
63
+ */
64
+ iShouldSeeTheChartWithChartType: function(sChartId, sChartType){
65
+
66
+ },
67
+
68
+ /**
69
+ * Assertion to check that there is a chart with given drillstack visible.
70
+ * @param {array} aCheckDrillStack Drillstack to check for
71
+ * @param {string} sChartId Id of the mdc chart
72
+ */
73
+ iShouldSeeTheDrillStack: function(aCheckDrillStack, sChartId) {
74
+
75
+ },
76
+
77
+ /**
78
+ * Assertion to check that there is a drilldown popover visible.
79
+ */
80
+ iShouldSeeADrillDownPopover: function() {
81
+
82
+ return this.waitFor({
83
+ controlType: "sap.m.Popover",
84
+ success: function(aPopovers) {
85
+ Opa5.assert.ok(aPopovers.length, "Dialogs were found");
86
+
87
+ var oDialog = aPopovers.filter(function(oDialog){return (oDialog.getId().includes("drilldownPopover"));})[0];
88
+ Opa5.assert.ok(oDialog, "Drilldown dialog is opened");
89
+ },
90
+ errorMessage: "No Dialogs found"
91
+ });
92
+
93
+ },
94
+
95
+ /**
96
+ * Assertion to check that there is a drilldown popover visible.
97
+ */
98
+ iShouldSeeADetailsPopover: function() {
99
+ return this.waitFor({
100
+ controlType: "sap.m.Popover",
101
+ success: function(aPopovers) {
102
+ Opa5.assert.ok(aPopovers.length, "Dialogs were found");
103
+
104
+ var oDialog = aPopovers.filter(function(oDialog){return (oDialog.getId().includes("selectionDetails"));})[0];
105
+ Opa5.assert.ok(oDialog, "Details dialog is opened");
106
+ },
107
+ errorMessage: "No Dialogs found"
108
+ });
109
+ },
110
+ iShouldSeeVisibleDimensionsInOrder: function(aOrderedDimensionNames, sId) {
111
+
112
+ },
113
+ iShouldSeeVisibleMeasuresInOrder: function(aOrderedMeasureNames, sId) {
114
+
115
+ }
116
+
117
+ };
118
+ });
@@ -0,0 +1,137 @@
1
+ sap.ui.define([
2
+ "sap/ui/test/Opa5",
3
+ "./AssertionsBase",
4
+ "sap/ui/thirdparty/jquery",
5
+ "sap/ui/test/matchers/PropertyStrictEquals"
6
+ ], function (Opa5, AssertionsBase, jQuery, PropertyStrictEquals) {
7
+ "use strict";
8
+
9
+ var oAssertions = {
10
+
11
+ iShouldSeeALegend: function(sId) {
12
+ //return Opa5.assert.ok(true);
13
+ return this.waitFor({
14
+ id: sId,
15
+ success: function(oChart) {
16
+ Opa5.assert.ok(oChart._getInnerChart().getVizProperties().legend.visible, "Legend is visible");
17
+ },
18
+ errorMessage: "No Chart found"
19
+ });
20
+
21
+ },
22
+
23
+ iShouldSeeNoLegend: function(sId) {
24
+ //return Opa5.assert.ok(true);
25
+
26
+ return this.waitFor({
27
+ id: sId,
28
+ success: function(oChart) {
29
+ Opa5.assert.ok(!oChart._getInnerChart().getVizProperties().legend.visible, "Legend is not visible");
30
+ },
31
+ errorMessage: "No Chart found"
32
+ });
33
+
34
+ },
35
+
36
+ iShouldSeeTheChartWithChartType: function(sChartId, sChartType){
37
+ return this.waitFor({
38
+ id: sChartId,
39
+ success: function(oChart) {
40
+ Opa5.assert.ok(oChart._getInnerChart().getChartType() === sChartType);
41
+ },
42
+ errorMessage: "No Chart found"
43
+ });
44
+ },
45
+
46
+ iShouldSeeTheDrillStack: function(aCheckDrillStack, sChartId) {
47
+
48
+ var arraysMatchElements = function (array1, array2) {
49
+
50
+ if (array1.length !== array2.length){
51
+ return false;
52
+ }
53
+
54
+ for (var i = 0; i < array1.length; i++) {
55
+ if (array1[i] !== array2[i]) {
56
+ return false;
57
+ }
58
+ }
59
+
60
+ return true;
61
+
62
+ };
63
+
64
+ return this.waitFor({
65
+ id: sChartId,
66
+ success: function(oChart) {
67
+
68
+ var aDrillStack = oChart._getInnerChart().getDrillStack();
69
+ var aStackDimensions = [];
70
+
71
+ aDrillStack.forEach(function(oStackEntry) {
72
+ // loop over nested dimension arrays
73
+ oStackEntry.dimension.forEach(function(sDimension) {
74
+ if (sDimension != null && sDimension != "" && aStackDimensions.indexOf(sDimension) == -1) {
75
+ aStackDimensions.push(sDimension);
76
+ }
77
+ });
78
+ });
79
+
80
+ Opa5.assert.ok(arraysMatchElements(aStackDimensions, aCheckDrillStack), "Drill stack is equal");
81
+ },
82
+ errorMessage: "No Chart found"
83
+ });
84
+ },
85
+
86
+ iShouldSeeVisibleDimensionsInOrder: function(aOrderedDimensionNames, sId) {
87
+ var aDomElements;
88
+ return this.waitFor({
89
+ controlType: "sap.chart.Chart",
90
+ matchers: new PropertyStrictEquals({
91
+ name: "id",
92
+ value: sId + "--innerChart"
93
+ }),
94
+ check: function() {
95
+ var frameJQuery = Opa5.getWindow().jQuery;
96
+ var fnControl = frameJQuery.sap.getObject("sap.chart.Chart");
97
+ aDomElements = Opa5.getPlugin().getAllControlsInContainer(frameJQuery('body'), fnControl);
98
+ return aDomElements[0].getVisibleDimensions().length === aOrderedDimensionNames.length;
99
+ },
100
+ success: function() {
101
+ Opa5.assert.equal(aDomElements.length, 1, "One sap.chart.Chart control found");
102
+ Opa5.assert.equal(aDomElements[0].getVisibleDimensions().length, aOrderedDimensionNames.length, "Chart contains " + aOrderedDimensionNames.length + " visible dimensions");
103
+ aDomElements[0].getVisibleDimensions().forEach(function(sDimensionName, iIndex) {
104
+ Opa5.assert.equal(sDimensionName, aOrderedDimensionNames[iIndex], "Dimension '" + sDimensionName + "' is visible on position " + (iIndex + 1));
105
+ });
106
+ }
107
+ });
108
+ },
109
+
110
+ iShouldSeeVisibleMeasuresInOrder: function(aOrderedMeasureNames, sId) {
111
+ var aDomElements;
112
+ return this.waitFor({
113
+ controlType: "sap.chart.Chart",
114
+ matchers: new PropertyStrictEquals({
115
+ name: "id",
116
+ value: sId + "--innerChart"
117
+ }),
118
+ check: function() {
119
+ var frameJQuery = Opa5.getWindow().jQuery;
120
+ var fnControl = frameJQuery.sap.getObject("sap.chart.Chart");
121
+ aDomElements = Opa5.getPlugin().getAllControlsInContainer(frameJQuery('body'), fnControl);
122
+ return aDomElements[0].getVisibleMeasures().length === aOrderedMeasureNames.length;
123
+ },
124
+ success: function() {
125
+ Opa5.assert.equal(aDomElements.length, 1, "One sap.chart.Chart control found");
126
+ Opa5.assert.equal(aDomElements[0].getVisibleMeasures().length, aOrderedMeasureNames.length, "Chart contains " + aOrderedMeasureNames.length + " visible measures");
127
+ aDomElements[0].getVisibleMeasures().forEach(function(sMeasureName, iIndex) {
128
+ Opa5.assert.equal(sMeasureName, aOrderedMeasureNames[iIndex], "Measure '" + sMeasureName + "' is visible on position " + (iIndex + 1));
129
+ });
130
+ }
131
+ });
132
+ }
133
+
134
+ };
135
+
136
+ return jQuery.extend(AssertionsBase, oAssertions);
137
+ });
@@ -0,0 +1,24 @@
1
+ /*!
2
+ * ${copyright}
3
+ */
4
+
5
+ sap.ui.define([
6
+ "sap/ui/test/Opa5",
7
+ "sap/ui/mdc/integration/testlibrary/chartNew/ActionsViz",
8
+ "sap/ui/mdc/integration/testlibrary/chartNew/AssertionsViz"
9
+ ], function(
10
+ Opa5,
11
+ ChartActions,
12
+ ChartAssertions
13
+ ) {
14
+ "use strict";
15
+
16
+ Opa5.extendConfig({
17
+ testLibBase: {
18
+ mdcTestLibrary: {
19
+ actions: ChartActions,
20
+ assertions: ChartAssertions
21
+ }
22
+ }
23
+ });
24
+ });