@openui5/sap.ui.core 1.121.4 → 1.121.5

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 (324) hide show
  1. package/package.json +1 -1
  2. package/src/jquery.sap.global.js +1 -1
  3. package/src/jquery.sap.properties.js +1 -1
  4. package/src/jquery.sap.resources.js +1 -1
  5. package/src/jquery.sap.script.js +1 -1
  6. package/src/jquery.sap.storage.js +3 -3
  7. package/src/sap/base/Event.js +1 -1
  8. package/src/sap/base/Eventing.js +1 -1
  9. package/src/sap/base/config.js +1 -1
  10. package/src/sap/base/i18n/LanguageTag.js +1 -1
  11. package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
  12. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  13. package/src/sap/base/util/restricted/_castArray.js +1 -1
  14. package/src/sap/base/util/restricted/_compact.js +1 -1
  15. package/src/sap/base/util/restricted/_curry.js +1 -1
  16. package/src/sap/base/util/restricted/_debounce.js +1 -1
  17. package/src/sap/base/util/restricted/_difference.js +1 -1
  18. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  19. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  21. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  22. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  23. package/src/sap/base/util/restricted/_flatten.js +1 -1
  24. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  25. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  26. package/src/sap/base/util/restricted/_intersection.js +1 -1
  27. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  28. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  29. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  30. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  31. package/src/sap/base/util/restricted/_isNil.js +1 -1
  32. package/src/sap/base/util/restricted/_max.js +1 -1
  33. package/src/sap/base/util/restricted/_merge.js +1 -1
  34. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  35. package/src/sap/base/util/restricted/_min.js +1 -1
  36. package/src/sap/base/util/restricted/_omit.js +1 -1
  37. package/src/sap/base/util/restricted/_pick.js +1 -1
  38. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  39. package/src/sap/base/util/restricted/_throttle.js +1 -1
  40. package/src/sap/base/util/restricted/_toArray.js +1 -1
  41. package/src/sap/base/util/restricted/_union.js +1 -1
  42. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  43. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  44. package/src/sap/base/util/restricted/_uniq.js +1 -1
  45. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  46. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  47. package/src/sap/base/util/restricted/_without.js +1 -1
  48. package/src/sap/base/util/restricted/_xor.js +1 -1
  49. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  50. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  51. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  52. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  53. package/src/sap/ui/Device.js +3 -3
  54. package/src/sap/ui/Global.js +4 -4
  55. package/src/sap/ui/base/Event.js +1 -1
  56. package/src/sap/ui/base/EventProvider.js +1 -1
  57. package/src/sap/ui/base/Interface.js +1 -1
  58. package/src/sap/ui/base/ManagedObject.js +1 -1
  59. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  60. package/src/sap/ui/base/Metadata.js +1 -1
  61. package/src/sap/ui/base/Object.js +1 -1
  62. package/src/sap/ui/base/ObjectPool.js +1 -1
  63. package/src/sap/ui/core/.library +1 -1
  64. package/src/sap/ui/core/BusyIndicator.js +1 -1
  65. package/src/sap/ui/core/Component.js +1 -1
  66. package/src/sap/ui/core/ComponentContainer.js +1 -1
  67. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  68. package/src/sap/ui/core/ComponentSupport.js +1 -1
  69. package/src/sap/ui/core/Configuration.js +1 -1
  70. package/src/sap/ui/core/Control.js +1 -1
  71. package/src/sap/ui/core/Core.js +1 -1
  72. package/src/sap/ui/core/CustomData.js +1 -1
  73. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  74. package/src/sap/ui/core/Element.js +1 -1
  75. package/src/sap/ui/core/ElementMetadata.js +1 -1
  76. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  77. package/src/sap/ui/core/EventBus.js +1 -1
  78. package/src/sap/ui/core/Fragment.js +1 -1
  79. package/src/sap/ui/core/HTML.js +1 -1
  80. package/src/sap/ui/core/History.js +1 -1
  81. package/src/sap/ui/core/Icon.js +1 -1
  82. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  83. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  84. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  85. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  86. package/src/sap/ui/core/InvisibleText.js +1 -1
  87. package/src/sap/ui/core/Item.js +1 -1
  88. package/src/sap/ui/core/LabelEnablement.js +1 -1
  89. package/src/sap/ui/core/LayoutData.js +1 -1
  90. package/src/sap/ui/core/ListItem.js +1 -1
  91. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  92. package/src/sap/ui/core/Locale.js +1 -1
  93. package/src/sap/ui/core/LocaleData.js +1 -1
  94. package/src/sap/ui/core/Manifest.js +1 -1
  95. package/src/sap/ui/core/Message.js +1 -1
  96. package/src/sap/ui/core/RenderManager.js +1 -1
  97. package/src/sap/ui/core/Renderer.js +1 -1
  98. package/src/sap/ui/core/ResizeHandler.js +1 -1
  99. package/src/sap/ui/core/ScrollBar.js +1 -1
  100. package/src/sap/ui/core/SeparatorItem.js +1 -1
  101. package/src/sap/ui/core/Title.js +1 -1
  102. package/src/sap/ui/core/TooltipBase.js +1 -1
  103. package/src/sap/ui/core/UIArea.js +1 -1
  104. package/src/sap/ui/core/UIComponent.js +1 -1
  105. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  106. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  107. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  108. package/src/sap/ui/core/XMLComposite.js +1 -1
  109. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  110. package/src/sap/ui/core/date/UI5Date.js +1 -1
  111. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  112. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  113. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  114. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  115. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  116. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  117. package/src/sap/ui/core/format/DateFormat.js +3 -3
  118. package/src/sap/ui/core/format/FormatUtils.js +1 -1
  119. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  120. package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
  121. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  122. package/src/sap/ui/core/library.js +3 -3
  123. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  124. package/src/sap/ui/core/message/Message.js +1 -1
  125. package/src/sap/ui/core/message/MessageManager.js +1 -1
  126. package/src/sap/ui/core/message/MessageParser.js +1 -1
  127. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  128. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  129. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  130. package/src/sap/ui/core/mvc/JSView.js +1 -1
  131. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  132. package/src/sap/ui/core/mvc/View.js +1 -1
  133. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  134. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  135. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  136. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  137. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  138. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  139. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  140. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  141. package/src/sap/ui/core/service/Service.js +1 -1
  142. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  143. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  144. package/src/sap/ui/core/support/Plugin.js +1 -1
  145. package/src/sap/ui/core/support/Support.js +1 -1
  146. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  147. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  148. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  149. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  150. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  151. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  152. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  153. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  154. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  155. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  156. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  157. package/src/sap/ui/core/tmpl/Template.js +1 -1
  158. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  159. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  160. package/src/sap/ui/core/util/Export.js +1 -1
  161. package/src/sap/ui/core/util/ExportCell.js +1 -1
  162. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  163. package/src/sap/ui/core/util/ExportRow.js +1 -1
  164. package/src/sap/ui/core/util/ExportType.js +1 -1
  165. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  166. package/src/sap/ui/core/util/File.js +1 -1
  167. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  168. package/src/sap/ui/core/util/MockServer.js +1 -1
  169. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  170. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  171. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  172. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  173. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  174. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  175. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  176. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  177. package/src/sap/ui/core/webc/WebComponent.js +1 -1
  178. package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
  179. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  180. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  181. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  182. package/src/sap/ui/debug/ControlTree.js +1 -1
  183. package/src/sap/ui/debug/DebugEnv.js +1 -1
  184. package/src/sap/ui/debug/PropertyList.js +1 -1
  185. package/src/sap/ui/model/ClientModel.js +1 -1
  186. package/src/sap/ui/model/CompositeDataState.js +1 -1
  187. package/src/sap/ui/model/CompositeType.js +1 -1
  188. package/src/sap/ui/model/DataState.js +1 -1
  189. package/src/sap/ui/model/MetaModel.js +1 -1
  190. package/src/sap/ui/model/Model.js +1 -1
  191. package/src/sap/ui/model/SelectionModel.js +1 -1
  192. package/src/sap/ui/model/SimpleType.js +1 -1
  193. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  194. package/src/sap/ui/model/Type.js +1 -1
  195. package/src/sap/ui/model/json/JSONModel.js +1 -1
  196. package/src/sap/ui/model/message/MessageModel.js +1 -1
  197. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  198. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  199. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  200. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  201. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  202. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  203. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  204. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  205. package/src/sap/ui/model/odata/type/Date.js +1 -1
  206. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  207. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  208. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  209. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  210. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  211. package/src/sap/ui/model/odata/type/Double.js +1 -1
  212. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  213. package/src/sap/ui/model/odata/type/Int.js +1 -1
  214. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  215. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  216. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  217. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  218. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  219. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  220. package/src/sap/ui/model/odata/type/Single.js +1 -1
  221. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  222. package/src/sap/ui/model/odata/type/String.js +1 -1
  223. package/src/sap/ui/model/odata/type/Time.js +1 -1
  224. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  225. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  226. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  227. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  228. package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
  229. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
  230. package/src/sap/ui/model/odata/v4/Context.js +1 -1
  231. package/src/sap/ui/model/odata/v4/ODataBinding.js +27 -37
  232. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +8 -20
  233. package/src/sap/ui/model/odata/v4/ODataListBinding.js +3 -2
  234. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
  235. package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
  236. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +0 -1
  237. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -13
  238. package/src/sap/ui/model/odata/v4/lib/_Cache.js +3 -19
  239. package/src/sap/ui/model/odata/v4/lib/_Helper.js +18 -0
  240. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  241. package/src/sap/ui/model/type/Boolean.js +1 -1
  242. package/src/sap/ui/model/type/Currency.js +6 -3
  243. package/src/sap/ui/model/type/Date.js +1 -1
  244. package/src/sap/ui/model/type/DateInterval.js +1 -1
  245. package/src/sap/ui/model/type/DateTime.js +1 -1
  246. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  247. package/src/sap/ui/model/type/FileSize.js +1 -1
  248. package/src/sap/ui/model/type/Float.js +1 -1
  249. package/src/sap/ui/model/type/Integer.js +1 -1
  250. package/src/sap/ui/model/type/String.js +1 -1
  251. package/src/sap/ui/model/type/Time.js +1 -1
  252. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  253. package/src/sap/ui/model/type/Unit.js +6 -3
  254. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  255. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  256. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  257. package/src/sap/ui/test/generic/TestBase.js +1 -1
  258. package/src/sap/ui/util/Storage.js +1 -1
  259. package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
  260. package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
  261. package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
  262. package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
  263. package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
  264. package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
  265. package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
  266. package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
  267. package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
  268. package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
  269. package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
  270. package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
  271. package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
  272. package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
  273. package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
  274. package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
  275. package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
  276. package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
  277. package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
  278. package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
  279. package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
  280. package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
  281. package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
  282. package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
  283. package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
  284. package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
  285. package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
  286. package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
  287. package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
  288. package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
  289. package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
  290. package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
  291. package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
  292. package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
  293. package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
  294. package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
  295. package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
  296. package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
  297. package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
  298. package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
  299. package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
  300. package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
  301. package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
  302. package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
  303. package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
  304. package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
  305. package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
  306. package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
  307. package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
  308. package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
  309. package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
  310. package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
  311. package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
  312. package/test/sap/ui/core/qunit/json/JSONModel.qunit.js +117 -85
  313. package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +13 -7
  314. package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +17 -70
  315. package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +19 -42
  316. package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +13 -5
  317. package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +30 -12
  318. package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +0 -1
  319. package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +0 -18
  320. package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +42 -36
  321. package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +30 -0
  322. package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +51 -22
  323. package/test/sap/ui/core/qunit/types/Types.qunit.js +35 -6
  324. package/test/sap/ui/core/relnotes/changes-1.121.json +20 -0
@@ -12,65 +12,52 @@ sap.ui.define([
12
12
  ], function (fakeService, Label, List, ListItem, UI5Date, VerticalLayout, Context, JSONModel, jQuery) {
13
13
  "use strict";
14
14
 
15
- var oLabel,
16
- oLayout,
17
- oModel,
18
- oModelChild,
19
- aTestData,
20
- aTestDataChild;
21
-
22
- function cleanUp(){
23
- oLabel.destroy();
24
- }
25
-
26
- function setup(){
27
- aTestData = {
28
- teamMembers:[
29
- {firstName:"Andreas", lastName:"Klark"},
30
- {firstName:"Peter", lastName:"Miller"},
31
- {firstName:"Gina", lastName:"Rush"},
32
- {firstName:"Steave", lastName:"Ander"},
33
- {firstName:"Michael", lastName:"Spring"},
34
- {firstName:"Marc", lastName:"Green"},
35
- {firstName:"Frank", lastName:"Wallace"}
36
- ],
37
- additionalData:{
38
- level1:{
39
- text:"level1",
40
- level2: {
41
- text:"level2"
42
- }
43
- }
44
- },
45
- rootproperty: "test1"
46
- };
47
-
48
- aTestDataChild = {
49
- pets:[
50
- {type:"ape", age:"1"},
51
- {type:"bird", age:"2"},
52
- {type:"cat", age:"3"},
53
- {type:"fish", age:"4"},
54
- {type:"dog", age:"5"}
55
- ]
56
- };
57
-
58
- oModel = new JSONModel();
59
- oModel.setData(aTestData);
60
- oModelChild = new JSONModel();
61
- oModelChild.setData(aTestDataChild);
62
- oLayout = new VerticalLayout();
63
- oLabel = new Label("myLabel");
64
- oLabel.setText("testText");
65
- oLabel.setModel(oModel);
66
- }
67
-
68
15
  QUnit.module("sap.ui.model.json.JSONModel", {
69
- afterEach: function() {
70
- cleanUp();
16
+ afterEach: function () {
17
+ if (this.oModel) {
18
+ this.oModel.destroy();
19
+ }
20
+ if (this.oLabel) {
21
+ this.oLabel.destroy();
22
+ }
71
23
  },
72
- beforeEach: function() {
73
- setup();
24
+ /**
25
+ * Gets the default model and a label having the model set as default model.
26
+ * @returns {Object<sap.m.Label|sap.ui.model.json.JSONModel>}
27
+ * An object with the properties "oModel" and "oLabel" containing the created model and label
28
+ */
29
+ createModelAndLabel() {
30
+ const oModel = this.createModel();
31
+ const oLabel = new Label({text: "testText"});
32
+ oLabel.setModel(oModel);
33
+ this.oLabel = oLabel;
34
+
35
+ return {oLabel, oModel};
36
+ },
37
+ /**
38
+ * Gets the default JSON model.
39
+ * @returns {sap.ui.model.json.JSONModel} The model
40
+ */
41
+ createModel() {
42
+ this.oModel = new JSONModel({
43
+ additionalData: {
44
+ level1: {
45
+ text: "level1",
46
+ level2: {text: "level2"}
47
+ }
48
+ },
49
+ rootproperty: "test1",
50
+ teamMembers: [
51
+ {firstName: "Andreas", lastName: "Klark"},
52
+ {firstName: "Peter", lastName: "Miller"},
53
+ {firstName: "Gina", lastName: "Rush"},
54
+ {firstName: "Steave", lastName: "Ander"},
55
+ {firstName: "Michael", lastName: "Spring"},
56
+ {firstName: "Marc", lastName: "Green"},
57
+ {firstName: "Frank", lastName: "Wallace"}
58
+ ]
59
+ });
60
+ return this.oModel;
74
61
  }
75
62
  });
76
63
 
@@ -94,6 +81,7 @@ sap.ui.define([
94
81
  oModel.setData(arr1);
95
82
  oModel.setData(arr2, true);
96
83
  assert.deepEqual(oModel.getData(), arrMerged, "setData array with merge");
84
+ oModel.destroy();
97
85
  });
98
86
 
99
87
  QUnit.test("test model observation", function(assert) {
@@ -133,7 +121,6 @@ sap.ui.define([
133
121
  bArrName = false,
134
122
  iChangeCount = 0;
135
123
 
136
-
137
124
  oString.attachChange(function(){bString = true; iChangeCount++;});
138
125
  oNumber.attachChange(function(){bNumber = true; iChangeCount++;});
139
126
  oBool.attachChange(function(){bBool = true; iChangeCount++;});
@@ -166,9 +153,14 @@ sap.ui.define([
166
153
  assert.equal(oBool.getValue(), false, "Boolean new value");
167
154
  assert.ok(bBool, "Boolean change event fired");
168
155
 
169
- assert.equal(oDate.getValue(), oData.date, "Date old value");
170
- oData.date = UI5Date.getInstance();
171
- assert.equal(oDate.getValue(), oData.date, "Date new value");
156
+ const oModelValue = oData.date;
157
+ assert.strictEqual(oDate.getValue(), oModelValue, "Binding and model values are same");
158
+ assert.strictEqual(oModelValue.getFullYear(), 2022, "Year of old model value is 2022");
159
+ const oNewModelValue = UI5Date.getInstance(2024, 1, 3);
160
+ oData.date = oNewModelValue;
161
+ assert.strictEqual(oData.date, oNewModelValue, "Model value: " + oData.date + ", expected: " + oNewModelValue);
162
+ assert.strictEqual(oDate.getValue(), oNewModelValue,
163
+ "Binding value: " + oDate.getValue() + ", expected: " + oNewModelValue);
172
164
  assert.ok(bDate, "Date change event fired");
173
165
 
174
166
  assert.equal(oObj.getValue(), oData.obj, "Object old value");
@@ -188,10 +180,11 @@ sap.ui.define([
188
180
  assert.ok(bArrName, "Array name change event fired");
189
181
 
190
182
  assert.equal(iChangeCount, 8, "All 8 change handlers have been called once");
191
-
183
+ oModel.destroy();
192
184
  });
193
185
 
194
186
  QUnit.test("test model getProperty", function(assert) {
187
+ const oModel = this.createModel();
195
188
  var value = oModel.getProperty("/teamMembers/6/lastName");
196
189
  assert.equal(value, "Wallace", "model value");
197
190
  value = oModel.getProperty("/rootproperty");
@@ -199,6 +192,7 @@ sap.ui.define([
199
192
  });
200
193
 
201
194
  QUnit.test("test model getProperty with context", function(assert) {
195
+ const oModel = this.createModel();
202
196
  var oContext = oModel.createBindingContext("/teamMembers");
203
197
  var value = oModel.getProperty("6/lastName", oContext);
204
198
  assert.equal(value, "Wallace", "model value");
@@ -207,6 +201,7 @@ sap.ui.define([
207
201
  });
208
202
 
209
203
  QUnit.test("test model setProperty", function(assert) {
204
+ const oModel = this.createModel();
210
205
  oModel.setProperty("/teamMembers/4/lastName", "Jackson");
211
206
  var value = oModel.getProperty("/teamMembers/4/lastName");
212
207
  assert.equal(value, "Jackson", "model value");
@@ -220,9 +215,11 @@ sap.ui.define([
220
215
  oTest = {b:2};
221
216
  oModel.setProperty("/", oTest);
222
217
  assert.equal(oModel.getData(), oTest, "model data changed");
218
+ oModel.destroy();
223
219
  });
224
220
 
225
221
  QUnit.test("test model setProperty with context", function(assert) {
222
+ const oModel = this.createModel();
226
223
  var oContext = oModel.createBindingContext("/teamMembers");
227
224
  oModel.setProperty("4/lastName", "Smith", oContext);
228
225
  var value = oModel.getProperty("/teamMembers/4/lastName");
@@ -233,12 +230,14 @@ sap.ui.define([
233
230
  });
234
231
 
235
232
  QUnit.test("test getProperty on label", function(assert) {
233
+ const {oLabel} = this.createModelAndLabel();
236
234
  assert.equal(oLabel.getText(),"testText", "old text value");
237
235
  oLabel.bindProperty("text", "/teamMembers/4/firstName");
238
236
  assert.equal(oLabel.getText(), "Michael", "text value from model");
239
237
  });
240
238
 
241
239
  QUnit.test("test model setProperty onlabel", function(assert) {
240
+ const {oModel, oLabel} = this.createModelAndLabel();
242
241
  oLabel.setText("test");
243
242
  assert.equal(oLabel.getText(),"test", "old text value");
244
243
  oLabel.bindProperty("text", "/teamMembers/1/firstName");
@@ -249,12 +248,14 @@ sap.ui.define([
249
248
  });
250
249
 
251
250
  QUnit.test("test model setProperty with invalid bindingContext and relative path", function(assert) {
251
+ const oModel = this.createModel();
252
252
  var oContext = oModel.createBindingContext("/teamMembers/HorstDerGrosse");
253
253
  oModel.setProperty("firstName", "Peter", oContext);
254
254
  assert.expect(0);
255
255
  });
256
256
 
257
257
  QUnit.test("test model setProperty onlabel with bindingContext and relative path", function(assert) {
258
+ const {oModel, oLabel} = this.createModelAndLabel();
258
259
  var oContext = oModel.createBindingContext("/teamMembers");
259
260
  oLabel.setBindingContext(oContext);
260
261
  oLabel.bindProperty("text", "1/firstName");
@@ -265,6 +266,7 @@ sap.ui.define([
265
266
  });
266
267
  /** @deprecated As of version 1.88.0, reason Model.prototype.setLegacySyntax */
267
268
  QUnit.test("test model setProperty onlabel with bindingContext and relative path (legacySyntax = true)", function(assert) {
269
+ const {oModel, oLabel} = this.createModelAndLabel();
268
270
  oModel.setLegacySyntax(true);
269
271
  var oContext = oModel.createBindingContext("/teamMembers");
270
272
  oLabel.setBindingContext(oContext);
@@ -277,6 +279,7 @@ sap.ui.define([
277
279
  });
278
280
  /** @deprecated As of version 1.88.0, reason Model.prototype.setLegacySyntax */
279
281
  QUnit.test("test model setProperty onlabel without bindingContext and relative path (legacySyntax = true)", function(assert) {
282
+ const {oModel, oLabel} = this.createModelAndLabel();
280
283
  oModel.setLegacySyntax(true);
281
284
  oLabel.setBindingContext(undefined);
282
285
  oLabel.bindProperty("text", "teamMembers/1/firstName");
@@ -288,6 +291,7 @@ sap.ui.define([
288
291
  });
289
292
  /** @deprecated As of version 1.88.0, reason Model.prototype.setLegacySyntax */
290
293
  QUnit.test("test model setProperty onlabel with bindingContext and absolute path (legacySyntax = true)", function(assert) {
294
+ const {oModel, oLabel} = this.createModelAndLabel();
291
295
  oModel.setLegacySyntax(true);
292
296
  var oContext = oModel.createBindingContext("/teamMembers/HorstDerGrosse");
293
297
  oLabel.setBindingContext(oContext);
@@ -300,6 +304,7 @@ sap.ui.define([
300
304
  });
301
305
 
302
306
  QUnit.test("test model setProperty onlabel with bindingContext and absolute path", function(assert) {
307
+ const {oModel, oLabel} = this.createModelAndLabel();
303
308
  var oContext = oModel.createBindingContext("/teamMembers/HorstDerGrosse");
304
309
  oLabel.setBindingContext(oContext);
305
310
  oLabel.bindProperty("text", "/teamMembers/1/firstName");
@@ -310,25 +315,31 @@ sap.ui.define([
310
315
  });
311
316
 
312
317
  QUnit.test("test model getProperty with bindingContext and path = null", function(assert) {
318
+ const oModel = this.createModel();
313
319
  var oContext = oModel.createBindingContext("/teamMembers");
314
320
  assert.equal(oModel.getProperty(null, oContext).length, 7, "array of teammembers");
315
321
  });
316
322
 
317
-
318
323
  QUnit.test("test createBindingContext with two models", function(assert) {
319
- var oContext = oModel.createBindingContext("/teamMembers");
324
+ const oModelChild = new JSONModel({
325
+ pets: [{type: "ape", age: "1"}, {type: "bird", age: "2"}, {type: "cat", age: "3"}]
326
+ });
327
+ const oLayout = new VerticalLayout();
328
+ const {oModel, oLabel} = this.createModelAndLabel();
320
329
  oLayout.addContent(oLabel);
321
330
  oLayout.setModel(oModel);
322
- oLayout.setBindingContext(oContext);
331
+ oLayout.setBindingContext(oModel.createBindingContext("/teamMembers"));
323
332
  oLabel.setModel(oModelChild);
324
333
  oLabel.bindProperty("text", "/pets/0/type");
325
334
  assert.equal(oLabel.getText(), "ape", "text value from model");
326
335
  oModelChild.setProperty("/pets/0/type", "hamster");
327
336
  assert.equal(oLabel.getText(), "hamster", "new text value from model");
337
+ oLayout.destroy();
338
+ oModelChild.destroy();
328
339
  });
329
340
 
330
341
  QUnit.test("test model bindAggregation on List", function(assert) {
331
-
342
+ const oModel = this.createModel();
332
343
  var oLB = new List("myLb");
333
344
  oLB.setModel(oModel);
334
345
  var oItemTemplate = new ListItem();
@@ -339,16 +350,16 @@ sap.ui.define([
339
350
  var listItems = oLB.getItems();
340
351
  assert.equal(listItems.length, 7, "length of items");
341
352
 
353
+ const aTeamMembers = oModel.getObject("/teamMembers");
342
354
  listItems.forEach( function(item, i) {
343
- assert.equal(item.getTitle(), aTestData.teamMembers[i].firstName, "firstName");
344
- assert.equal(item.getDescription(), aTestData.teamMembers[i].lastName, "lastName");
355
+ assert.equal(item.getTitle(), aTeamMembers[i].firstName, "firstName");
356
+ assert.equal(item.getDescription(), aTeamMembers[i].lastName, "lastName");
345
357
  });
346
358
 
347
359
  oLB.destroy();
348
360
  });
349
361
 
350
362
  QUnit.test("test JSONModel JSON constructor", function(assert) {
351
-
352
363
  var testModel = new JSONModel({
353
364
  "foo": "The quick brown fox jumps over the lazy dog.",
354
365
  "bar": "ABCDEFG",
@@ -357,10 +368,11 @@ sap.ui.define([
357
368
  assert.equal(testModel.getProperty("/foo"), "The quick brown fox jumps over the lazy dog.");
358
369
  assert.equal(testModel.getProperty("/bar"), "ABCDEFG");
359
370
  assert.equal(testModel.getProperty("/baz")[1], 97);
360
-
371
+ testModel.destroy();
361
372
  });
362
373
 
363
374
  QUnit.test("test create binding context", function(assert) {
375
+ const oModel = this.createModel();
364
376
  var oContext;
365
377
  oContext = oModel.createBindingContext("/root/test/subtest/name");
366
378
  assert.equal(oContext.getPath(), "/root/test/subtest/name", "newContext returnValue");
@@ -383,9 +395,13 @@ sap.ui.define([
383
395
  });
384
396
 
385
397
  QUnit.test("test inheritance of context", function(assert) {
386
- var oContext;
398
+ const oModelChild = new JSONModel({
399
+ pets: [{type: "ape", age: "1"}, {type: "bird", age: "2"}, {type: "cat", age: "3"}]
400
+ });
401
+ const {oModel, oLabel} = this.createModelAndLabel();
387
402
  oLabel.setBindingContext(undefined);
388
- oContext = oModel.createBindingContext("/teamMembers");
403
+ let oContext = oModel.createBindingContext("/teamMembers");
404
+ const oLayout = new VerticalLayout();
389
405
  oLayout.setModel(oModel);
390
406
  oLayout.setBindingContext(oContext);
391
407
  oLabel.setModel(oModelChild);
@@ -397,6 +413,8 @@ sap.ui.define([
397
413
  assert.equal(oLabel.getBindingContext().getPath(), "/pets", "context set correctly");
398
414
  oModelChild.setProperty("0/type", "rat",oLabel.getBindingContext());
399
415
  assert.equal(oLabel.getText(), "rat", "new text value from model");
416
+ oLayout.destroy();
417
+ oModelChild.destroy();
400
418
  });
401
419
 
402
420
  QUnit.test("test JSONModel loadData: sync",function(assert) {
@@ -405,6 +423,7 @@ sap.ui.define([
405
423
  assert.equal(testModel.getProperty("/foo"), "The quick brown fox jumps over the lazy dog.");
406
424
  assert.equal(testModel.getProperty("/bar"), "ABCDEFG");
407
425
  assert.equal(testModel.getProperty("/baz")[1], 97);
426
+ testModel.destroy();
408
427
  });
409
428
 
410
429
  QUnit.test("test JSONModel loadData: sync - error",function(assert) {
@@ -431,6 +450,7 @@ sap.ui.define([
431
450
  });
432
451
 
433
452
  testModel.loadData("nothingThere.json", null, false);
453
+ testModel.destroy();
434
454
  });
435
455
 
436
456
  QUnit.test("test JSONModel loadData: async - error",function(assert) {
@@ -455,6 +475,7 @@ sap.ui.define([
455
475
  assert.equal(mParams.statusCode, 404);
456
476
  assert.ok(mParams.statusText);
457
477
  assert.ok(mParams.responseText);
478
+ testModel.destroy();
458
479
  done();
459
480
  });
460
481
 
@@ -469,6 +490,7 @@ sap.ui.define([
469
490
  assert.equal(testModel.getProperty("/foo"), "The quick brown fox jumps over the lazy dog.");
470
491
  assert.equal(testModel.getProperty("/bar"), "ABCDEFG");
471
492
  assert.equal(testModel.getProperty("/baz")[1], 97);
493
+ testModel.destroy();
472
494
  done(); // resume normal testing
473
495
  });
474
496
  });
@@ -481,6 +503,7 @@ sap.ui.define([
481
503
  assert.equal(testModel.getProperty("/foo"), "The quick brown fox jumps over the lazy dog.");
482
504
  assert.equal(testModel.getProperty("/bar"), "ABCDEFG");
483
505
  assert.equal(testModel.getProperty("/baz")[1], 97);
506
+ testModel.destroy();
484
507
  done(); // resume normal testing
485
508
  });
486
509
  });
@@ -503,6 +526,7 @@ sap.ui.define([
503
526
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
504
527
  assert.equal(testModel.getProperty("/baz")[1], 97);
505
528
  assert.equal(testModel.getProperty("/merged"), true);
529
+ testModel.destroy();
506
530
  done();
507
531
  }
508
532
  });
@@ -519,6 +543,7 @@ sap.ui.define([
519
543
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
520
544
  assert.equal(testModel.getProperty("/baz")[1], 97);
521
545
  assert.equal(testModel.getProperty("/merged"), true);
546
+ testModel.destroy();
522
547
  done();
523
548
  });
524
549
  });
@@ -550,6 +575,7 @@ sap.ui.define([
550
575
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
551
576
  assert.equal(testModel.getProperty("/baz")[1], 97);
552
577
  assert.equal(testModel.getProperty("/merged"), true);
578
+ testModel.destroy();
553
579
  done();
554
580
  });
555
581
  });
@@ -572,6 +598,7 @@ sap.ui.define([
572
598
  });
573
599
 
574
600
  Promise.all([pLoad1, pLoad2]).then(function() {
601
+ testModel.destroy();
575
602
  done();
576
603
  });
577
604
  });
@@ -594,6 +621,7 @@ sap.ui.define([
594
621
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
595
622
  assert.ok(!testModel.getProperty("/baz"), "deleted as no merge");
596
623
  assert.equal(testModel.getProperty("/merged"), true);
624
+ testModel.destroy();
597
625
  done();
598
626
  }
599
627
  });
@@ -609,6 +637,7 @@ sap.ui.define([
609
637
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
610
638
  assert.ok(!testModel.getProperty("/baz"), "deleted as no merge");
611
639
  assert.equal(testModel.getProperty("/merged"), true);
640
+ testModel.destroy();
612
641
  done();
613
642
  });
614
643
  });
@@ -642,6 +671,7 @@ sap.ui.define([
642
671
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
643
672
  assert.ok(!testModel.getProperty("/baz"), "deleted as no merge");
644
673
  assert.equal(testModel.getProperty("/merged"), true);
674
+ testModel.destroy();
645
675
  done();
646
676
  });
647
677
  });
@@ -670,6 +700,7 @@ sap.ui.define([
670
700
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
671
701
  assert.ok(!testModel.getProperty("/baz"), "deleted as no merge");
672
702
  assert.equal(testModel.getProperty("/merged"), true);
703
+ testModel.destroy();
673
704
  done();
674
705
  });
675
706
  });
@@ -685,6 +716,7 @@ sap.ui.define([
685
716
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
686
717
  assert.equal(testModel.getProperty("/baz")[1], 97);
687
718
  assert.equal(testModel.getProperty("/merged"), true);
719
+ testModel.destroy();
688
720
  done();
689
721
  });
690
722
  });
@@ -711,6 +743,7 @@ sap.ui.define([
711
743
  });
712
744
 
713
745
  Promise.all([p1, p2, p3]).then(function() {
746
+ testModel.destroy();
714
747
  done();
715
748
  });
716
749
  });
@@ -732,6 +765,7 @@ sap.ui.define([
732
765
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
733
766
  assert.equal(testModel.getProperty("/baz")[1], 97);
734
767
  assert.equal(testModel.getProperty("/merged"), true);
768
+ testModel.destroy();
735
769
  done();
736
770
  }
737
771
  });
@@ -755,6 +789,7 @@ sap.ui.define([
755
789
  assert.equal(testModel.getProperty("/bar"), "ABCDEFGHIJ");
756
790
  assert.equal(testModel.getProperty("/baz")[1], 97);
757
791
  assert.equal(testModel.getProperty("/merged"), true);
792
+ testModel.destroy();
758
793
  done();
759
794
  }
760
795
  });
@@ -767,6 +802,7 @@ sap.ui.define([
767
802
  assert.equal(testModel.getProperty("/foo"), "The quick brown fox jumps over the lazy dog.");
768
803
  assert.equal(testModel.getProperty("/bar"), "ABCDEFG");
769
804
  assert.equal(testModel.getProperty("/baz")[1], 97);
805
+ testModel.destroy();
770
806
  done(); // resume normal testing
771
807
  });
772
808
  });
@@ -817,6 +853,7 @@ sap.ui.define([
817
853
  assert.equal(aContexts[0].getPath(), "/array/0");
818
854
  assert.equal(aContexts[1].getPath(), "/array/1");
819
855
  assert.equal(aContexts[2].getPath(), "/array/2");
856
+ oModel.destroy();
820
857
  });
821
858
 
822
859
  QUnit.test("test JSON setJSON", function(assert) {
@@ -824,6 +861,7 @@ sap.ui.define([
824
861
  var sJSON = '{"name":"John"}';
825
862
  oModel.setJSON(sJSON,false);
826
863
  assert.equal(oModel.getProperty("/name"), "John" , "parse test");
864
+ oModel.destroy();
827
865
  });
828
866
 
829
867
  QUnit.test("test JSON setJSON error", function(assert) {
@@ -836,7 +874,7 @@ sap.ui.define([
836
874
  });
837
875
  oModel.setJSON(sJSON,false);
838
876
  assert.ok(error, "error occurred");
839
-
877
+ oModel.destroy();
840
878
  });
841
879
 
842
880
  QUnit.test("test JSON getJSON", function(assert) {
@@ -844,6 +882,7 @@ sap.ui.define([
844
882
  var sJSON = '{"name":"John"}';
845
883
  oModel.setJSON(sJSON,false);
846
884
  assert.equal(oModel.getJSON(), sJSON, "get JSON test");
885
+ oModel.destroy();
847
886
  });
848
887
 
849
888
  QUnit.test("test JSON getData", function(assert) {
@@ -851,10 +890,11 @@ sap.ui.define([
851
890
  var sJSON = '{"name":"John"}';
852
891
  oModel.setJSON(sJSON,false);
853
892
  assert.equal(oModel.getData().name, "John", "get Data test");
893
+ oModel.destroy();
854
894
  });
855
895
  /** @deprecated As of version 1.88.0, reason Model.prototype.setLegacySyntax */
856
896
  QUnit.test("test JSON compatible syntax", function(assert) {
857
- var oModel = new JSONModel(aTestData);
897
+ const oModel = this.createModel();
858
898
  oModel.setLegacySyntax(true);
859
899
  var value = oModel.getProperty("teamMembers/6/lastName");
860
900
  assert.equal(value, "Wallace", "model value");
@@ -867,7 +907,7 @@ sap.ui.define([
867
907
  });
868
908
  /** @deprecated As of version 1.88.0, reason Model.prototype.setLegacySyntax */
869
909
  QUnit.test("test JSON compatible syntax fail", function(assert) {
870
- var oModel = new JSONModel(aTestData);
910
+ const oModel = this.createModel();
871
911
  oModel.setLegacySyntax(false);
872
912
  var value = oModel.getProperty("teamMembers/6/lastName");
873
913
  assert.equal(value, undefined, "model value");
@@ -901,7 +941,6 @@ sap.ui.define([
901
941
  });
902
942
 
903
943
  QUnit.test("test JSONModel loadData after destroy", function(assert) {
904
-
905
944
  var spy = sinon.spy(jQuery, "ajax");
906
945
  var testModel = new JSONModel();
907
946
 
@@ -929,12 +968,10 @@ sap.ui.define([
929
968
 
930
969
  QUnit.test("bind Element", function(assert) {
931
970
  var oContext;
971
+ const {oModel, oLabel} = this.createModelAndLabel();
932
972
  oModel.createBindingContext("/additionalData", null, function(context){
933
973
  oContext = context;
934
974
  });
935
- var oLabel = new Label("myLabel2");
936
- oLabel.setModel(oModel);
937
- oLabel.setText("testText");
938
975
  oLabel.setBindingContext(oContext);
939
976
  oLabel.bindElement("level1");
940
977
  assert.equal(oLabel.getBindingContext().getPath(), "/additionalData/level1", "context should be considered for element binding");
@@ -944,17 +981,14 @@ sap.ui.define([
944
981
  assert.equal(oLabel.getText(), "level2", "text value from model");
945
982
  oLabel.unbindElement();
946
983
  assert.equal(oLabel.getText(), "", "text value from model");
947
- oLabel.destroy();
948
984
  });
949
985
 
950
986
  QUnit.test("bind Element", function(assert) {
951
987
  var oContext;
988
+ const {oModel, oLabel} = this.createModelAndLabel();
952
989
  oModel.createBindingContext("/additionalData", null, function(context){
953
990
  oContext = context;
954
991
  });
955
- var oLabel = new Label("myLabel2");
956
- oLabel.setModel(oModel);
957
- oLabel.setText("testText");
958
992
  oLabel.bindElement("level1");
959
993
  oLabel.setBindingContext(oContext);
960
994
  assert.equal(oLabel.getBindingContext().getPath(), "/additionalData/level1", "context should be considered for element binding");
@@ -964,7 +998,5 @@ sap.ui.define([
964
998
  assert.equal(oLabel.getText(), "level2", "text value from model");
965
999
  oLabel.unbindElement();
966
1000
  assert.equal(oLabel.getText(), "", "text value from model");
967
- oLabel.destroy();
968
1001
  });
969
-
970
1002
  });
@@ -4729,6 +4729,8 @@ usePreliminaryContext : false}}">\
4729
4729
  oObjectPage = that.oView.byId("objectPage");
4730
4730
 
4731
4731
  assert.deepEqual(oMessage.getControlIds(), []);
4732
+ that.expectValueState("note1", "Error", oSalesOrder1NoteError.message)
4733
+ .expectValueState("note2", "Error", oSalesOrder1NoteError.message);
4732
4734
 
4733
4735
  oObjectPage.setBindingContext(
4734
4736
  that.oView.byId("table").getItems()[0].getBindingContext());
@@ -11301,12 +11303,12 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
11301
11303
 
11302
11304
  return this.waitForChanges(assert, "change scale to 2 -> amount type's scale wins");
11303
11305
  }).then(() => {
11304
- this.expectValue("weight", "12.3410000 KWH");
11306
+ this.expectValue("weight", "12 KWH");
11305
11307
 
11306
11308
  // code under test
11307
11309
  oBindingPart.setType(new Decimal(undefined, {precision : 13}));
11308
11310
 
11309
- return this.waitForChanges(assert, "change scale to undefined -> unit's decimals wins");
11311
+ return this.waitForChanges(assert, "change scale to undefined -> type Decimal default scale 0 wins");
11310
11312
  });
11311
11313
  });
11312
11314
 
@@ -11317,15 +11319,17 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
11317
11319
  // b) the amount part data type's scale and
11318
11320
  // with a fix unit decimal places of 7 for the used unit code
11319
11321
  // JIRA: CPOUI5MODELS-1600
11322
+ // SNOW: DINC0152691 => consider scale default value 0 for sap.ui.model.odata.type.Decimal
11320
11323
  [
11321
11324
  {iMaxFractionDigits: 1, iScale: 3, sExpected: "12.3 KWH"}, // maxFractionDigits wins
11322
11325
  {iMaxFractionDigits: 9, iScale: 3, sExpected: "12.3410000 KWH"}, // unit's decimal places wins
11323
11326
  {iMaxFractionDigits: undefined, iScale: 3, sExpected: "12.341 KWH"}, // scale wins
11324
11327
  {iMaxFractionDigits: undefined, iScale: "'variable'", sExpected: "12.3410000 KWH"}, // unit's decimal places wins
11325
- {iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12.3410000 KWH"} // unit's decimal places wins
11328
+ // DINC0152691: Decimal type scale defaults to 0 => scale wins
11329
+ {iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12 KWH"}
11326
11330
  ].forEach(({iMaxFractionDigits, iScale, sExpected}, i) => {
11327
11331
  QUnit.test(`CPOUI5MODELS-1600: UnitType with unit maxFractionDigits, ${i}`, function (assert) {
11328
- const sURLParameter = "CPOUI5MODELS-1600=true" + i; // unqiue URL for each test needed
11332
+ const sURLParameter = "CPOUI5MODELS-1600=true" + i; // unique URL for each test needed
11329
11333
  const oModel = createModel(`/sap/opu/odata/sap/ZUI5_GWSAMPLE_BASIC/?${sURLParameter}`,
11330
11334
  {defaultBindingMode : "TwoWay", tokenHandling : false});
11331
11335
  const sScaleConstraint = iScale ? `, scale : ${iScale}` : "";
@@ -11429,12 +11433,12 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
11429
11433
 
11430
11434
  return this.waitForChanges(assert, "change scale to 2 -> amount type's scale wins");
11431
11435
  }).then(() => {
11432
- this.expectValue("price", "12.3410000\u00a0FOO");
11436
+ this.expectValue("price", "12\u00a0FOO");
11433
11437
 
11434
11438
  // code under test
11435
11439
  oBindingPart.setType(new Decimal(undefined, {precision : 13}));
11436
11440
 
11437
- return this.waitForChanges(assert, "change scale to undefined -> currency's decimals wins");
11441
+ return this.waitForChanges(assert, "change scale to undefined -> type Decimal default scale 0 wins");
11438
11442
  });
11439
11443
  });
11440
11444
 
@@ -11445,12 +11449,14 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
11445
11449
  // b) the amount part data type's scale and
11446
11450
  // with a fix currency decimal places of 7 for the used currency
11447
11451
  // JIRA: CPOUI5MODELS-1600
11452
+ // SNOW: DINC0152691 => consider scale default value 0 for sap.ui.model.odata.type.Decimal
11448
11453
  [
11449
11454
  {iMaxFractionDigits: 1, iScale: 3, sExpected: "12.3\u00a0FOO"}, // maxFractionDigits wins
11450
11455
  {iMaxFractionDigits: 9, iScale: 3, sExpected: "12.3410000\u00a0FOO"}, // currency's decimal places wins
11451
11456
  {iMaxFractionDigits: undefined, iScale: 3, sExpected: "12.341\u00a0FOO"}, // scale wins
11452
11457
  {iMaxFractionDigits: undefined, iScale: "'variable'", sExpected: "12.3410000\u00a0FOO"}, // currency's decimal places wins
11453
- {iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12.3410000\u00a0FOO"} // currency's decimal places wins
11458
+ // DINC0152691: Decimal type scale defaults to 0 => scale wins
11459
+ {iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12\u00a0FOO"}
11454
11460
  ].forEach(({iMaxFractionDigits, iScale, sExpected}, i) => {
11455
11461
  QUnit.test(`CPOUI5MODELS-1619: CurrencyType with unit maxFractionDigits: ${i}`, function (assert) {
11456
11462
  const sURLParameter = "CPOUI5MODELS-1619=" + i; // unqiue URL for each test needed