@openui5/sap.ui.core 1.121.1 → 1.122.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 (604) hide show
  1. package/.eslintrc.json +22 -5
  2. package/THIRDPARTY.txt +1 -1
  3. package/package.json +1 -1
  4. package/src/jquery.sap.global.js +1 -1
  5. package/src/jquery.sap.properties.js +1 -1
  6. package/src/jquery.sap.resources.js +1 -1
  7. package/src/jquery.sap.script.js +1 -1
  8. package/src/jquery.sap.sjax.js +6 -5
  9. package/src/jquery.sap.storage.js +3 -3
  10. package/src/sap/base/Event.js +1 -1
  11. package/src/sap/base/Eventing.js +1 -1
  12. package/src/sap/base/config.js +1 -1
  13. package/src/sap/base/i18n/Formatting.js +1 -1
  14. package/src/sap/base/i18n/LanguageTag.js +1 -1
  15. package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
  16. package/src/sap/base/util/Deferred.js +4 -6
  17. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  18. package/src/sap/base/util/restricted/_castArray.js +1 -1
  19. package/src/sap/base/util/restricted/_compact.js +1 -1
  20. package/src/sap/base/util/restricted/_curry.js +1 -1
  21. package/src/sap/base/util/restricted/_debounce.js +1 -1
  22. package/src/sap/base/util/restricted/_difference.js +1 -1
  23. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  24. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  25. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  26. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  27. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  28. package/src/sap/base/util/restricted/_flatten.js +1 -1
  29. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  30. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  31. package/src/sap/base/util/restricted/_intersection.js +1 -1
  32. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  33. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  34. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  35. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  36. package/src/sap/base/util/restricted/_isNil.js +1 -1
  37. package/src/sap/base/util/restricted/_max.js +1 -1
  38. package/src/sap/base/util/restricted/_merge.js +1 -1
  39. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  40. package/src/sap/base/util/restricted/_min.js +1 -1
  41. package/src/sap/base/util/restricted/_omit.js +1 -1
  42. package/src/sap/base/util/restricted/_pick.js +1 -1
  43. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  44. package/src/sap/base/util/restricted/_throttle.js +1 -1
  45. package/src/sap/base/util/restricted/_toArray.js +1 -1
  46. package/src/sap/base/util/restricted/_union.js +1 -1
  47. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  48. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  49. package/src/sap/base/util/restricted/_uniq.js +1 -1
  50. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  51. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  52. package/src/sap/base/util/restricted/_without.js +1 -1
  53. package/src/sap/base/util/restricted/_xor.js +1 -1
  54. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  55. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  56. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  57. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  58. package/src/sap/ui/Device.js +3 -3
  59. package/src/sap/ui/Global.js +4 -4
  60. package/src/sap/ui/base/Event.js +1 -1
  61. package/src/sap/ui/base/EventProvider.js +11 -5
  62. package/src/sap/ui/base/Exception.js +1 -1
  63. package/src/sap/ui/base/Interface.js +1 -1
  64. package/src/sap/ui/base/ManagedObject.js +22 -3
  65. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  66. package/src/sap/ui/base/Metadata.js +1 -1
  67. package/src/sap/ui/base/Object.js +1 -1
  68. package/src/sap/ui/base/ObjectPool.js +1 -1
  69. package/src/sap/ui/core/.library +1 -1
  70. package/src/sap/ui/core/BusyIndicator.js +1 -1
  71. package/src/sap/ui/core/Component.js +33 -5
  72. package/src/sap/ui/core/ComponentContainer.js +1 -1
  73. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  74. package/src/sap/ui/core/ComponentSupport.js +1 -1
  75. package/src/sap/ui/core/Configuration.js +1 -1
  76. package/src/sap/ui/core/Control.js +19 -3
  77. package/src/sap/ui/core/Core.js +1 -1
  78. package/src/sap/ui/core/CustomData.js +1 -1
  79. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  80. package/src/sap/ui/core/Element.js +28 -3
  81. package/src/sap/ui/core/ElementMetadata.js +1 -1
  82. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  83. package/src/sap/ui/core/EventBus.js +1 -1
  84. package/src/sap/ui/core/Fragment.js +1 -1
  85. package/src/sap/ui/core/HTML.js +1 -1
  86. package/src/sap/ui/core/History.js +1 -1
  87. package/src/sap/ui/core/Icon.js +1 -1
  88. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  89. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  90. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  91. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  92. package/src/sap/ui/core/InvisibleText.js +1 -1
  93. package/src/sap/ui/core/Item.js +1 -1
  94. package/src/sap/ui/core/LabelEnablement.js +1 -1
  95. package/src/sap/ui/core/LayoutData.js +1 -1
  96. package/src/sap/ui/core/ListItem.js +1 -1
  97. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  98. package/src/sap/ui/core/Locale.js +1 -1
  99. package/src/sap/ui/core/LocaleData.js +14 -6
  100. package/src/sap/ui/core/Manifest.js +1 -1
  101. package/src/sap/ui/core/Message.js +1 -1
  102. package/src/sap/ui/core/RenderManager.js +1 -1
  103. package/src/sap/ui/core/Renderer.js +1 -1
  104. package/src/sap/ui/core/ResizeHandler.js +1 -1
  105. package/src/sap/ui/core/ScrollBar.js +1 -1
  106. package/src/sap/ui/core/SeparatorItem.js +1 -1
  107. package/src/sap/ui/core/Title.js +1 -1
  108. package/src/sap/ui/core/TooltipBase.js +1 -1
  109. package/src/sap/ui/core/UIArea.js +1 -1
  110. package/src/sap/ui/core/UIComponent.js +1 -1
  111. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  112. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  113. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  114. package/src/sap/ui/core/XMLComposite.js +1 -1
  115. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  116. package/src/sap/ui/core/date/UI5Date.js +1 -1
  117. package/src/sap/ui/core/date/UniversalDateUtils.js +52 -52
  118. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  119. package/src/sap/ui/core/delegate/ScrollEnablement.js +4 -4
  120. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  121. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  122. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  123. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  124. package/src/sap/ui/core/format/DateFormat.js +4 -4
  125. package/src/sap/ui/core/format/FormatUtils.js +1 -1
  126. package/src/sap/ui/core/format/NumberFormat.js +32 -13
  127. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  128. package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
  129. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  130. package/src/sap/ui/core/library.js +3 -3
  131. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  132. package/src/sap/ui/core/message/Message.js +1 -1
  133. package/src/sap/ui/core/message/MessageManager.js +1 -1
  134. package/src/sap/ui/core/message/MessageParser.js +1 -1
  135. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  136. package/src/sap/ui/core/messagebundle_ar.properties +1 -1
  137. package/src/sap/ui/core/messagebundle_mk.properties +1 -1
  138. package/src/sap/ui/core/mvc/Controller.js +42 -7
  139. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  140. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  141. package/src/sap/ui/core/mvc/JSView.js +1 -1
  142. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  143. package/src/sap/ui/core/mvc/View.js +1 -1
  144. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  145. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  146. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  147. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  148. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  149. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  150. package/src/sap/ui/core/routing/Router.js +1 -1
  151. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  152. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  153. package/src/sap/ui/core/service/Service.js +1 -1
  154. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  155. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  156. package/src/sap/ui/core/support/Plugin.js +1 -1
  157. package/src/sap/ui/core/support/Support.js +1 -1
  158. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  159. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  160. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  161. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  162. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  163. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  164. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  165. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  166. package/src/sap/ui/core/themes/base/base.less +239 -8
  167. package/src/sap/ui/core/themes/base/global.less +20 -0
  168. package/src/sap/ui/core/themes/sap_hcb/global.less +20 -0
  169. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  170. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  171. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  172. package/src/sap/ui/core/tmpl/Template.js +1 -1
  173. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  174. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  175. package/src/sap/ui/core/util/Export.js +1 -1
  176. package/src/sap/ui/core/util/ExportCell.js +1 -1
  177. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  178. package/src/sap/ui/core/util/ExportRow.js +1 -1
  179. package/src/sap/ui/core/util/ExportType.js +1 -1
  180. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  181. package/src/sap/ui/core/util/File.js +1 -1
  182. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  183. package/src/sap/ui/core/util/MockServer.js +1 -1
  184. package/src/sap/ui/core/util/PasteHelper.js +2 -2
  185. package/src/sap/ui/core/util/ShortcutHelper.js +6 -0
  186. package/src/sap/ui/core/util/XMLPreprocessor.js +54 -30
  187. package/src/sap/ui/core/util/_LocalizationHelper.js +2 -1
  188. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +0 -29
  189. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +0 -26
  190. package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +0 -56
  191. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  192. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  193. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  194. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  195. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  196. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  197. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  198. package/src/sap/ui/core/webc/WebComponent.js +1 -1
  199. package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
  200. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  201. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  202. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  203. package/src/sap/ui/debug/ControlTree.js +1 -1
  204. package/src/sap/ui/debug/DebugEnv.js +1 -1
  205. package/src/sap/ui/debug/PropertyList.js +1 -1
  206. package/src/sap/ui/model/ClientListBinding.js +13 -6
  207. package/src/sap/ui/model/ClientModel.js +1 -1
  208. package/src/sap/ui/model/ClientTreeBinding.js +16 -7
  209. package/src/sap/ui/model/CompositeBinding.js +11 -4
  210. package/src/sap/ui/model/CompositeDataState.js +1 -1
  211. package/src/sap/ui/model/CompositeType.js +17 -3
  212. package/src/sap/ui/model/DataState.js +1 -1
  213. package/src/sap/ui/model/ListBinding.js +14 -11
  214. package/src/sap/ui/model/MetaModel.js +1 -1
  215. package/src/sap/ui/model/Model.js +11 -9
  216. package/src/sap/ui/model/PropertyBinding.js +21 -4
  217. package/src/sap/ui/model/SelectionModel.js +1 -1
  218. package/src/sap/ui/model/SimpleType.js +1 -1
  219. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  220. package/src/sap/ui/model/TreeBinding.js +14 -7
  221. package/src/sap/ui/model/Type.js +1 -1
  222. package/src/sap/ui/model/analytics/AnalyticalBinding.js +12 -8
  223. package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
  224. package/src/sap/ui/model/analytics/odata4analytics.js +66 -52
  225. package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +1 -4
  226. package/src/sap/ui/model/json/JSONListBinding.js +5 -2
  227. package/src/sap/ui/model/json/JSONModel.js +7 -5
  228. package/src/sap/ui/model/json/JSONTreeBinding.js +5 -2
  229. package/src/sap/ui/model/message/MessageListBinding.js +5 -2
  230. package/src/sap/ui/model/message/MessageModel.js +1 -1
  231. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  232. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  233. package/src/sap/ui/model/odata/ODataMetaModel.js +8 -9
  234. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  235. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  236. package/src/sap/ui/model/odata/ODataUtils.js +1 -1
  237. package/src/sap/ui/model/odata/type/Boolean.js +2 -4
  238. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  239. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  240. package/src/sap/ui/model/odata/type/Date.js +1 -1
  241. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  242. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  243. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  244. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  245. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  246. package/src/sap/ui/model/odata/type/Double.js +1 -1
  247. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  248. package/src/sap/ui/model/odata/type/Int.js +1 -1
  249. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  250. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  251. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  252. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  253. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  254. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  255. package/src/sap/ui/model/odata/type/Single.js +1 -1
  256. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  257. package/src/sap/ui/model/odata/type/String.js +1 -1
  258. package/src/sap/ui/model/odata/type/Time.js +1 -1
  259. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  260. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  261. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  262. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +2 -2
  263. package/src/sap/ui/model/odata/v2/ODataListBinding.js +14 -8
  264. package/src/sap/ui/model/odata/v2/ODataModel.js +25 -28
  265. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +15 -12
  266. package/src/sap/ui/model/odata/v4/Context.js +111 -30
  267. package/src/sap/ui/model/odata/v4/ODataBinding.js +9 -5
  268. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
  269. package/src/sap/ui/model/odata/v4/ODataListBinding.js +14 -9
  270. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -3
  271. package/src/sap/ui/model/odata/v4/ODataModel.js +27 -2
  272. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +19 -7
  273. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +240 -41
  274. package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +88 -0
  275. package/src/sap/ui/model/odata/v4/lib/_Cache.js +13 -4
  276. package/src/sap/ui/model/odata/v4/lib/_Helper.js +15 -0
  277. package/src/sap/ui/model/odata/v4/lib/_TreeState.js +77 -15
  278. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  279. package/src/sap/ui/model/type/Boolean.js +1 -1
  280. package/src/sap/ui/model/type/Currency.js +1 -1
  281. package/src/sap/ui/model/type/Date.js +1 -1
  282. package/src/sap/ui/model/type/DateInterval.js +1 -1
  283. package/src/sap/ui/model/type/DateTime.js +1 -1
  284. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  285. package/src/sap/ui/model/type/FileSize.js +1 -1
  286. package/src/sap/ui/model/type/Float.js +1 -1
  287. package/src/sap/ui/model/type/Integer.js +1 -1
  288. package/src/sap/ui/model/type/String.js +1 -1
  289. package/src/sap/ui/model/type/Time.js +1 -1
  290. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  291. package/src/sap/ui/model/type/Unit.js +38 -1
  292. package/src/sap/ui/model/xml/XMLListBinding.js +5 -2
  293. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  294. package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -1
  295. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  296. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  297. package/src/sap/ui/test/RecordReplay.js +1 -0
  298. package/src/sap/ui/test/autowaiter/_autoWaiterAsync.js +8 -1
  299. package/src/sap/ui/test/generic/TestBase.js +1 -1
  300. package/src/sap/ui/test/gherkin/opa5TestHarness.js +0 -6
  301. package/src/sap/ui/test/gherkin/qUnitTestHarness.js +0 -6
  302. package/src/sap/ui/test/qunitPause.js +5 -1
  303. package/src/sap/ui/util/Storage.js +1 -1
  304. package/src/sap/ui/util/_enforceNoReturnValue.js +26 -0
  305. package/src/ui5loader.js +25 -2
  306. package/test/sap/ui/core/HyphenationPlayground.html +6 -292
  307. package/test/sap/ui/core/HyphenationPlayground.js +313 -0
  308. package/test/sap/ui/core/demokit/docuindex.json +1 -1
  309. package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
  310. package/test/sap/ui/core/demokit/sample/OpaAutoWaitParams/OpaAutoWaitParams.html +1 -1
  311. package/test/sap/ui/core/demokit/sample/OpaAutoWaitParams/applicationUnderTest/index.html +1 -2
  312. package/test/sap/ui/core/demokit/sample/OpaStartup/iStartMyAppInAFrame/README.js +31 -23
  313. package/test/sap/ui/core/demokit/sample/OpaStartup/iStartMyAppInAFrame/iStartMyAppInAFrame.js +103 -94
  314. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithOPA5/GherkinTestRunner.html +3 -0
  315. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithOPA5/GherkinTestRunner.js +1 -5
  316. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithPageObjects/GherkinTestRunner.html +3 -0
  317. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithPageObjects/GherkinTestRunner.js +1 -5
  318. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithQUnit/GherkinTestRunner.html +3 -0
  319. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithQUnit/GherkinTestRunner.js +1 -5
  320. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithQUnit/Steps.js +5 -5
  321. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithUIComponent/GherkinTestRunner.html +3 -0
  322. package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithUIComponent/GherkinTestRunner.js +1 -5
  323. package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
  324. package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
  325. package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
  326. package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
  327. package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.controller.js +16 -9
  328. package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.view.xml +9 -0
  329. package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/SandboxModel.js +11 -0
  330. package/test/sap/ui/core/demokit/sample/odata/v4/Products/data/UnitsOfMeasure.json +1 -1
  331. package/test/sap/ui/core/demokit/tutorial/databinding/01/manifest.json +2 -1
  332. package/test/sap/ui/core/demokit/tutorial/databinding/01/package.json +4 -1
  333. package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
  334. package/test/sap/ui/core/demokit/tutorial/databinding/01/webapp/Component.js +12 -0
  335. package/test/sap/ui/core/demokit/tutorial/databinding/01/webapp/index.html +8 -7
  336. package/test/sap/ui/core/demokit/tutorial/databinding/01/webapp/manifest.json +28 -1
  337. package/test/sap/ui/core/demokit/tutorial/databinding/01/webapp/view/App.view.xml +5 -0
  338. package/test/sap/ui/core/demokit/tutorial/databinding/02/manifest.json +3 -1
  339. package/test/sap/ui/core/demokit/tutorial/databinding/02/package.json +4 -1
  340. package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
  341. package/test/sap/ui/core/demokit/tutorial/databinding/02/webapp/Component.js +12 -0
  342. package/test/sap/ui/core/demokit/tutorial/databinding/02/webapp/index.html +8 -7
  343. package/test/sap/ui/core/demokit/tutorial/databinding/02/webapp/manifest.json +34 -1
  344. package/test/sap/ui/core/demokit/tutorial/databinding/02/webapp/model/data.json +3 -0
  345. package/test/sap/ui/core/demokit/tutorial/databinding/02/webapp/view/App.view.xml +5 -0
  346. package/test/sap/ui/core/demokit/tutorial/databinding/03/manifest.json +3 -1
  347. package/test/sap/ui/core/demokit/tutorial/databinding/03/package.json +4 -1
  348. package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
  349. package/test/sap/ui/core/demokit/tutorial/databinding/03/webapp/Component.js +12 -0
  350. package/test/sap/ui/core/demokit/tutorial/databinding/03/webapp/index.html +8 -7
  351. package/test/sap/ui/core/demokit/tutorial/databinding/03/webapp/manifest.json +34 -1
  352. package/test/sap/ui/core/demokit/tutorial/databinding/03/webapp/model/data.json +3 -0
  353. package/test/sap/ui/core/demokit/tutorial/databinding/03/webapp/view/App.view.xml +5 -0
  354. package/test/sap/ui/core/demokit/tutorial/databinding/04/manifest.json +3 -2
  355. package/test/sap/ui/core/demokit/tutorial/databinding/04/package.json +4 -1
  356. package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
  357. package/test/sap/ui/core/demokit/tutorial/databinding/04/webapp/Component.js +12 -0
  358. package/test/sap/ui/core/demokit/tutorial/databinding/04/webapp/index.html +8 -10
  359. package/test/sap/ui/core/demokit/tutorial/databinding/04/webapp/manifest.json +35 -1
  360. package/test/sap/ui/core/demokit/tutorial/databinding/04/webapp/model/data.json +6 -0
  361. package/test/sap/ui/core/demokit/tutorial/databinding/05/manifest.json +3 -2
  362. package/test/sap/ui/core/demokit/tutorial/databinding/05/package.json +4 -1
  363. package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
  364. package/test/sap/ui/core/demokit/tutorial/databinding/05/webapp/Component.js +20 -0
  365. package/test/sap/ui/core/demokit/tutorial/databinding/05/webapp/index.html +8 -10
  366. package/test/sap/ui/core/demokit/tutorial/databinding/05/webapp/manifest.json +35 -1
  367. package/test/sap/ui/core/demokit/tutorial/databinding/05/webapp/model/data.json +6 -0
  368. package/test/sap/ui/core/demokit/tutorial/databinding/06/manifest.json +4 -3
  369. package/test/sap/ui/core/demokit/tutorial/databinding/06/package.json +4 -1
  370. package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
  371. package/test/sap/ui/core/demokit/tutorial/databinding/06/webapp/Component.js +12 -0
  372. package/test/sap/ui/core/demokit/tutorial/databinding/06/webapp/index.html +8 -10
  373. package/test/sap/ui/core/demokit/tutorial/databinding/06/webapp/manifest.json +46 -1
  374. package/test/sap/ui/core/demokit/tutorial/databinding/06/webapp/model/data.json +5 -0
  375. package/test/sap/ui/core/demokit/tutorial/databinding/07/manifest.json +4 -3
  376. package/test/sap/ui/core/demokit/tutorial/databinding/07/package.json +3 -0
  377. package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
  378. package/test/sap/ui/core/demokit/tutorial/databinding/07/webapp/Component.js +12 -0
  379. package/test/sap/ui/core/demokit/tutorial/databinding/07/webapp/index.html +8 -10
  380. package/test/sap/ui/core/demokit/tutorial/databinding/07/webapp/manifest.json +46 -1
  381. package/test/sap/ui/core/demokit/tutorial/databinding/07/webapp/model/data.json +5 -0
  382. package/test/sap/ui/core/demokit/tutorial/databinding/08/manifest.json +4 -3
  383. package/test/sap/ui/core/demokit/tutorial/databinding/08/package.json +3 -0
  384. package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
  385. package/test/sap/ui/core/demokit/tutorial/databinding/08/webapp/Component.js +12 -0
  386. package/test/sap/ui/core/demokit/tutorial/databinding/08/webapp/index.html +8 -10
  387. package/test/sap/ui/core/demokit/tutorial/databinding/08/webapp/manifest.json +46 -1
  388. package/test/sap/ui/core/demokit/tutorial/databinding/08/webapp/model/data.json +11 -0
  389. package/test/sap/ui/core/demokit/tutorial/databinding/08/webapp/view/App.view.xml +1 -1
  390. package/test/sap/ui/core/demokit/tutorial/databinding/09/manifest.json +4 -3
  391. package/test/sap/ui/core/demokit/tutorial/databinding/09/package.json +3 -0
  392. package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
  393. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/Component.js +12 -0
  394. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/controller/App.controller.js +8 -7
  395. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/index.html +8 -10
  396. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/manifest.json +46 -1
  397. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/model/data.json +11 -0
  398. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/view/App.view.xml +2 -2
  399. package/test/sap/ui/core/demokit/tutorial/databinding/10/manifest.json +4 -3
  400. package/test/sap/ui/core/demokit/tutorial/databinding/10/package.json +3 -0
  401. package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
  402. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/Component.js +12 -0
  403. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/controller/App.controller.js +8 -7
  404. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/index.html +8 -10
  405. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/manifest.json +46 -1
  406. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/model/data.json +13 -0
  407. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/view/App.view.xml +3 -3
  408. package/test/sap/ui/core/demokit/tutorial/databinding/11/manifest.json +4 -3
  409. package/test/sap/ui/core/demokit/tutorial/databinding/11/package.json +3 -0
  410. package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
  411. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/Component.js +12 -0
  412. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/controller/App.controller.js +8 -7
  413. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/index.html +8 -10
  414. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/manifest.json +47 -1
  415. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/model/data.json +13 -0
  416. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/view/App.view.xml +3 -3
  417. package/test/sap/ui/core/demokit/tutorial/databinding/12/manifest.json +4 -3
  418. package/test/sap/ui/core/demokit/tutorial/databinding/12/package.json +3 -0
  419. package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
  420. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/Component.js +12 -0
  421. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/controller/App.controller.js +10 -11
  422. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/index.html +8 -10
  423. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/manifest.json +51 -1
  424. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/model/Products.json +64 -57
  425. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/model/data.json +13 -0
  426. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/view/App.view.xml +3 -3
  427. package/test/sap/ui/core/demokit/tutorial/databinding/13/manifest.json +4 -3
  428. package/test/sap/ui/core/demokit/tutorial/databinding/13/package.json +3 -0
  429. package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
  430. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/Component.js +12 -0
  431. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/controller/App.controller.js +16 -16
  432. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/index.html +8 -10
  433. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/manifest.json +51 -1
  434. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/model/Products.json +64 -57
  435. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/model/data.json +13 -0
  436. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/view/App.view.xml +3 -3
  437. package/test/sap/ui/core/demokit/tutorial/databinding/14/manifest.json +4 -3
  438. package/test/sap/ui/core/demokit/tutorial/databinding/14/package.json +3 -0
  439. package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
  440. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/Component.js +12 -0
  441. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/controller/App.controller.js +16 -16
  442. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/index.html +8 -10
  443. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/manifest.json +51 -1
  444. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/model/Products.json +64 -57
  445. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/model/data.json +14 -0
  446. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/view/App.view.xml +3 -3
  447. package/test/sap/ui/core/demokit/tutorial/databinding/15/manifest.json +4 -3
  448. package/test/sap/ui/core/demokit/tutorial/databinding/15/package.json +3 -0
  449. package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
  450. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/Component.js +12 -0
  451. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/controller/App.controller.js +19 -22
  452. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/index.html +8 -10
  453. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/manifest.json +51 -1
  454. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/model/Products.json +64 -57
  455. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/model/data.json +14 -0
  456. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/view/App.view.xml +5 -5
  457. package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
  458. package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
  459. package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
  460. package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
  461. package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
  462. package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
  463. package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
  464. package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
  465. package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
  466. package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
  467. package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
  468. package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
  469. package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
  470. package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
  471. package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
  472. package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
  473. package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
  474. package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
  475. package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
  476. package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
  477. package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
  478. package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
  479. package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
  480. package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
  481. package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
  482. package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
  483. package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
  484. package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
  485. package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
  486. package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
  487. package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
  488. package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
  489. package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
  490. package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +67 -0
  491. package/test/sap/ui/core/qunit/EventProvider.qunit.js +30 -2
  492. package/test/sap/ui/core/qunit/{Core_libraryPreloadFiles.qunit.html → Lib_preloadFiles.qunit.html} +1 -1
  493. package/test/sap/ui/core/qunit/{Core_libraryPreloadFiles.qunit.js → Lib_preloadFiles.qunit.js} +5 -10
  494. package/test/sap/ui/core/qunit/ThemeHelper.qunit.js +1 -1
  495. package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +4 -4
  496. package/test/sap/ui/core/qunit/ThemeParameters_legacyAPIs.qunit.js +12 -12
  497. package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +262 -12
  498. package/test/sap/ui/core/qunit/app/DesignMode_suppressedDeactivation.qunit.js +8 -4
  499. package/test/sap/ui/core/qunit/app/_createDesignModeTests_legacyAPIs.qunit.js +8 -4
  500. package/test/sap/ui/core/qunit/app/fixture/designmode/test01.controller.js +4 -4
  501. package/test/sap/ui/core/qunit/app/testsuite.app.qunit.js +3 -3
  502. package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +11 -0
  503. package/test/sap/ui/core/qunit/component/Component_keepAlive.qunit.js +30 -2
  504. package/test/sap/ui/core/qunit/component/UIComponent.qunit.js +82 -19
  505. package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/App.view.xml +3 -0
  506. package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/Component.js +20 -0
  507. package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/Home.view.xml +5 -0
  508. package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/Other.view.xml +5 -0
  509. package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/manifest.json +54 -0
  510. package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessAmbiguous.html +4 -0
  511. package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessDuplicate.html +4 -0
  512. package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessFailing.html +4 -0
  513. package/test/sap/ui/core/qunit/gherkin/opa5TestHarness.qunit.html +4 -0
  514. package/test/sap/ui/core/qunit/gherkin/opa5TestHarness.qunit.js +1 -1
  515. package/test/sap/ui/core/qunit/gherkin/qUnitTestHarness.qunit.html +4 -0
  516. package/test/sap/ui/core/qunit/gherkin/qUnitTestHarness.qunit.js +1 -1
  517. package/test/sap/ui/core/qunit/internal/1RingModels.qunit.html +1 -1
  518. package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +5 -6
  519. package/test/sap/ui/core/qunit/internal/testsuite.models.qunit.js +43 -16
  520. package/test/sap/ui/core/qunit/messages/messagesGeneral.qunit.js +194 -180
  521. package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +15 -33
  522. package/test/sap/ui/core/qunit/mockserver/MockServer.qunit.js +936 -1014
  523. package/test/sap/ui/core/qunit/mockserver/testsuite.mockserver.qunit.js +2 -4
  524. package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata.xml +2 -0
  525. package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +50 -1
  526. package/test/sap/ui/core/qunit/model/controlhelper/TreeBindingProxy.qunit.js +18 -8
  527. package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +107 -49
  528. package/test/sap/ui/core/qunit/mvc/testdata/asyncHooks.view.xml +7 -0
  529. package/test/sap/ui/core/qunit/odata/ODataMetaModel.qunit.js +0 -3
  530. package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +143 -2
  531. package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +34 -0
  532. package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +230 -39
  533. package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +57 -18
  534. package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +40 -6
  535. package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +3 -0
  536. package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1715 -106
  537. package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +39 -0
  538. package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +88 -18
  539. package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +544 -50
  540. package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +175 -0
  541. package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +50 -9
  542. package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +17 -0
  543. package/test/sap/ui/core/qunit/odata/v4/lib/_TreeState.qunit.js +140 -27
  544. package/test/sap/ui/core/qunit/opa/RecordReplay.qunit.js +12 -3
  545. package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +1 -2
  546. package/test/sap/ui/core/qunit/routing/fixture/placeholder/component/NavContainerOptOut/Component.js +1 -0
  547. package/test/sap/ui/core/qunit/rule/model/bindingPathSyntaxValidation.qunit.js +37 -0
  548. package/test/sap/ui/core/qunit/rule/model/{modelSupport.qunit.js → selectUsedInBoundAggregation.qunit.js} +86 -154
  549. package/test/sap/ui/core/qunit/rule/testsuite.rule.qunit.js +5 -2
  550. package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib12/themes/{sap_hcb → sap_horizon_hcb}/library.css +1 -1
  551. package/test/sap/ui/core/qunit/testsuite.core.framework.qunit.js +18 -18
  552. package/test/sap/ui/core/qunit/testsuites/testsuite.base.configuration.qunit.js +1 -1
  553. package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +3 -3
  554. package/test/sap/ui/core/qunit/types/CompositeType.qunit.js +6 -0
  555. package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +3 -6
  556. package/test/sap/ui/core/qunit/types/NumberFormat.qunit.js +1370 -1242
  557. package/test/sap/ui/core/qunit/types/Types.qunit.js +65 -0
  558. package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +0 -3
  559. package/test/sap/ui/core/qunit/ui5classes/ManagedObject.qunit.js +68 -3
  560. package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +2625 -1899
  561. package/test/sap/ui/core/qunit/util/reflection/JsControlTreeModifier.qunit.js +0 -102
  562. package/test/sap/ui/core/qunit/util/reflection/XmlTreeModifier.qunit.js +0 -165
  563. package/test/sap/ui/core/relnotes/changes-1.121.json +0 -15
  564. package/test/sap/ui/core/relnotes/changes-1.122.json +80 -0
  565. package/test/sap/ui/core/visual/HyphenationPlayground.spec.js +5 -2
  566. package/test/sap/ui/core/demokit/tutorial/databinding/01/webapp/index.js +0 -15
  567. package/test/sap/ui/core/demokit/tutorial/databinding/02/webapp/index.js +0 -21
  568. package/test/sap/ui/core/demokit/tutorial/databinding/03/webapp/index.js +0 -21
  569. package/test/sap/ui/core/demokit/tutorial/databinding/04/webapp/index.js +0 -25
  570. package/test/sap/ui/core/demokit/tutorial/databinding/05/webapp/index.js +0 -29
  571. package/test/sap/ui/core/demokit/tutorial/databinding/06/webapp/index.js +0 -42
  572. package/test/sap/ui/core/demokit/tutorial/databinding/07/webapp/index.js +0 -44
  573. package/test/sap/ui/core/demokit/tutorial/databinding/08/webapp/index.js +0 -39
  574. package/test/sap/ui/core/demokit/tutorial/databinding/09/webapp/index.js +0 -39
  575. package/test/sap/ui/core/demokit/tutorial/databinding/10/webapp/index.js +0 -41
  576. package/test/sap/ui/core/demokit/tutorial/databinding/11/webapp/index.js +0 -48
  577. package/test/sap/ui/core/demokit/tutorial/databinding/12/webapp/index.js +0 -52
  578. package/test/sap/ui/core/demokit/tutorial/databinding/13/webapp/index.js +0 -52
  579. package/test/sap/ui/core/demokit/tutorial/databinding/14/webapp/index.js +0 -54
  580. package/test/sap/ui/core/demokit/tutorial/databinding/15/webapp/index.js +0 -54
  581. /package/test/sap/ui/core/qunit/testdata/legacy-uilib_legacyAPIs/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  582. /package/test/sap/ui/core/qunit/testdata/legacy-uilib_legacyAPIs/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  583. /package/test/sap/ui/core/qunit/testdata/legacy-uilib_legacyAPIs/themes/{sap_hcb → sap_horizon_hcb}/library[legacy].css +0 -0
  584. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib1/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  585. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib1/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  586. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib10/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  587. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib11/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  588. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib13/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  589. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib14/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  590. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib15/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  591. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib15/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  592. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib16/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  593. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib16/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  594. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib17/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  595. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib2/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  596. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib2/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  597. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib3/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  598. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib3/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  599. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/themes/{sap_hcb → sap_horizon_hcb}/library-parameters.json +0 -0
  600. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib5/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  601. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib6/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  602. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib7/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  603. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib8/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
  604. /package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib9/themes/{sap_hcb → sap_horizon_hcb}/library.css +0 -0
@@ -568,6 +568,13 @@ sap.ui.define([
568
568
  assert.ok(oCache.oTreeState instanceof _TreeState);
569
569
  assert.strictEqual(oCache.oTreeState.sNodeProperty, "node/property");
570
570
  assert.strictEqual(oCache.bUnifiedCache, false);
571
+
572
+ this.mock(oCache).expects("getTypes").returns("~types~");
573
+ this.mock(_Helper).expects("getKeyFilter")
574
+ .withExactArgs("~node~", "/resource/path", "~types~").returns("~filter~");
575
+
576
+ // code under test: callback function provided for _TreeState c'tor
577
+ assert.strictEqual(oCache.oTreeState.fnGetKeyFilter("~node~"), "~filter~");
571
578
  });
572
579
  });
573
580
 
@@ -1045,7 +1052,16 @@ sap.ui.define([
1045
1052
  });
1046
1053
 
1047
1054
  //*********************************************************************************************
1048
- QUnit.test("fetchParentIndex", async function (assert) {
1055
+ [false, true].forEach(function (bParentIsPlaceholder) {
1056
+ [false, true].forEach(function (bCandidateFound) {
1057
+ const sTitle = "fetchParentIndex: parent is placeholder = " + bParentIsPlaceholder
1058
+ + ", candidate outside collection found = " + bCandidateFound;
1059
+
1060
+ if (bCandidateFound && !bParentIsPlaceholder) {
1061
+ return; // parent is either inside or outside collection
1062
+ }
1063
+
1064
+ QUnit.test(sTitle, async function (assert) {
1049
1065
  const oAggregation = {
1050
1066
  $DistanceFromRoot : "DistFromRoot",
1051
1067
  $DrillState : "myDrillState",
@@ -1060,11 +1076,18 @@ sap.ui.define([
1060
1076
  };
1061
1077
  const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, oAggregation);
1062
1078
  const sQueryOptions = JSON.stringify(oCache.mQueryOptions);
1063
-
1064
- this.mock(oCache).expects("getTypes").returns("~Types~").twice();
1065
- const oNode = {};
1079
+ const oCacheMock = this.mock(oCache);
1080
+ oCacheMock.expects("getTypes").atLeast(1).returns("~Types~");
1081
+ const oNode = {"@$ui5.node.level" : 3};
1082
+ oCache.aElements[20] = {"@$ui5.node.level" : 0};
1083
+ oCache.aElements[21] = {"@$ui5.node.level" : 4};
1084
+ oCache.aElements[22] = {"@$ui5.node.level" : 4};
1066
1085
  oCache.aElements[23] = oNode;
1067
- this.mock(_Helper).expects("getKeyFilter").withExactArgs(oNode, "~metaPath~", "~Types~")
1086
+ oCache.aElements[24] = {"@$ui5.node.level" : 4};
1087
+ oCache.aElements[25] = {"@$ui5.node.level" : 5};
1088
+ oCache.aElements[26] = {"@$ui5.node.level" : 3};
1089
+ const oHelperMock = this.mock(_Helper);
1090
+ oHelperMock.expects("getKeyFilter").withExactArgs(oNode, "~metaPath~", "~Types~")
1068
1091
  .returns("~Key~");
1069
1092
  this.mock(this.oRequestor).expects("buildQueryString")
1070
1093
  .withExactArgs(null, {$apply : "ancestors($root/path,X,NodeID,filter(~Key~),1)"})
@@ -1076,9 +1099,21 @@ sap.ui.define([
1076
1099
 
1077
1100
  await "next tick";
1078
1101
 
1079
- this.mock(_Helper).expects("setPrivateAnnotation")
1102
+ oHelperMock.expects("getKeyPredicate")
1103
+ .withExactArgs("~Parent~", "/Foo", "~Types~")
1104
+ .returns("('n/a')");
1105
+ if (bCandidateFound) {
1106
+ oCache.aElements.$byPredicate["('n/a')"] = "~ParentOutsideCollection~";
1107
+ oHelperMock.expects("getPrivateAnnotation")
1108
+ .withExactArgs("~ParentOutsideCollection~", "rank")
1109
+ .returns(undefined);
1110
+ } else { // parent not already in cache
1111
+ oHelperMock.expects("getPrivateAnnotation").never();
1112
+ }
1113
+ oCacheMock.expects("getArrayIndex").never(); // not yet
1114
+ oHelperMock.expects("setPrivateAnnotation")
1080
1115
  .withExactArgs("~Parent~", "parent", sinon.match.same(oCache.oFirstLevel));
1081
- this.mock(oCache).expects("requestRank")
1116
+ oCacheMock.expects("requestRank")
1082
1117
  .withExactArgs("~Parent~", "~GroupLock~")
1083
1118
  .callsFake(async () => {
1084
1119
  await "next tick";
@@ -1086,29 +1121,24 @@ sap.ui.define([
1086
1121
  assert.ok(oPropertiesExpectation.called, "called in sync");
1087
1122
  assert.ok(oNodePropertyExpectation.called, "called in sync");
1088
1123
 
1089
- this.mock(_Helper).expects("buildPath").withExactArgs("/Foo", "")
1090
- .returns("~Path~");
1091
- this.mock(_Helper).expects("getMetaPath").withExactArgs("~Path~")
1092
- .returns("~MetaPath~");
1124
+ oCache.aElements[17] = "~ParentInsideCollection~";
1093
1125
  this.mock(oCache.oFirstLevel).expects("calculateKeyPredicate")
1094
- .withExactArgs("~Parent~", "~Types~", "~MetaPath~");
1095
- this.mock(oCache).expects("getArrayIndex").withExactArgs("~iRank~")
1096
- .returns("~iIndex~");
1097
- this.mock(oCache).expects("addElements")
1098
- .withExactArgs("~Parent~", "~iIndex~",
1099
- sinon.match.same(oCache.oFirstLevel), "~iRank~");
1100
- this.mock(oCache.oFirstLevel).expects("removeElement")
1101
- .withExactArgs("~iRank~");
1102
- this.mock(oCache.oFirstLevel).expects("restoreElement")
1103
- .withExactArgs("~iRank~", "~Parent~");
1126
+ .withExactArgs("~Parent~", "~Types~", "/Foo");
1127
+ oCacheMock.expects("getArrayIndex").withExactArgs("~iRank~")
1128
+ .returns(17);
1129
+ oHelperMock.expects("getPrivateAnnotation")
1130
+ .withExactArgs("~ParentInsideCollection~", "placeholder")
1131
+ .returns(bParentIsPlaceholder);
1132
+ oCacheMock.expects("insertNode").exactly(bParentIsPlaceholder ? 1 : 0)
1133
+ .withExactArgs("~Parent~", "~iRank~", 17);
1104
1134
 
1105
1135
  return "~iRank~";
1106
1136
  });
1107
- oPropertiesExpectation = this.mock(oCache).expects("requestProperties")
1137
+ oPropertiesExpectation = oCacheMock.expects("requestProperties")
1108
1138
  .withExactArgs("~Parent~", ["DistFromRoot", "myDrillState",
1109
1139
  "LtdDescendant_Count"], "~GroupLock~", true)
1110
1140
  .resolves();
1111
- oNodePropertyExpectation = this.mock(oCache).expects("requestNodeProperty")
1141
+ oNodePropertyExpectation = oCacheMock.expects("requestNodeProperty")
1112
1142
  .withExactArgs("~Parent~", "~GroupLock~")
1113
1143
  .resolves();
1114
1144
 
@@ -1116,9 +1146,125 @@ sap.ui.define([
1116
1146
  });
1117
1147
 
1118
1148
  // code under test
1119
- assert.strictEqual(await oCache.fetchParentIndex(23, "~GroupLock~"), "~iIndex~");
1149
+ const oPromise = oCache.fetchParentIndex(26, "~GroupLock~");
1150
+ const oPromise0 = oCache.fetchParentIndex(23, "~GroupLock~");
1151
+ const oPromise1 = oCache.fetchParentIndex(26, "~GroupLock~");
1152
+ const oPromise2 = oCache.fetchParentIndex(23, "~GroupLock~");
1153
+
1154
+ assert.strictEqual(_Helper.getPrivateAnnotation(oNode, "parentIndexPromise"), oPromise,
1155
+ "cached");
1156
+ assert.strictEqual(oPromise, oPromise0, "same promise");
1157
+ assert.strictEqual(oPromise, oPromise1, "same promise");
1158
+ assert.strictEqual(oPromise, oPromise2, "same promise");
1159
+ assert.ok(oPromise instanceof SyncPromise);
1160
+ assert.strictEqual(await oPromise, 17);
1161
+ assert.strictEqual(JSON.stringify(oCache.mQueryOptions), sQueryOptions, "unchanged");
1162
+ assert.notOk(_Helper.hasPrivateAnnotation(oNode, "parentIndexPromise"), "gone");
1163
+ });
1164
+ });
1165
+ });
1166
+
1167
+ //*********************************************************************************************
1168
+ ["~rank~", 0].forEach((iRank) => {
1169
+ const sTitle = "fetchParentIndex: parent already inside collection, rank = " + iRank;
1170
+
1171
+ QUnit.test(sTitle, async function (assert) {
1172
+ const oAggregation = {
1173
+ $DistanceFromRoot : "DistFromRoot",
1174
+ $DrillState : "myDrillState",
1175
+ $LimitedDescendantCount : "LtdDescendant_Count",
1176
+ $metaPath : "~metaPath~",
1177
+ $NodeProperty : "NodeID",
1178
+ $path : "/path",
1179
+ aggregate : {},
1180
+ group : {},
1181
+ groupLevels : ["BillToParty"],
1182
+ hierarchyQualifier : "X"
1183
+ };
1184
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, oAggregation);
1185
+ const sQueryOptions = JSON.stringify(oCache.mQueryOptions);
1186
+
1187
+ this.mock(oCache).expects("getTypes").atLeast(1).returns("~Types~");
1188
+ const oNode = {};
1189
+ oCache.aElements[22] = {"@$ui5.node.level" : 0};
1190
+ oCache.aElements[23] = oNode;
1191
+ this.mock(_Helper).expects("getKeyFilter").withExactArgs(oNode, "~metaPath~", "~Types~")
1192
+ .returns("~Key~");
1193
+ this.mock(this.oRequestor).expects("buildQueryString")
1194
+ .withExactArgs(null, {$apply : "ancestors($root/path,X,NodeID,filter(~Key~),1)"})
1195
+ .returns("/~QueryString~");
1196
+ this.mock(this.oRequestor).expects("request")
1197
+ .withExactArgs("GET", "Foo/~QueryString~", "~GroupLock~")
1198
+ .callsFake(async () => {
1199
+ await "next tick";
1200
+
1201
+ oCache.aElements.$byPredicate["('42')"] = "~ParentInCache~";
1202
+ this.mock(_Helper).expects("getKeyPredicate")
1203
+ .withExactArgs("~Parent~", "/Foo", "~Types~")
1204
+ .returns("('42')");
1205
+ this.mock(_Helper).expects("getPrivateAnnotation")
1206
+ .withExactArgs("~ParentInCache~", "rank")
1207
+ .returns(iRank);
1208
+ this.mock(oCache).expects("getArrayIndex")
1209
+ .withExactArgs(iRank)
1210
+ .returns("~iIndex~");
1211
+ this.mock(oCache).expects("requestRank").never();
1212
+
1213
+ return {value : ["~Parent~"]};
1214
+ });
1215
+
1216
+ // code under test
1217
+ const oPromise = oCache.fetchParentIndex(23, "~GroupLock~");
1218
+
1219
+ assert.strictEqual(_Helper.getPrivateAnnotation(oNode, "parentIndexPromise"), oPromise,
1220
+ "cached");
1221
+ assert.ok(oPromise instanceof SyncPromise);
1222
+ assert.strictEqual(await oPromise, "~iIndex~");
1223
+ assert.strictEqual(JSON.stringify(oCache.mQueryOptions), sQueryOptions, "unchanged");
1224
+ assert.notOk(_Helper.hasPrivateAnnotation(oNode, "parentIndexPromise"), "gone");
1225
+ });
1226
+ });
1227
+
1228
+ //*********************************************************************************************
1229
+ QUnit.test("fetchParentIndex: clean up on failed request", async function (assert) {
1230
+ const oAggregation = {
1231
+ $DistanceFromRoot : "DistFromRoot",
1232
+ $DrillState : "myDrillState",
1233
+ $LimitedDescendantCount : "LtdDescendant_Count",
1234
+ $metaPath : "~metaPath~",
1235
+ $NodeProperty : "NodeID",
1236
+ $path : "/path",
1237
+ aggregate : {},
1238
+ group : {},
1239
+ groupLevels : ["BillToParty"],
1240
+ hierarchyQualifier : "X"
1241
+ };
1242
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, oAggregation);
1243
+ const sQueryOptions = JSON.stringify(oCache.mQueryOptions);
1244
+
1245
+ this.mock(oCache).expects("getTypes").returns("~Types~");
1246
+ const oNode = {};
1247
+ oCache.aElements[22] = {"@$ui5.node.level" : 0};
1248
+ oCache.aElements[23] = oNode;
1249
+ this.mock(_Helper).expects("getKeyFilter").withExactArgs(oNode, "~metaPath~", "~Types~")
1250
+ .returns("~Key~");
1251
+ this.mock(this.oRequestor).expects("buildQueryString")
1252
+ .withExactArgs(null, {$apply : "ancestors($root/path,X,NodeID,filter(~Key~),1)"})
1253
+ .returns("/~QueryString~");
1254
+ const oError = new Error();
1255
+ this.mock(this.oRequestor).expects("request")
1256
+ .withExactArgs("GET", "Foo/~QueryString~", "~GroupLock~")
1257
+ .rejects(oError);
1258
+
1259
+ // code under test
1260
+ const oPromise = oCache.fetchParentIndex(23, "~GroupLock~");
1120
1261
 
1262
+ assert.strictEqual(_Helper.getPrivateAnnotation(oNode, "parentIndexPromise"), oPromise,
1263
+ "cached");
1264
+ assert.ok(oPromise instanceof SyncPromise);
1265
+ await assert.rejects(oPromise, oError);
1121
1266
  assert.strictEqual(JSON.stringify(oCache.mQueryOptions), sQueryOptions, "unchanged");
1267
+ assert.notOk(_Helper.hasPrivateAnnotation(oNode, "parentIndexPromise"), "gone");
1122
1268
  });
1123
1269
 
1124
1270
  //*********************************************************************************************
@@ -1530,53 +1676,114 @@ sap.ui.define([
1530
1676
  [{
1531
1677
  bHasGrandTotal : false,
1532
1678
  iFirstLevelIndex : 0,
1533
- iFirstLevelLength : 3
1679
+ iFirstLevelLength : 3,
1680
+ iExpectedStart : 0,
1681
+ iExpectedLength : 23
1534
1682
  }, {
1535
1683
  bHasGrandTotal : true,
1536
1684
  iFirstLevelIndex : 0,
1537
- iFirstLevelLength : 2
1685
+ iFirstLevelLength : 2,
1686
+ iExpectedStart : 0,
1687
+ iExpectedLength : 22
1538
1688
  }, {
1539
1689
  bHasGrandTotal : true,
1540
1690
  grandTotalAtBottomOnly : false,
1541
1691
  iFirstLevelIndex : 0,
1542
- iFirstLevelLength : 2
1692
+ iFirstLevelLength : 2,
1693
+ iExpectedStart : 0,
1694
+ iExpectedLength : 22
1543
1695
  }, {
1544
1696
  bHasGrandTotal : true,
1545
1697
  grandTotalAtBottomOnly : true,
1546
1698
  iFirstLevelIndex : 0,
1547
- iFirstLevelLength : 1
1699
+ iFirstLevelLength : 1,
1700
+ iExpectedStart : 0,
1701
+ iExpectedLength : 21
1548
1702
  }, {
1549
1703
  bHasGrandTotal : false,
1550
1704
  iFirstLevelIndex : 10,
1551
- iFirstLevelLength : 3
1705
+ iFirstLevelLength : 3,
1706
+ iExpectedStart : 0,
1707
+ iExpectedLength : 33
1708
+ }, {
1709
+ bHasGrandTotal : false,
1710
+ iFirstLevelIndex : 20,
1711
+ iFirstLevelLength : 1,
1712
+ iExpectedStart : 0,
1713
+ iExpectedLength : 41
1714
+ }, {
1715
+ bHasGrandTotal : false,
1716
+ iFirstLevelIndex : 21,
1717
+ iFirstLevelLength : 1,
1718
+ iExpectedStart : 1,
1719
+ iExpectedLength : 41
1552
1720
  }, {
1553
1721
  bHasGrandTotal : true,
1554
1722
  iFirstLevelIndex : 9,
1555
- iFirstLevelLength : 3
1723
+ iFirstLevelLength : 3,
1724
+ iExpectedStart : 0,
1725
+ iExpectedLength : 32
1556
1726
  }, {
1557
1727
  bHasGrandTotal : true,
1558
1728
  grandTotalAtBottomOnly : false,
1559
1729
  iFirstLevelIndex : 9,
1560
- iFirstLevelLength : 3
1730
+ iFirstLevelLength : 3,
1731
+ iExpectedStart : 0,
1732
+ iExpectedLength : 32
1561
1733
  }, {
1562
1734
  bHasGrandTotal : true,
1563
1735
  grandTotalAtBottomOnly : true,
1564
1736
  iFirstLevelIndex : 10,
1565
- iFirstLevelLength : 3
1737
+ iFirstLevelLength : 3,
1738
+ iExpectedStart : 0,
1739
+ iExpectedLength : 33
1566
1740
  }, {
1567
1741
  bHasGrandTotal : true,
1568
1742
  iFirstLevelIndex : 0,
1569
- iFirstLevelLength : 42
1743
+ iFirstLevelLength : 42,
1744
+ iExpectedStart : 0,
1745
+ iExpectedLength : 62
1570
1746
  }, {
1571
1747
  iExpandTo : 2,
1572
1748
  iLevel : 0, // symbolic level for generic initial placeholders inside top pyramid
1573
1749
  iFirstLevelIndex : 10,
1574
- iFirstLevelLength : 3
1750
+ iFirstLevelLength : 3,
1751
+ iExpectedStart : 0,
1752
+ iExpectedLength : 33
1575
1753
  }, {
1576
1754
  bUnifiedCache : true,
1577
1755
  iLevel : 0, // symbolic level for generic initial placeholders inside top pyramid
1578
1756
  iFirstLevelIndex : 10,
1579
- iFirstLevelLength : 3
1757
+ iFirstLevelLength : 3,
1758
+ iExpectedStart : 0,
1759
+ iExpectedLength : 33
1760
+ }, {
1761
+ iFirstLevelIndex : 25,
1762
+ iFirstLevelLength : 1,
1763
+ iOutOfPlaceCount : 5,
1764
+ iPrefetchLength : 10,
1765
+ iExpectedStart : 10,
1766
+ iExpectedLength : 26
1767
+ }, {
1768
+ iFirstLevelIndex : 21,
1769
+ iFirstLevelLength : 1,
1770
+ iOutOfPlaceCount : 5,
1771
+ iExpectedStart : 0,
1772
+ iExpectedLength : 42
1773
+ }, {
1774
+ iFirstLevelIndex : 20,
1775
+ iFirstLevelLength : 1,
1776
+ iOutOfPlaceCount : 5,
1777
+ iPrefetchLength : 0,
1778
+ iExpectedStart : 15,
1779
+ iExpectedLength : 6
1780
+ }, {
1781
+ iFirstLevelIndex : 2,
1782
+ iFirstLevelLength : 1,
1783
+ iOutOfPlaceCount : 5,
1784
+ iPrefetchLength : 0,
1785
+ iExpectedStart : 0,
1786
+ iExpectedLength : 3
1580
1787
  }].forEach(function (oFixture, i) {
1581
1788
  QUnit.test("readFirst: #" + i, function (assert) {
1582
1789
  var oAggregation = { // filled before by buildApply
@@ -1589,13 +1796,12 @@ sap.ui.define([
1589
1796
  oAggregationHelperMock = this.mock(_AggregationHelper),
1590
1797
  oCache = _AggregationCache.create(this.oRequestor, "~", "", {}, oAggregation),
1591
1798
  oCacheMock = this.mock(oCache),
1799
+ iExpectedLength = oFixture.iExpectedLength,
1592
1800
  iExpectedLevel = "iLevel" in oFixture ? oFixture.iLevel : 1, // cf. createPlaceholder
1593
- iFirstLevelIndex = oFixture.iFirstLevelIndex,
1594
- iFirstLevelLength = oFixture.iFirstLevelLength,
1801
+ iExpectedStart = oFixture.iExpectedStart,
1595
1802
  oGrandTotal = {},
1596
1803
  oGrandTotalCopy = {},
1597
1804
  iOffset = oFixture.bHasGrandTotal && oFixture.grandTotalAtBottomOnly !== true ? 1 : 0,
1598
- iPrefetchLength = 20,
1599
1805
  oReadResult = {
1600
1806
  value : []
1601
1807
  },
@@ -1614,14 +1820,18 @@ sap.ui.define([
1614
1820
  oCache.oGrandTotalPromise = SyncPromise.resolve(oGrandTotal);
1615
1821
  _Helper.setPrivateAnnotation(oGrandTotal, "copy", oGrandTotalCopy);
1616
1822
  }
1617
- for (i = 0; i < Math.min(iFirstLevelLength + iPrefetchLength, 42); i += 1) {
1823
+ for (i = 0; i < Math.min(iExpectedLength, 42); i += 1) {
1618
1824
  oReadResult.value.push({});
1619
1825
  }
1620
1826
  oReadResult.value.$count = 42;
1827
+ this.mock(oCache.oTreeState).expects("getOutOfPlaceCount").withExactArgs()
1828
+ .returns(oFixture.iOutOfPlaceCount ?? 0);
1621
1829
  this.mock(oCache.oFirstLevel).expects("read")
1622
- .withExactArgs(iFirstLevelIndex, iFirstLevelLength + iPrefetchLength, 0,
1623
- "~oGroupLock~", "~fnDataRequested~")
1830
+ .withExactArgs(iExpectedStart, iExpectedLength, 0, "~oGroupLock~", "~fnDataRequested~")
1624
1831
  .returns(SyncPromise.resolve(Promise.resolve(oReadResult)));
1832
+ this.mock(oCache).expects("requestOutOfPlaceNodes").withExactArgs("~oGroupLock~")
1833
+ .returns([Promise.resolve("~outOfPlaceResult0~"),
1834
+ Promise.resolve("~outOfPlaceResult1~"), Promise.resolve("~outOfPlaceResult2~")]);
1625
1835
  if (oFixture.bHasGrandTotal) {
1626
1836
  switch (oFixture.grandTotalAtBottomOnly) {
1627
1837
  case false: // top & bottom
@@ -1645,31 +1855,33 @@ sap.ui.define([
1645
1855
  .callsFake(addElements); // so that oCache.aElements is actually filled
1646
1856
  }
1647
1857
  }
1648
- oCacheMock.expects("addElements")
1649
- .withExactArgs(sinon.match.same(oReadResult.value), iFirstLevelIndex + iOffset,
1650
- sinon.match.same(oCache.oFirstLevel), iFirstLevelIndex)
1858
+ const oAddElementsExpectation = oCacheMock.expects("addElements")
1859
+ .withExactArgs(sinon.match.same(oReadResult.value), iExpectedStart + iOffset,
1860
+ sinon.match.same(oCache.oFirstLevel), iExpectedStart)
1651
1861
  .callsFake(addElements); // so that oCache.aElements is actually filled
1652
1862
  // expect placeholders before and after real read results
1653
- for (i = 0; i < iFirstLevelIndex; i += 1) {
1863
+ for (i = 0; i < iExpectedStart; i += 1) {
1654
1864
  oAggregationHelperMock.expects("createPlaceholder")
1655
1865
  .withExactArgs(iExpectedLevel, i, sinon.match.same(oCache.oFirstLevel))
1656
1866
  .returns("~placeholder~" + i);
1657
1867
  }
1658
- for (i = iFirstLevelIndex + iFirstLevelLength + iPrefetchLength; i < 42; i += 1) {
1868
+ for (i = iExpectedStart + iExpectedLength; i < 42; i += 1) {
1659
1869
  oAggregationHelperMock.expects("createPlaceholder")
1660
1870
  .withExactArgs(iExpectedLevel, i, sinon.match.same(oCache.oFirstLevel))
1661
1871
  .returns("~placeholder~" + i);
1662
1872
  }
1873
+ const oHandleOutOfPlaceNodesExpectation = this.mock(oCache).expects("handleOutOfPlaceNodes")
1874
+ .withExactArgs(["~outOfPlaceResult0~", "~outOfPlaceResult1~", "~outOfPlaceResult2~"]);
1663
1875
 
1664
1876
  // code under test
1665
- return oCache.readFirst(iFirstLevelIndex, iFirstLevelLength, iPrefetchLength,
1666
- "~oGroupLock~", "~fnDataRequested~")
1877
+ return oCache.readFirst(oFixture.iFirstLevelIndex, oFixture.iFirstLevelLength,
1878
+ oFixture.iPrefetchLength ?? 20, "~oGroupLock~", "~fnDataRequested~")
1667
1879
  .then(function () {
1668
1880
  // check placeholders before and after real read results
1669
- for (i = 0; i < iFirstLevelIndex; i += 1) {
1881
+ for (i = 0; i < iExpectedStart; i += 1) {
1670
1882
  assert.strictEqual(oCache.aElements[iOffset + i], "~placeholder~" + i);
1671
1883
  }
1672
- for (i = iFirstLevelIndex + iFirstLevelLength + iPrefetchLength; i < 42; i += 1) {
1884
+ for (i = iExpectedStart + iExpectedLength; i < 42; i += 1) {
1673
1885
  assert.strictEqual(oCache.aElements[iOffset + i], "~placeholder~" + i);
1674
1886
  }
1675
1887
 
@@ -1689,6 +1901,8 @@ sap.ui.define([
1689
1901
  assert.strictEqual(oCache.aElements.length, 42);
1690
1902
  assert.strictEqual(oCache.aElements.$count, 42);
1691
1903
  }
1904
+
1905
+ assert.ok(oHandleOutOfPlaceNodesExpectation.calledAfter(oAddElementsExpectation));
1692
1906
  });
1693
1907
  });
1694
1908
  });
@@ -3407,6 +3621,8 @@ sap.ui.define([
3407
3621
  .withExactArgs(sinon.match.same(oElement), sinon.match.same(oKeptElement));
3408
3622
  this.mock(oCache).expects("hasPendingChangesForPath").exactly(bIgnore ? 1 : 0)
3409
3623
  .withExactArgs("(1)").returns(false);
3624
+ this.mock(_Helper).expects("copySelected").withExactArgs(sinon.match.same(oKeptElement),
3625
+ sinon.match.same(oElement));
3410
3626
 
3411
3627
  // code under test
3412
3628
  oCache.addElements(oElement, 1, "~parent~", 42);
@@ -3558,6 +3774,7 @@ sap.ui.define([
3558
3774
  const oHelperMock = this.mock(_Helper);
3559
3775
 
3560
3776
  function setupMocks(iRange) {
3777
+ oHelperMock.expects("hasPrivateAnnotation").never();
3561
3778
  for (let i = 0; i < iRange; i += 1) {
3562
3779
  const oNode = oCache.aElements[i];
3563
3780
  oHelperMock.expects("getPrivateAnnotation")
@@ -3582,6 +3799,23 @@ sap.ui.define([
3582
3799
  });
3583
3800
  });
3584
3801
 
3802
+ //*********************************************************************************************
3803
+ QUnit.test("getArrayIndex: throws Error without rank", function (assert) {
3804
+ const oCache = _AggregationCache.create(this.oRequestor, "~", "", {},
3805
+ {hierarchyQualifier : "X"});
3806
+
3807
+ oCache.aElements = [{
3808
+ "@$ui5._" : { // no private annotation "rank"
3809
+ parent : oCache.oFirstLevel
3810
+ }
3811
+ }];
3812
+
3813
+ assert.throws(function () {
3814
+ // code under test
3815
+ oCache.getArrayIndex(1);
3816
+ }, new Error("Missing rank"));
3817
+ });
3818
+
3585
3819
  //*********************************************************************************************
3586
3820
  QUnit.test("getParentIndex", function (assert) {
3587
3821
  const oCache = _AggregationCache.create(this.oRequestor, "~", "", {},
@@ -4592,6 +4826,9 @@ make root = ${bMakeRoot}`;
4592
4826
  .exactly(bParentExpanded || bCreateRoot ? 0 : 1)
4593
4827
  .withExactArgs(sinon.match.same(oCache.mChangeListeners), "('42')",
4594
4828
  sinon.match.same(oParentNode), {"@$ui5.node.isExpanded" : true});
4829
+ this.mock(oCache.oTreeState).expects("expand")
4830
+ .exactly(bParentExpanded || bCreateRoot ? 0 : 1)
4831
+ .withExactArgs(sinon.match.same(oParentNode));
4595
4832
  const oEntityData = {
4596
4833
  "@$ui5.node.parent" : (bCreateRoot ? undefined : "Foo('42')"),
4597
4834
  bar : "~bar~",
@@ -4620,6 +4857,9 @@ make root = ${bMakeRoot}`;
4620
4857
  // Note: #calculateKeyPredicateRH doesn't know better :-(
4621
4858
  oEntityData["@$ui5.node.level"] = 1;
4622
4859
  }
4860
+ that.mock(oCache.oTreeState).expects("setOutOfPlace")
4861
+ .withExactArgs(sinon.match.same(oEntityData),
4862
+ bCreateRoot ? undefined : sinon.match.same(oParentNode));
4623
4863
  const iCallCount = bInFirstLevel && iExpandTo > 1 ? 1 : 0;
4624
4864
  const oRankExpectation = that.mock(oCache).expects("requestRank")
4625
4865
  .exactly(iCallCount)
@@ -5287,4 +5527,258 @@ make root = ${bMakeRoot}`;
5287
5527
 
5288
5528
  assert.notOk("@$ui5.node.isExpanded" in oElement);
5289
5529
  });
5530
+
5531
+ //*********************************************************************************************
5532
+ QUnit.test("requestOutOfPlaceNodes", function (assert) {
5533
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5534
+ hierarchyQualifier : "X"
5535
+ });
5536
+ oCache.bUnifiedCache = true;
5537
+ const oGroupLock = {getUnlockedCopy : mustBeMocked};
5538
+
5539
+ const aOutOfPlaceByParent = ["~outOfPlace1~", "~outOfPlace2~"];
5540
+ this.mock(oCache.oTreeState).expects("getOutOfPlaceGroupedByParent").withExactArgs()
5541
+ .returns(aOutOfPlaceByParent);
5542
+ this.mock(oCache.oFirstLevel).expects("getQueryOptions").withExactArgs()
5543
+ .returns("~firstLevelQueryOptions~");
5544
+ const oAggregationHelperMock = this.mock(_AggregationHelper);
5545
+ oAggregationHelperMock.expects("getQueryOptionsForOutOfPlaceNodesRank")
5546
+ .withExactArgs(sinon.match.same(aOutOfPlaceByParent),
5547
+ sinon.match.same(oCache.oAggregation), "~firstLevelQueryOptions~")
5548
+ .returns("~queryOptions0~");
5549
+ const oRequestorMock = this.mock(oCache.oRequestor);
5550
+ oRequestorMock.expects("buildQueryString")
5551
+ .withExactArgs("/Foo", "~queryOptions0~", false, true).returns("~query0~");
5552
+ const oGroupLockMock = this.mock(oGroupLock);
5553
+ oGroupLockMock.expects("getUnlockedCopy").withExactArgs().returns("~oGroupLock0~");
5554
+ oRequestorMock.expects("request").withExactArgs("GET", "Foo~query0~", "~oGroupLock0~")
5555
+ .returns("~request0~");
5556
+ // outOfPlace1
5557
+ oAggregationHelperMock.expects("getQueryOptionsForOutOfPlaceNodesData")
5558
+ .withExactArgs("~outOfPlace1~", sinon.match.same(oCache.oAggregation),
5559
+ sinon.match.same(oCache.mQueryOptions))
5560
+ .returns("~queryOptions1~");
5561
+ oRequestorMock.expects("buildQueryString")
5562
+ .withExactArgs("/Foo", "~queryOptions1~", false, true).returns("~query1~");
5563
+ oGroupLockMock.expects("getUnlockedCopy").withExactArgs().returns("~oGroupLock1~");
5564
+ oRequestorMock.expects("request").withExactArgs("GET", "Foo~query1~", "~oGroupLock1~")
5565
+ .returns("~request1~");
5566
+ // outOfPlace2
5567
+ oAggregationHelperMock.expects("getQueryOptionsForOutOfPlaceNodesData")
5568
+ .withExactArgs("~outOfPlace2~", sinon.match.same(oCache.oAggregation),
5569
+ sinon.match.same(oCache.mQueryOptions))
5570
+ .returns("~queryOptions2~");
5571
+ oRequestorMock.expects("buildQueryString")
5572
+ .withExactArgs("/Foo", "~queryOptions2~", false, true).returns("~query2~");
5573
+ oGroupLockMock.expects("getUnlockedCopy").withExactArgs().returns("~oGroupLock2~");
5574
+ oRequestorMock.expects("request").withExactArgs("GET", "Foo~query2~", "~oGroupLock2~")
5575
+ .returns("~request2~");
5576
+
5577
+ // code under test
5578
+ assert.deepEqual(oCache.requestOutOfPlaceNodes(oGroupLock),
5579
+ ["~request0~", "~request1~", "~request2~"]);
5580
+ });
5581
+
5582
+ //*********************************************************************************************
5583
+ QUnit.test("requestOutOfPlaceNodes: no out of place handling needed", function (assert) {
5584
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5585
+ hierarchyQualifier : "X"
5586
+ });
5587
+
5588
+ this.mock(oCache.oTreeState).expects("getOutOfPlaceGroupedByParent")
5589
+ .withExactArgs().returns([]);
5590
+
5591
+ // code under test
5592
+ assert.deepEqual(oCache.requestOutOfPlaceNodes("~oGroupLock~"), []);
5593
+ });
5594
+
5595
+ //*********************************************************************************************
5596
+ QUnit.test("handleOutOfPlaceNodes", function () {
5597
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5598
+ hierarchyQualifier : "X",
5599
+ $LimitedRank : "~LimitedRank~"
5600
+ });
5601
+ oCache.aElements.$byPredicate = {
5602
+ "~predicate2~" : "~node2~",
5603
+ "~predicate4~" : "~node4~"
5604
+ };
5605
+ const oRankResult = {
5606
+ value : ["~parent1RankResult~", "~node2RankResult~", "~node3RankResult~",
5607
+ "~node1RankResult~", "~parent2RankResult~", "~node4RankResult~"]
5608
+ };
5609
+ const oOutOfPlaceNodeResult1 = {
5610
+ value : ["~node1Data~", "~node2Data~"]
5611
+ };
5612
+ const oOutOfPlaceNodeResult2 = {
5613
+ value : ["~node3Data~"]
5614
+ };
5615
+ const oOutOfPlaceNodeResult3 = {
5616
+ value : ["~node4Data~"]
5617
+ };
5618
+ const oCacheMock = this.mock(oCache);
5619
+ const oFirstLevelMock = this.mock(oCache.oFirstLevel);
5620
+ const oHelperMock = this.mock(_Helper);
5621
+
5622
+ oCacheMock.expects("getTypes").atLeast(1).withExactArgs().returns("~types~");
5623
+ // oRankResult
5624
+ oHelperMock.expects("getKeyPredicate")
5625
+ .withExactArgs("~parent1RankResult~", "/Foo", "~types~")
5626
+ .returns("~parent1Predicate~");
5627
+ oHelperMock.expects("getKeyPredicate")
5628
+ .withExactArgs("~node2RankResult~", "/Foo", "~types~")
5629
+ .returns("~predicate2~");
5630
+ oHelperMock.expects("getKeyPredicate")
5631
+ .withExactArgs("~node3RankResult~", "/Foo", "~types~")
5632
+ .returns("~predicate3~");
5633
+ oHelperMock.expects("getKeyPredicate")
5634
+ .withExactArgs("~node1RankResult~", "/Foo", "~types~")
5635
+ .returns("~predicate1~");
5636
+ oHelperMock.expects("getKeyPredicate")
5637
+ .withExactArgs("~parent2RankResult~", "/Foo", "~types~")
5638
+ .returns("~parent2Predicate~");
5639
+ oHelperMock.expects("getKeyPredicate")
5640
+ .withExactArgs("~node4RankResult~", "/Foo", "~types~")
5641
+ .returns("~predicate4~");
5642
+ // "~node1Data~"
5643
+ oHelperMock.expects("getKeyPredicate").withExactArgs("~node1Data~", "/Foo", "~types~")
5644
+ .returns("~predicate1~");
5645
+ oHelperMock.expects("merge").withExactArgs("~node1Data~", "~node1RankResult~");
5646
+ oHelperMock.expects("drillDown").withExactArgs("~node1Data~", "~LimitedRank~").returns("4");
5647
+ oFirstLevelMock.expects("calculateKeyPredicate")
5648
+ .withExactArgs("~node1Data~", "~types~", "/Foo");
5649
+ oCacheMock.expects("insertNode").withExactArgs("~node1Data~", 4)
5650
+ .callsFake(function () {
5651
+ oCache.aElements.$byPredicate["~predicate1~"] = "~node1Data~";
5652
+ });
5653
+ // "~node2Data~"
5654
+ oHelperMock.expects("getKeyPredicate").withExactArgs("~node2Data~", "/Foo", "~types~")
5655
+ .returns("~predicate2~");
5656
+ // "~node3Data~"
5657
+ oHelperMock.expects("getKeyPredicate").withExactArgs("~node3Data~", "/Foo", "~types~")
5658
+ .returns("~predicate3~");
5659
+ oHelperMock.expects("merge").withExactArgs("~node3Data~", "~node3RankResult~");
5660
+ oHelperMock.expects("drillDown").withExactArgs("~node3Data~", "~LimitedRank~").returns("5");
5661
+ oFirstLevelMock.expects("calculateKeyPredicate")
5662
+ .withExactArgs("~node3Data~", "~types~", "/Foo");
5663
+ oCacheMock.expects("insertNode").withExactArgs("~node3Data~", 5)
5664
+ .callsFake(function () {
5665
+ oCache.aElements.$byPredicate["~predicate3~"] = "~node3Data~";
5666
+ });
5667
+ // "~node4Data~"
5668
+ oHelperMock.expects("getKeyPredicate").withExactArgs("~node4Data~", "/Foo", "~types~")
5669
+ .returns("~predicate4~");
5670
+ // move nodes
5671
+ this.mock(oCache.oTreeState).expects("getOutOfPlaceGroupedByParent").withExactArgs()
5672
+ .returns([{
5673
+ nodePredicates : "~parent1NodePredicates~",
5674
+ parentPredicate : "~parent1Predicate~"
5675
+ }, {
5676
+ nodePredicates : "~parent2NodePredicates~",
5677
+ parentPredicate : "~parent2Predicate~"
5678
+ }, {
5679
+ nodePredicates : "~rootNodePredicates~"
5680
+ }]);
5681
+ oHelperMock.expects("drillDown").withExactArgs("~parent1RankResult~", "~LimitedRank~")
5682
+ .returns("42"); // doesn't really matter, but must be a number
5683
+ oCacheMock.expects("moveOutOfPlaceNodes").withExactArgs(42, "~parent1NodePredicates~");
5684
+ oHelperMock.expects("drillDown").withExactArgs("~parent2RankResult~", "~LimitedRank~")
5685
+ .returns("23"); // doesn't really matter, but must be a number
5686
+ oCacheMock.expects("moveOutOfPlaceNodes").withExactArgs(23, "~parent2NodePredicates~");
5687
+ oCacheMock.expects("moveOutOfPlaceNodes").withExactArgs(undefined, "~rootNodePredicates~");
5688
+
5689
+ // code under test
5690
+ oCache.handleOutOfPlaceNodes(
5691
+ [oRankResult, oOutOfPlaceNodeResult1, oOutOfPlaceNodeResult2, oOutOfPlaceNodeResult3]);
5692
+ });
5693
+
5694
+ //*********************************************************************************************
5695
+ QUnit.test("handleOutOfPlaceNodes: no out of place handling", function () {
5696
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5697
+ hierarchyQualifier : "X"
5698
+ });
5699
+
5700
+ this.mock(oCache.oFirstLevel).expects("calculateKeyPredicate").never();
5701
+ this.mock(oCache).expects("insertNode").never();
5702
+
5703
+ // code under test
5704
+ oCache.handleOutOfPlaceNodes([]);
5705
+ });
5706
+
5707
+ //*********************************************************************************************
5708
+ QUnit.test("insertNode: defaulting", function () {
5709
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5710
+ hierarchyQualifier : "X"
5711
+ });
5712
+ this.mock(oCache).expects("addElements")
5713
+ .withExactArgs("~oNode~", "~iRank~", sinon.match.same(oCache.oFirstLevel), "~iRank~");
5714
+ this.mock(oCache.oFirstLevel).expects("removeElement").withExactArgs("~iRank~");
5715
+ this.mock(oCache.oFirstLevel).expects("restoreElement").withExactArgs("~iRank~", "~oNode~");
5716
+
5717
+ // code under test
5718
+ oCache.insertNode("~oNode~", "~iRank~");
5719
+ });
5720
+
5721
+ //*********************************************************************************************
5722
+ QUnit.test("insertNode: index != rank", function () {
5723
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5724
+ hierarchyQualifier : "X"
5725
+ });
5726
+ this.mock(oCache).expects("addElements")
5727
+ .withExactArgs("~oNode~", "~iInsertIndex~", sinon.match.same(oCache.oFirstLevel),
5728
+ "~iRank~");
5729
+ this.mock(oCache.oFirstLevel).expects("removeElement").withExactArgs("~iRank~");
5730
+ this.mock(oCache.oFirstLevel).expects("restoreElement").withExactArgs("~iRank~", "~oNode~");
5731
+
5732
+ // code under test
5733
+ oCache.insertNode("~oNode~", "~iRank~", "~iInsertIndex~");
5734
+ });
5735
+
5736
+ //*********************************************************************************************
5737
+ QUnit.test("moveOutOfPlaceNodes: below parent", function (assert) {
5738
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5739
+ hierarchyQualifier : "X",
5740
+ $LimitedRank : "~LimitedRank~"
5741
+ });
5742
+ oCache.aElements = ["~foo~", "~parent~", "~node2~", "~bar~", "~node1~", "~node3~"];
5743
+ oCache.aElements.$byPredicate = {
5744
+ "~predicate1~" : "~node1~",
5745
+ "~predicate2~" : "~node2~",
5746
+ "~predicate3~" : "~node3~"
5747
+ };
5748
+
5749
+ const oHelperMock = this.mock(_Helper);
5750
+ oHelperMock.expects("getPrivateAnnotation").withExactArgs("~foo~", "rank")
5751
+ .returns(0);
5752
+ oHelperMock.expects("getPrivateAnnotation").withExactArgs("~parent~", "rank")
5753
+ .returns("~iParentRank~");
5754
+
5755
+ // code under test
5756
+ oCache.moveOutOfPlaceNodes("~iParentRank~",
5757
+ // the order is important: node2 is not moved, moving node3 shifts the location of
5758
+ // node1 which must be searched again (aElements.indexOf(...))
5759
+ ["~predicate2~", "~predicate3~", "~predicate1~"]);
5760
+
5761
+ assert.deepEqual(oCache.aElements,
5762
+ ["~foo~", "~parent~", "~node1~", "~node3~", "~node2~", "~bar~"]);
5763
+ });
5764
+
5765
+ //*********************************************************************************************
5766
+ QUnit.test("moveOutOfPlaceNodes: root nodes", function (assert) {
5767
+ const oCache = _AggregationCache.create(this.oRequestor, "Foo", "", {}, {
5768
+ hierarchyQualifier : "X",
5769
+ $LimitedRank : "~LimitedRank~"
5770
+ });
5771
+ oCache.aElements = ["~foo~", "~node2~", "~bar~", "~node1~", "~baz~"];
5772
+ oCache.aElements.$byPredicate = {
5773
+ "~predicate1~" : "~node1~",
5774
+ "~predicate2~" : "~node2~"
5775
+ };
5776
+
5777
+ this.mock(_Helper).expects("drillDown").never();
5778
+
5779
+ // code under test
5780
+ oCache.moveOutOfPlaceNodes(undefined, ["~predicate1~", "~predicate2~"]);
5781
+
5782
+ assert.deepEqual(oCache.aElements, ["~node2~", "~node1~", "~foo~", "~bar~", "~baz~"]);
5783
+ });
5290
5784
  });