@openui5/sap.ui.mdc 1.136.2 → 1.138.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 (227) hide show
  1. package/.eslintrc.json +34 -0
  2. package/REUSE.toml +0 -28
  3. package/THIRDPARTY.txt +0 -24
  4. package/package.json +4 -4
  5. package/src/sap/ui/mdc/.library +1 -1
  6. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  7. package/src/sap/ui/mdc/Chart.js +1 -1
  8. package/src/sap/ui/mdc/Control.js +1 -1
  9. package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
  10. package/src/sap/ui/mdc/Element.js +1 -1
  11. package/src/sap/ui/mdc/Field.js +174 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterField.js +22 -2
  14. package/src/sap/ui/mdc/Link.js +1 -1
  15. package/src/sap/ui/mdc/MultiValueField.js +14 -2
  16. package/src/sap/ui/mdc/Table.js +211 -170
  17. package/src/sap/ui/mdc/TableDelegate.js +17 -12
  18. package/src/sap/ui/mdc/ValueHelp.js +20 -1
  19. package/src/sap/ui/mdc/ValueHelpDelegate.js +6 -30
  20. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  21. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
  22. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  23. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  24. package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
  25. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  26. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  27. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  28. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  29. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +18 -18
  30. package/src/sap/ui/mdc/condition/Operator.js +3 -1
  31. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
  32. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  33. package/src/sap/ui/mdc/enums/ContentMode.js +7 -1
  34. package/src/sap/ui/mdc/field/ConditionType.js +6 -3
  35. package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
  36. package/src/sap/ui/mdc/field/ConditionsType.js +26 -4
  37. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  38. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +6 -3
  39. package/src/sap/ui/mdc/field/FieldBase.js +302 -75
  40. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +5 -2
  41. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  42. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  43. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  44. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  45. package/src/sap/ui/mdc/field/FieldSelect.js +459 -0
  46. package/src/sap/ui/mdc/field/FieldSelectRenderer.js +66 -0
  47. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  48. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  49. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  50. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  51. package/src/sap/ui/mdc/field/content/ContentFactory.js +35 -6
  52. package/src/sap/ui/mdc/field/content/DateContent.js +6 -0
  53. package/src/sap/ui/mdc/field/content/DateTimeContent.js +3 -0
  54. package/src/sap/ui/mdc/field/content/DefaultContent.js +45 -0
  55. package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
  56. package/src/sap/ui/mdc/field/content/SearchContent.js +6 -0
  57. package/src/sap/ui/mdc/field/content/TimeContent.js +3 -0
  58. package/src/sap/ui/mdc/field/content/UnitContent.js +18 -15
  59. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +1 -1
  60. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  61. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
  62. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  63. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  64. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  65. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  66. package/src/sap/ui/mdc/flexibility/Util.js +10 -0
  67. package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
  68. package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
  69. package/src/sap/ui/mdc/i18n/interaction.xml +2 -2
  70. package/src/sap/ui/mdc/i18n/interaction_ar.xml +3 -3
  71. package/src/sap/ui/mdc/i18n/interaction_bg.xml +2 -2
  72. package/src/sap/ui/mdc/i18n/interaction_ca.xml +2 -2
  73. package/src/sap/ui/mdc/i18n/interaction_cnr.xml +2 -2
  74. package/src/sap/ui/mdc/i18n/interaction_cs.xml +2 -2
  75. package/src/sap/ui/mdc/i18n/interaction_cy.xml +2 -2
  76. package/src/sap/ui/mdc/i18n/interaction_da.xml +2 -2
  77. package/src/sap/ui/mdc/i18n/interaction_de.xml +2 -2
  78. package/src/sap/ui/mdc/i18n/interaction_en.xml +2 -2
  79. package/src/sap/ui/mdc/i18n/interaction_en_GB.xml +2 -2
  80. package/src/sap/ui/mdc/i18n/interaction_en_US_saprigi.xml +2 -2
  81. package/src/sap/ui/mdc/i18n/interaction_es.xml +2 -2
  82. package/src/sap/ui/mdc/i18n/interaction_es_MX.xml +1 -1
  83. package/src/sap/ui/mdc/i18n/interaction_et.xml +2 -2
  84. package/src/sap/ui/mdc/i18n/interaction_fi.xml +2 -2
  85. package/src/sap/ui/mdc/i18n/interaction_hi.xml +2 -2
  86. package/src/sap/ui/mdc/i18n/interaction_hr.xml +2 -2
  87. package/src/sap/ui/mdc/i18n/interaction_hu.xml +2 -2
  88. package/src/sap/ui/mdc/i18n/interaction_id.xml +2 -2
  89. package/src/sap/ui/mdc/i18n/interaction_it.xml +2 -2
  90. package/src/sap/ui/mdc/i18n/interaction_kk.xml +2 -2
  91. package/src/sap/ui/mdc/i18n/interaction_lt.xml +2 -2
  92. package/src/sap/ui/mdc/i18n/interaction_lv.xml +2 -2
  93. package/src/sap/ui/mdc/i18n/interaction_mk.xml +2 -2
  94. package/src/sap/ui/mdc/i18n/interaction_ms.xml +2 -2
  95. package/src/sap/ui/mdc/i18n/interaction_nl.xml +1 -1
  96. package/src/sap/ui/mdc/i18n/interaction_no.xml +2 -2
  97. package/src/sap/ui/mdc/i18n/interaction_pl.xml +2 -2
  98. package/src/sap/ui/mdc/i18n/interaction_pt.xml +2 -2
  99. package/src/sap/ui/mdc/i18n/interaction_pt_PT.xml +2 -2
  100. package/src/sap/ui/mdc/i18n/interaction_ru.xml +2 -2
  101. package/src/sap/ui/mdc/i18n/interaction_sh.xml +2 -2
  102. package/src/sap/ui/mdc/i18n/interaction_sl.xml +2 -2
  103. package/src/sap/ui/mdc/i18n/interaction_sr.xml +2 -2
  104. package/src/sap/ui/mdc/i18n/interaction_sv.xml +2 -2
  105. package/src/sap/ui/mdc/i18n/interaction_tr.xml +1 -1
  106. package/src/sap/ui/mdc/i18n/interaction_uk.xml +2 -2
  107. package/src/sap/ui/mdc/i18n/interaction_vi.xml +2 -2
  108. package/src/sap/ui/mdc/i18n/interaction_zh_CN.xml +2 -2
  109. package/src/sap/ui/mdc/i18n/interaction_zh_TW.xml +2 -2
  110. package/src/sap/ui/mdc/library.js +13 -7
  111. package/src/sap/ui/mdc/link/Factory.js +1 -1
  112. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  113. package/src/sap/ui/mdc/link/Panel.js +1 -1
  114. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  115. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  116. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  117. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  118. package/src/sap/ui/mdc/messagebundle.properties +3 -0
  119. package/src/sap/ui/mdc/messagebundle_ar.properties +2 -0
  120. package/src/sap/ui/mdc/messagebundle_bg.properties +2 -0
  121. package/src/sap/ui/mdc/messagebundle_ca.properties +2 -0
  122. package/src/sap/ui/mdc/messagebundle_cnr.properties +2 -0
  123. package/src/sap/ui/mdc/messagebundle_cs.properties +2 -0
  124. package/src/sap/ui/mdc/messagebundle_cy.properties +2 -0
  125. package/src/sap/ui/mdc/messagebundle_da.properties +2 -0
  126. package/src/sap/ui/mdc/messagebundle_de.properties +2 -0
  127. package/src/sap/ui/mdc/messagebundle_el.properties +2 -0
  128. package/src/sap/ui/mdc/messagebundle_en.properties +2 -0
  129. package/src/sap/ui/mdc/messagebundle_en_GB.properties +2 -0
  130. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +2 -0
  131. package/src/sap/ui/mdc/messagebundle_es.properties +2 -0
  132. package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -1
  133. package/src/sap/ui/mdc/messagebundle_et.properties +2 -0
  134. package/src/sap/ui/mdc/messagebundle_fi.properties +2 -0
  135. package/src/sap/ui/mdc/messagebundle_fr.properties +2 -0
  136. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +2 -0
  137. package/src/sap/ui/mdc/messagebundle_hi.properties +2 -0
  138. package/src/sap/ui/mdc/messagebundle_hr.properties +4 -2
  139. package/src/sap/ui/mdc/messagebundle_hu.properties +2 -0
  140. package/src/sap/ui/mdc/messagebundle_id.properties +2 -0
  141. package/src/sap/ui/mdc/messagebundle_it.properties +2 -0
  142. package/src/sap/ui/mdc/messagebundle_iw.properties +2 -0
  143. package/src/sap/ui/mdc/messagebundle_ja.properties +2 -0
  144. package/src/sap/ui/mdc/messagebundle_kk.properties +18 -16
  145. package/src/sap/ui/mdc/messagebundle_ko.properties +2 -0
  146. package/src/sap/ui/mdc/messagebundle_lt.properties +2 -0
  147. package/src/sap/ui/mdc/messagebundle_lv.properties +2 -0
  148. package/src/sap/ui/mdc/messagebundle_mk.properties +2 -0
  149. package/src/sap/ui/mdc/messagebundle_ms.properties +2 -0
  150. package/src/sap/ui/mdc/messagebundle_nl.properties +2 -0
  151. package/src/sap/ui/mdc/messagebundle_no.properties +2 -0
  152. package/src/sap/ui/mdc/messagebundle_pl.properties +2 -0
  153. package/src/sap/ui/mdc/messagebundle_pt.properties +2 -0
  154. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +2 -0
  155. package/src/sap/ui/mdc/messagebundle_ro.properties +2 -0
  156. package/src/sap/ui/mdc/messagebundle_ru.properties +2 -0
  157. package/src/sap/ui/mdc/messagebundle_sh.properties +2 -0
  158. package/src/sap/ui/mdc/messagebundle_sk.properties +2 -0
  159. package/src/sap/ui/mdc/messagebundle_sl.properties +2 -0
  160. package/src/sap/ui/mdc/messagebundle_sr.properties +2 -0
  161. package/src/sap/ui/mdc/messagebundle_sv.properties +2 -0
  162. package/src/sap/ui/mdc/messagebundle_th.properties +2 -0
  163. package/src/sap/ui/mdc/messagebundle_tr.properties +2 -0
  164. package/src/sap/ui/mdc/messagebundle_uk.properties +2 -0
  165. package/src/sap/ui/mdc/messagebundle_vi.properties +2 -0
  166. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +2 -0
  167. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +2 -0
  168. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  169. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  170. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  171. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  172. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  173. package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
  174. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +12 -39
  175. package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
  176. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  177. package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
  178. package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
  179. package/src/sap/ui/mdc/table/Column.js +14 -13
  180. package/src/sap/ui/mdc/table/ColumnSettings.js +4 -2
  181. package/src/sap/ui/mdc/table/CreationRow.js +7 -3
  182. package/src/sap/ui/mdc/table/DragDropConfig.js +367 -349
  183. package/src/sap/ui/mdc/table/GridTableType.js +70 -42
  184. package/src/sap/ui/mdc/table/{V4AnalyticsPropertyHelper.js → ODataV4PropertyHelper.js} +6 -4
  185. package/src/sap/ui/mdc/table/PropertyHelper.js +10 -13
  186. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +4 -2
  187. package/src/sap/ui/mdc/table/ResponsiveTableType.js +27 -11
  188. package/src/sap/ui/mdc/table/RowActionItem.js +9 -8
  189. package/src/sap/ui/mdc/table/RowSettings.js +19 -19
  190. package/src/sap/ui/mdc/table/TableSettings.js +26 -23
  191. package/src/sap/ui/mdc/table/TableTypeBase.js +2 -1
  192. package/src/sap/ui/mdc/table/{menu → menus}/GroupHeaderRowContextMenu.js +2 -2
  193. package/src/sap/ui/mdc/table/{menu → menus}/QuickActionContainer.js +13 -3
  194. package/src/sap/ui/mdc/table/utils/Personalization.js +2 -2
  195. package/src/sap/ui/mdc/themes/base/Chart.less +30 -27
  196. package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
  197. package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
  198. package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
  199. package/src/sap/ui/mdc/util/InfoBar.js +1 -1
  200. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  201. package/src/sap/ui/mdc/util/PropertyHelper.js +39 -26
  202. package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
  203. package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
  204. package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
  205. package/src/sap/ui/mdc/valuehelp/Popover.js +76 -64
  206. package/src/sap/ui/mdc/valuehelp/RequestShowContainerDefault.js +163 -0
  207. package/src/sap/ui/mdc/valuehelp/base/Container.js +34 -4
  208. package/src/sap/ui/mdc/valuehelp/base/Content.js +26 -3
  209. package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +1 -1
  210. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  211. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
  212. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  213. package/src/sap/ui/mdc/valuehelp/content/Bool.js +63 -46
  214. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
  215. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +145 -17
  216. package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
  217. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +9 -4
  218. package/src/sap/ui/mdc/valuehelp/content/MTable.js +4 -2
  219. package/test/sap/ui/mdc/testutils/opa/Utils.js +9 -2
  220. package/test/sap/ui/mdc/testutils/opa/field/Actions.js +14 -4
  221. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +302 -95
  222. package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +5 -4
  223. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +27 -0
  224. package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +23 -0
  225. package/test/sap/ui/mdc/testutils/opa/filterfield/TestObjects.js +24 -0
  226. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +47 -35
  227. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +3 -2
@@ -9,7 +9,6 @@ sap.ui.define([
9
9
  "sap/ui/test/matchers/Ancestor",
10
10
  "sap/ui/test/matchers/PropertyStrictEquals",
11
11
  "sap/ui/test/actions/Press",
12
- "sap/ui/test/actions/EnterText",
13
12
  "../actions/TriggerEvent",
14
13
  "./Util",
15
14
  "../Utils",
@@ -17,6 +16,8 @@ sap.ui.define([
17
16
  "../p13n/Util",
18
17
  "../p13n/waitForP13nButtonWithMatchers",
19
18
  "../p13n/waitForP13nDialog",
19
+ "../filterfield/Actions",
20
+ "../filterfield/waitForFilterField",
20
21
  "./waitForAdaptFiltersButton"
21
22
  ], function(
22
23
  Opa5,
@@ -25,7 +26,6 @@ sap.ui.define([
25
26
  Ancestor,
26
27
  PropertyStrictEquals,
27
28
  Press,
28
- EnterText,
29
29
  TriggerEvent,
30
30
  FilterBarUtil,
31
31
  Utils,
@@ -33,12 +33,14 @@ sap.ui.define([
33
33
  p13nUtil,
34
34
  waitForP13nButtonWithMatchers,
35
35
  waitForP13nDialog,
36
+ filterfieldActions,
37
+ waitForFilterField,
36
38
  waitForAdaptFiltersButton
37
39
  ) {
38
40
  "use strict";
39
41
 
40
42
 
41
- var iEnterFilterValue = function(oGroupViewItem, mSettings) {
43
+ const iAcitionOnFilter = function (oGroupViewItem, mSettings, fAction) {
42
44
  // Get sap.m.Panel of GroupViewItem
43
45
  this.waitFor({
44
46
  controlType: "sap.m.Panel",
@@ -86,43 +88,10 @@ sap.ui.define([
86
88
  controlType: "sap.ui.mdc.filterbar.p13n.FilterGroupLayout",
87
89
  id: sLabelFor,
88
90
  success: function(oFilterGroupLayout) {
89
- this.waitFor({
90
- controlType: "sap.ui.mdc.FilterField",
91
- matchers: function(oFilterField) {
92
- if (mSettings[oToolbarLabel.getText()]) {
93
- return oFilterField === oFilterGroupLayout._oFilterField;
94
- }
95
- return false;
96
- },
97
- actions: function (oFilterField) {
98
- var oSettings = mSettings[oToolbarLabel.getText()];
99
- if (oSettings.label === oFilterFieldLabel.getText()) {
100
- if (oSettings.values && Array.isArray(oSettings.values)) {
101
- oSettings.values.forEach(function(oValue) {
102
- this.waitFor({
103
- controlType: "sap.ui.mdc.field.FieldMultiInput",
104
- matchers: new Ancestor(oFilterField),
105
- actions: new EnterText({
106
- text: oValue,
107
- clearTextFirst: false,
108
- pressEnterKey: false
109
- })
110
- });
111
- }.bind(this));
112
- } else {
113
- this.waitFor({
114
- controlType: "sap.ui.mdc.field.FieldInput",
115
- matchers: new Ancestor(oFilterField),
116
- actions: new EnterText({
117
- text: oSettings.values,
118
- clearTextFirst: false,
119
- pressEnterKey: false
120
- })
121
- });
122
- }
123
- }
124
- }.bind(this)
125
- });
91
+ var oSettings = mSettings[oToolbarLabel.getText()];
92
+ if (oSettings.label === oFilterFieldLabel.getText()) {
93
+ fAction.call(this, oToolbarLabel, oFilterGroupLayout, oSettings);
94
+ }
126
95
  }
127
96
  });
128
97
  }
@@ -147,6 +116,241 @@ sap.ui.define([
147
116
  });
148
117
  };
149
118
 
119
+ const fActionOnDialog = function (oActions, oFilterBar, mSettings, fAction) {
120
+ var sIcon = p13nUtil.icons.group;
121
+ return oActions.iOpenThePersonalizationDialog.call(this, oFilterBar, {
122
+ success: function(oP13nDialog) {
123
+ this.waitFor({
124
+ controlType: "sap.m.Button",
125
+ matchers: [
126
+ new Ancestor(oP13nDialog, false),
127
+ new PropertyStrictEquals({
128
+ name: "icon",
129
+ value: sIcon
130
+ })
131
+ ],
132
+ actions: new Press(),
133
+ success: function() {
134
+ this.waitFor({
135
+ controlType: "sap.ui.mdc.p13n.panels.GroupView",
136
+ matchers: new Ancestor(oP13nDialog, false),
137
+ success: function(aGroupViews) {
138
+ var oGroupView = aGroupViews[0];
139
+ this.waitFor({
140
+ controlType: "sap.m.VBox",
141
+ matchers: new Ancestor(oGroupView, true),
142
+ success: function(aVBoxes) {
143
+ var oVBox = aVBoxes[0];
144
+ this.waitFor({
145
+ controlType: "sap.m.List",
146
+ matchers: new Ancestor(oVBox, true),
147
+ success: function(aLists) {
148
+ var oList = aLists[0];
149
+ this.waitFor({
150
+ controlType: "sap.m.CustomListItem",
151
+ matchers: function(oCustomListItem) {
152
+ var bAncestor = new Ancestor(oList, true)(oCustomListItem);
153
+
154
+ return bAncestor && Object.keys(mSettings).includes(oCustomListItem.getContent()[0].getHeaderToolbar().getContent()[0].getText());
155
+ },
156
+ actions: function(oGroupViewItem) {
157
+ fAction.call(this, oGroupViewItem, mSettings);
158
+ }.bind(this),
159
+ success: function() {
160
+ p13nActions.iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
161
+ }
162
+ });
163
+ }
164
+ });
165
+ }
166
+ });
167
+ }
168
+ });
169
+ },
170
+ errorMessage: "No button with icon '" + sIcon + "' found on P13nDialog"
171
+ });
172
+ }
173
+ });
174
+ };
175
+
176
+ var iEnterFilterValue = function(oGroupViewItem, mSettings) {
177
+ iAcitionOnFilter.call(this, oGroupViewItem, mSettings,
178
+ (oToolbarLabel, oFilterGroupLayout, oSettings) => {
179
+ let aValues;
180
+ if (oSettings.values && Array.isArray(oSettings.values)) {
181
+ aValues = oSettings.values;
182
+ } else {
183
+ aValues = [oSettings.values];
184
+ }
185
+
186
+ aValues.forEach((sValue) => {
187
+ filterfieldActions.iEnterTextOnTheFilterField.call(this,
188
+ {
189
+ matchers: (oFilterField) => {
190
+ if (mSettings[oToolbarLabel.getText()]) {
191
+ return oFilterField === oFilterGroupLayout._oFilterField;
192
+ }
193
+ return false;
194
+ }
195
+ },
196
+ sValue,
197
+ {clearTextFirst: false, pressEnterKey: false}
198
+ );
199
+ });
200
+ }
201
+ );
202
+ // // Get sap.m.Panel of GroupViewItem
203
+ // this.waitFor({
204
+ // controlType: "sap.m.Panel",
205
+ // matchers: new Ancestor(oGroupViewItem, true),
206
+ // success: function(aPanels) {
207
+ // var oGroupPanel = aPanels[0];
208
+ // // Get the expand button for the panel
209
+ // this.waitFor({
210
+ // controlType: "sap.m.Button",
211
+ // matchers: new Ancestor(oGroupPanel, true),
212
+ // success: function(aButtons) {
213
+ // var oButton = aButtons[0];
214
+ // // click on expand button
215
+ // if (!oGroupPanel.getExpanded()) {
216
+ // new Press().executeOn(oButton);
217
+ // }
218
+ // this.waitFor({
219
+ // controlType: "sap.m.Toolbar",
220
+ // matchers: new Ancestor(oGroupPanel, true),
221
+ // success: function(aToolbars) {
222
+ // var oToolbar = aToolbars[0];
223
+ // // Get label of the GroupViewItem
224
+ // this.waitFor({
225
+ // controlType: "sap.m.Title",
226
+ // matchers: new Ancestor(oToolbar, true),
227
+ // success: function(aToolbarLabels) {
228
+ // var oToolbarLabel = aToolbarLabels[0];
229
+ // this.waitFor({
230
+ // controlType: "sap.m.List",
231
+ // matchers: new Ancestor(oGroupPanel, true),
232
+ // success: function(aLists) {
233
+ // var oList = aLists[0];
234
+ // // Get CustomListItems inside the GroupViewItem panel
235
+ // this.waitFor({
236
+ // controlType: "sap.m.CustomListItem",
237
+ // matchers: new Ancestor(oList, true),
238
+ // actions: function(oFilterItem) {
239
+ // this.waitFor({
240
+ // controlType: "sap.m.Label",
241
+ // matchers: new Ancestor(oFilterItem, false),
242
+ // success: function(aFilterFieldLabels) {
243
+ // var oFilterFieldLabel = aFilterFieldLabels[0];
244
+ // var sLabelFor = oFilterFieldLabel.getLabelFor();
245
+ // this.waitFor({
246
+ // controlType: "sap.ui.mdc.filterbar.p13n.FilterGroupLayout",
247
+ // id: sLabelFor,
248
+ // success: function(oFilterGroupLayout) {
249
+ // var oSettings = mSettings[oToolbarLabel.getText()];
250
+ // if (oSettings.label === oFilterFieldLabel.getText()) {
251
+ // // TODO: MultiValue case?
252
+ // filterfieldActions.iEnterTextOnTheFilterField.call(this,
253
+ // {
254
+ // matchers: function(oFilterField) {
255
+ // if (mSettings[oToolbarLabel.getText()]) {
256
+ // return oFilterField === oFilterGroupLayout._oFilterField;
257
+ // }
258
+ // return false;
259
+ // }
260
+ // },
261
+ // oSettings.values,
262
+ // {clearTextFirst: false, pressEnterKey: false}
263
+ // );
264
+ // }
265
+
266
+ // // waitForFilterField.call(this, {
267
+ // // matchers: function(oFilterField) {
268
+ // // if (mSettings[oToolbarLabel.getText()]) {
269
+ // // return oFilterField === oFilterGroupLayout._oFilterField;
270
+ // // }
271
+ // // return false;
272
+ // // },
273
+ // // actions: function (oFilterField) {
274
+ // // var oSettings = mSettings[oToolbarLabel.getText()];
275
+ // // if (oSettings.label === oFilterFieldLabel.getText()) {
276
+ // // if (oSettings.values && Array.isArray(oSettings.values)) {
277
+ // // oSettings.values.forEach(function(oValue) {
278
+ // // this.waitFor({
279
+ // // controlType: "sap.ui.mdc.field.FieldMultiInput",
280
+ // // matchers: new Ancestor(oFilterField),
281
+ // // actions: new EnterText({
282
+ // // text: oValue,
283
+ // // clearTextFirst: false,
284
+ // // pressEnterKey: false
285
+ // // })
286
+ // // });
287
+ // // }.bind(this));
288
+ // // } else if (oFilterField.getDataType().indexOf("Boolean") >= 0) {
289
+ // // this.waitFor({
290
+ // // controlType: "sap.ui.mdc.field.FieldSelect",
291
+ // // matchers: new Ancestor(oFilterField),
292
+ // // actions: new EnterText({
293
+ // // text: oSettings.values,
294
+ // // clearTextFirst: false,
295
+ // // pressEnterKey: false
296
+ // // })
297
+ // // });
298
+ // // } else {
299
+ // // this.waitFor({
300
+ // // controlType: "sap.ui.mdc.field.FieldInput",
301
+ // // matchers: new Ancestor(oFilterField),
302
+ // // actions: new EnterText({
303
+ // // text: oSettings.values,
304
+ // // clearTextFirst: false,
305
+ // // pressEnterKey: false
306
+ // // })
307
+ // // });
308
+ // // }
309
+ // // }
310
+ // // }.bind(this)
311
+ // // });
312
+ // }
313
+ // });
314
+ // }
315
+ // });
316
+ // }.bind(this),
317
+ // // close group panel
318
+ // success: function() {
319
+ // if (oGroupPanel.getExpanded()) {
320
+ // new Press().executeOn(oButton);
321
+ // }
322
+ // }
323
+ // });
324
+ // }
325
+ // });
326
+ // }
327
+ // });
328
+ // }
329
+ // });
330
+ // }
331
+ // });
332
+ // }
333
+ // });
334
+ };
335
+
336
+ var iNavigateOnTheFilter = function(oGroupViewItem, mSettings) {
337
+ iAcitionOnFilter.call(this, oGroupViewItem, mSettings,
338
+ (oToolbarLabel, oFilterGroupLayout, oSettings) => {
339
+ filterfieldActions.iNavigateOnTheFilterField.call(this,
340
+ {
341
+ matchers: function(oFilterField) {
342
+ if (mSettings[oToolbarLabel.getText()]) {
343
+ return oFilterField === oFilterGroupLayout._oFilterField;
344
+ }
345
+ return false;
346
+ }
347
+ },
348
+ oSettings.keyCode
349
+ );
350
+ }
351
+ );
352
+ };
353
+
150
354
  var oActions = {
151
355
  iOpenThePersonalizationDialog: function(oControl, oSettings) {
152
356
  var sControlId = typeof oControl === "string" ? oControl : oControl.getId();
@@ -214,68 +418,71 @@ sap.ui.define([
214
418
  });
215
419
  },
216
420
  iEnterFilterValue: function(oFilterBar, mSettings) {
217
- var sIcon = p13nUtil.icons.group;
218
- return oActions.iOpenThePersonalizationDialog.call(this, oFilterBar, {
219
- success: function(oP13nDialog) {
220
- this.waitFor({
221
- controlType: "sap.m.Button",
222
- matchers: [
223
- new Ancestor(oP13nDialog, false),
224
- new PropertyStrictEquals({
225
- name: "icon",
226
- value: sIcon
227
- })
228
- ],
229
- actions: new Press(),
230
- success: function() {
231
- this.waitFor({
232
- controlType: "sap.ui.mdc.p13n.panels.GroupView",
233
- matchers: new Ancestor(oP13nDialog, false),
234
- success: function(aGroupViews) {
235
- var oGroupView = aGroupViews[0];
236
- this.waitFor({
237
- controlType: "sap.m.VBox",
238
- matchers: new Ancestor(oGroupView, true),
239
- success: function(aVBoxes) {
240
- var oVBox = aVBoxes[0];
241
- this.waitFor({
242
- controlType: "sap.m.List",
243
- matchers: new Ancestor(oVBox, true),
244
- success: function(aLists) {
245
- var oList = aLists[0];
246
- this.waitFor({
247
- controlType: "sap.m.CustomListItem",
248
- matchers: function(oCustomListItem) {
249
- var bAncestor = new Ancestor(oList, true)(oCustomListItem);
421
+ return fActionOnDialog.call(this, oActions, oFilterBar, mSettings, iEnterFilterValue);
422
+ // var sIcon = p13nUtil.icons.group;
423
+ // return oActions.iOpenThePersonalizationDialog.call(this, oFilterBar, {
424
+ // success: function(oP13nDialog) {
425
+ // this.waitFor({
426
+ // controlType: "sap.m.Button",
427
+ // matchers: [
428
+ // new Ancestor(oP13nDialog, false),
429
+ // new PropertyStrictEquals({
430
+ // name: "icon",
431
+ // value: sIcon
432
+ // })
433
+ // ],
434
+ // actions: new Press(),
435
+ // success: function() {
436
+ // this.waitFor({
437
+ // controlType: "sap.ui.mdc.p13n.panels.GroupView",
438
+ // matchers: new Ancestor(oP13nDialog, false),
439
+ // success: function(aGroupViews) {
440
+ // var oGroupView = aGroupViews[0];
441
+ // this.waitFor({
442
+ // controlType: "sap.m.VBox",
443
+ // matchers: new Ancestor(oGroupView, true),
444
+ // success: function(aVBoxes) {
445
+ // var oVBox = aVBoxes[0];
446
+ // this.waitFor({
447
+ // controlType: "sap.m.List",
448
+ // matchers: new Ancestor(oVBox, true),
449
+ // success: function(aLists) {
450
+ // var oList = aLists[0];
451
+ // this.waitFor({
452
+ // controlType: "sap.m.CustomListItem",
453
+ // matchers: function(oCustomListItem) {
454
+ // var bAncestor = new Ancestor(oList, true)(oCustomListItem);
250
455
 
251
- return bAncestor && Object.keys(mSettings).includes(oCustomListItem.getContent()[0].getHeaderToolbar().getContent()[0].getText());
252
- },
253
- actions: function(oGroupViewItem) {
254
- iEnterFilterValue.call(this, oGroupViewItem, mSettings);
255
- }.bind(this),
256
- success: function() {
257
- p13nActions.iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
258
- }
259
- });
260
- }
261
- });
262
- }
263
- });
264
- }
265
- });
266
- },
267
- errorMessage: "No button with icon '" + sIcon + "' found on P13nDialog"
268
- });
269
- }
270
- });
456
+ // return bAncestor && Object.keys(mSettings).includes(oCustomListItem.getContent()[0].getHeaderToolbar().getContent()[0].getText());
457
+ // },
458
+ // actions: function(oGroupViewItem) {
459
+ // iEnterFilterValue.call(this, oGroupViewItem, mSettings);
460
+ // }.bind(this),
461
+ // success: function() {
462
+ // p13nActions.iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
463
+ // }
464
+ // });
465
+ // }
466
+ // });
467
+ // }
468
+ // });
469
+ // }
470
+ // });
471
+ // },
472
+ // errorMessage: "No button with icon '" + sIcon + "' found on P13nDialog"
473
+ // });
474
+ // }
475
+ // });
476
+ },
477
+ iNavigateOnTheFilter: function(oFilterBar, mSettings) {
478
+ return fActionOnDialog.call(this, oActions, oFilterBar, mSettings, iNavigateOnTheFilter);
271
479
  },
272
480
  iClearFilterValue: function(oFilterBar, sFilterLabel) {
273
481
  var sFilterBarId = typeof oFilterBar === "string" ? oFilterBar : oFilterBar.getId();
274
482
  return this.waitFor({
275
483
  id: sFilterBarId,
276
484
  success: function(oFilterBarInstance) {
277
- this.waitFor({
278
- controlType: "sap.ui.mdc.FilterField",
485
+ waitForFilterField.call(this, {
279
486
  matchers: [
280
487
  new PropertyStrictEquals({
281
488
  name: "label",
@@ -10,6 +10,7 @@ sap.ui.define([
10
10
  "sap/ui/test/matchers/PropertyStrictEquals",
11
11
  "./waitForFilterBar",
12
12
  "./waitForAdaptFiltersButton",
13
+ "../filterfield/waitForFilterField",
13
14
  "../Utils"
14
15
  ], function(
15
16
  Opa5,
@@ -19,6 +20,7 @@ sap.ui.define([
19
20
  PropertyStrictEquals,
20
21
  waitForFilterBar,
21
22
  waitForAdaptFiltersButton,
23
+ waitForFilterField,
22
24
  Utils
23
25
  ) {
24
26
  "use strict";
@@ -61,11 +63,10 @@ sap.ui.define([
61
63
  }
62
64
 
63
65
 
64
- this.waitFor({
65
- controlType: "sap.ui.mdc.FilterField",
66
+ waitForFilterField.call(this, {
66
67
  matchers: vMatchers,
67
- success: function(aFilterFields) {
68
- Opa5.assert.ok(aFilterFields.length === 1, "The FilterField labeled as '" + sLabel + "' found");
68
+ success: function(oFilterField) {
69
+ Opa5.assert.ok(!!oFilterField, "The FilterField labeled as '" + sLabel + "' found");
69
70
  }
70
71
  });
71
72
  };
@@ -107,6 +107,33 @@ sap.ui.define([
107
107
  iEnterFilterValue: function(oFilterBar, mSettings) {
108
108
  return filterBarActions.iEnterFilterValue.call(this, oFilterBar, mSettings);
109
109
  },
110
+ /**
111
+ * OPA5 test action
112
+ * <ol>
113
+ * <li>
114
+ * Opens the personalization dialog of the given <code>sap.ui.mdc.FilterBar</code>.
115
+ * </li>
116
+ * <li>
117
+ * Navigates to the Group tab.
118
+ * </li>
119
+ * <li>
120
+ * Opens the given groups and presses a key on the <code>FilterFields</code> depending on <code>mSettings</code>.
121
+ * </li>
122
+ * <li>
123
+ * Closes the personalization dialog.
124
+ * </li>
125
+ * </ol>
126
+ * @memberof onTheMDCFilterBar
127
+ * @method iNavigateOnTheFilter
128
+ * @param {sap.ui.core.Control | string} oFilterBar Instance / ID of the <code>sap.ui.mdc.FilterBar</code>
129
+ * @param {Object} mSettings Map containing the settings for the filter values. Key is the label of the given group in the <code>sap.ui.mdc.FilterBar</code> personalization dialog, and value is an object containing the label of the <code>FilterField</code> and the keyCode that is pressed.
130
+ * The allowed key codes are {@link sap.ui.mdc.field.NavigationKeys}.
131
+ * @returns {Promise} OPA waitFor
132
+ * @since 1.138
133
+ */
134
+ iNavigateOnTheFilter: function(oFilterBar, mSettings) {
135
+ return filterBarActions.iNavigateOnTheFilter.call(this, oFilterBar, mSettings);
136
+ },
110
137
  /**
111
138
  * OPA5 test action
112
139
  * Clears all values of a <code>FilterField</code> with a given label on the <code>sap.ui.mdc.FilterBar</code>.
@@ -55,6 +55,29 @@ sap.ui.define([
55
55
  },
56
56
  iOpenTheValueHelpForFilterField: function (vIdentifier) {
57
57
  return oActions.iPressKeyOnTheFilterField.call(this, vIdentifier, KeyCodes.F4);
58
+ },
59
+
60
+ iNavigateOnTheFilterField: function(vIdentifier, keyCode) { // TODO: use key code or some step to define arrow key, pageUp....
61
+ return waitForFilterField.call(this, Utils.enhanceWaitFor(vIdentifier, {
62
+ actions: (oFilterField) => {
63
+ oFilterField._oOldNavigateCondition = oFilterField._oNavigateCondition;
64
+ oFilterField.focus();
65
+ new TriggerEvent({event: "keydown", payload: {which: keyCode, keyCode: keyCode}}).executeOn(oFilterField.getCurrentContent()[0]); // doesnt work with focusdomref
66
+ },
67
+ success: (oFilterField) => {
68
+ waitForFilterField.call(this, Utils.enhanceWaitFor(oFilterField.getId(), {
69
+ matchers: (oFilterField) => {
70
+ if (oFilterField._oOldNavigateCondition !== oFilterField._oNavigateCondition) { // TODO: what about if end reached?
71
+ return true;
72
+ }
73
+ return false;
74
+ },
75
+ success:(oFilterField) => {
76
+ Opa5.assert.ok(oFilterField, "Keyboard navigation on Field '" + oFilterField.getId() + "' executed.");
77
+ }
78
+ }));
79
+ }
80
+ }));
58
81
  }
59
82
  };
60
83
 
@@ -12,6 +12,17 @@ sap.ui.define([
12
12
  ) {
13
13
  "use strict";
14
14
 
15
+ /**
16
+ * Allowd keys for keyboard navigation in {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}, and {@link sap.ui.mdc.FilterField FilterField}
17
+ *
18
+ * @static
19
+ * @constant
20
+ * @typedef {int} sap.ui.mdc.field.NavigationKeys Only the following keys of {@link sap.ui.events.KeyCodes} are allowed:
21
+ * <code>ARROW_DOWN</code>, <code>ARROW_UP</code>, <code>HOME</code>, <code>END</code>, <code>PAGE_DOWN</code> and <code>PAGE_UP</code>
22
+ * @public
23
+ * @since 1.138
24
+ */
25
+
15
26
  /**
16
27
  * @namespace onTheMDCFilterField
17
28
  */
@@ -30,6 +41,19 @@ sap.ui.define([
30
41
  iEnterTextOnTheFilterField: function(vIdentifier, sValue, oConfig) {
31
42
  return fieldActions.iEnterTextOnTheFilterField.call(this, vIdentifier, sValue, oConfig);
32
43
  },
44
+ /**
45
+ * OPA5 test action
46
+ * @memberof onTheMDCFilterField
47
+ * @method iNavigateOnTheFilterField
48
+ * @param {string | Object} vIdentifier ID or a plain object providing properties identifying of the given <code>sap.ui.mdc.FilterField</code>
49
+ * @param {sap.ui.mdc.field.NavigationKeys} iKeyCode Key code that is pressed on the <code>sap.ui.mdc.FilterField</code>
50
+ * @param {Object} [oConfig] Configuration object
51
+ * @returns {Promise} OPA waitFor
52
+ * @since 1.138
53
+ */
54
+ iNavigateOnTheFilterField: function(vIdentifier, iKeyCode, oConfig) {
55
+ return fieldActions.iNavigateOnTheFilterField.call(this, vIdentifier, iKeyCode, oConfig);
56
+ },
33
57
  /**
34
58
  * OPA5 test action
35
59
  * @memberof onTheMDCFilterField