@openui5/sap.ui.core 1.124.0 → 1.124.2
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.
- package/package.json +1 -1
- package/src/jquery.sap.global.js +4 -4
- package/src/jquery.sap.properties.js +2 -2
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/jquery.sap.ui.js +6 -2
- package/src/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -8
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +2 -2
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +1 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +5 -5
- package/src/sap/ui/core/UIComponent.js +2 -2
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +3 -3
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +2 -2
- package/src/sap/ui/core/search/SearchProvider.js +2 -2
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +1 -1
- package/src/sap/ui/core/theming/Parameters.js +2 -2
- package/src/sap/ui/core/tmpl/DOMAttribute.js +2 -2
- package/src/sap/ui/core/tmpl/DOMElement.js +2 -2
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +2 -2
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +2 -2
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +2 -2
- package/src/sap/ui/core/util/MockServer.js +1 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +16 -11
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +7 -2
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +2 -20
- package/src/sap/ui/model/odata/v4/ODataBinding.js +47 -57
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +9 -21
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +10 -5
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +0 -1
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +2 -18
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +4 -2
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +3 -19
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +18 -0
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +6 -3
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +6 -3
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +1 -1
- package/src/sap/ui/performance/trace/Interaction.js +1 -1
- package/src/sap/ui/performance/trace/Passport.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Mobile.js +7 -4
- package/src/sap/ui/util/Storage.js +1 -1
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/qunit/component/Models.qunit.js +97 -0
- package/test/sap/ui/core/qunit/component/testdata/v4models/sapSystem/Component.js +16 -0
- package/test/sap/ui/core/qunit/component/testdata/v4models/sapSystem/manifest.json +102 -0
- package/test/sap/ui/core/qunit/json/JSONModel.qunit.js +21 -0
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +17 -10
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +94 -2
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +4 -31
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +20 -73
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +22 -45
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +66 -20
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +87 -14
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +0 -1
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +1 -50
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +4 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +42 -36
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +30 -0
- package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +9 -7
- package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +51 -22
- package/test/sap/ui/core/qunit/types/Types.qunit.js +35 -6
- package/test/sap/ui/core/qunit/util/Mobile.qunit.js +12 -7
- package/test/sap/ui/core/relnotes/changes-1.124.json +65 -0
- package/test/sap/ui/core/samples/databinding/UnitTable/ui5.yaml +1 -1
|
@@ -1351,6 +1351,103 @@ sap.ui.define([
|
|
|
1351
1351
|
}.bind(this));
|
|
1352
1352
|
});
|
|
1353
1353
|
|
|
1354
|
+
QUnit.test("metadata v4 with sap-system URL parameter", async function(assert) {
|
|
1355
|
+
this.stubGetUriParameters({ sapSystem: "URL_123" });
|
|
1356
|
+
|
|
1357
|
+
this.oComponent = await Component.create({
|
|
1358
|
+
name: "sap.ui.test.v4models.sapSystem"
|
|
1359
|
+
});
|
|
1360
|
+
|
|
1361
|
+
this.assertModelInstances({
|
|
1362
|
+
"v4-ODataModel": this.modelSpy.odataV4,
|
|
1363
|
+
"v4-ODataModel-ServiceOrigin": this.modelSpy.odataV4,
|
|
1364
|
+
"v4-ODataModel-OtherOrigins": this.modelSpy.odataV4
|
|
1365
|
+
});
|
|
1366
|
+
|
|
1367
|
+
// model: "v4-ODataModel"
|
|
1368
|
+
sinon.assert.calledWithExactly(this.modelSpy.odataV4, {
|
|
1369
|
+
serviceUrl: '/path/to/odata/service;o=URL_123/'
|
|
1370
|
+
});
|
|
1371
|
+
|
|
1372
|
+
// model: "v4-ODataModel-ServiceOrigin" with a trailing slash and URL Parameters
|
|
1373
|
+
sinon.assert.calledWithExactly(this.modelSpy.odataV4, {
|
|
1374
|
+
serviceUrl: '/path/to/odata/service/with/trailing/slash;o=URL_123/?sap-client=foo&sap-server=bar',
|
|
1375
|
+
annotationURI: [
|
|
1376
|
+
'/path/to/odata/service/with/trailing/slash;o=URL_123/annotations.xml?sap-language=EN&sap-client=foo',
|
|
1377
|
+
'test-resources/sap/ui/core/qunit/component/testdata/v4models/sapSystem/path/to/local/odata/annotations/2?sap-language=EN&sap-client=foo'
|
|
1378
|
+
],
|
|
1379
|
+
metadataUrlParams: { "sap-language": "EN" }
|
|
1380
|
+
});
|
|
1381
|
+
|
|
1382
|
+
// model: "v4-ODataModel-OtherOrigins" with multi origin annotations
|
|
1383
|
+
sinon.assert.calledWithExactly(this.modelSpy.odataV4, {
|
|
1384
|
+
serviceUrl: '/path/to/odata/service/with/multi/origin/annotations;o=URL_123/?sap-client=foo&sap-server=bar',
|
|
1385
|
+
annotationURI: ["/path/to/other/odata/service;o=URL_123/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value?sap-language=EN&sap-client=foo",
|
|
1386
|
+
"test-resources/sap/ui/core/qunit/component/testdata/v4models/sapSystem/path/to/other/odata/service;o=URL_123/Annotations%28TechnicalName=%27%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE%27,Version=%270001%27%29/$value?sap-language=EN&sap-client=foo",
|
|
1387
|
+
"/path/to/other/odata/service/other2/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/?sap-language=EN&sap-client=foo",
|
|
1388
|
+
"/path/to/other3/odata/service/;o=sid(G1Y.400)/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value?sap-language=EN&sap-client=foo"
|
|
1389
|
+
],
|
|
1390
|
+
metadataUrlParams: { "sap-language": "EN" }
|
|
1391
|
+
});
|
|
1392
|
+
|
|
1393
|
+
// destroy the component
|
|
1394
|
+
this.oComponent.destroy();
|
|
1395
|
+
|
|
1396
|
+
// check if all models got destroyed (uses the models from #assertModelInstances)
|
|
1397
|
+
this.assertModelsDestroyed();
|
|
1398
|
+
});
|
|
1399
|
+
|
|
1400
|
+
QUnit.test("metadata v4 with sap-system startup parameter", async function(assert) {
|
|
1401
|
+
this.stubGetUriParameters();
|
|
1402
|
+
|
|
1403
|
+
this.oComponent = await Component.create({
|
|
1404
|
+
name: "sap.ui.test.v4models.sapSystem",
|
|
1405
|
+
componentData: {
|
|
1406
|
+
startupParameters: {
|
|
1407
|
+
"sap-system": "STARTUP123"
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
});
|
|
1411
|
+
|
|
1412
|
+
this.assertModelInstances({
|
|
1413
|
+
"v4-ODataModel": this.modelSpy.odataV4,
|
|
1414
|
+
"v4-ODataModel-ServiceOrigin": this.modelSpy.odataV4,
|
|
1415
|
+
"v4-ODataModel-OtherOrigins": this.modelSpy.odataV4
|
|
1416
|
+
});
|
|
1417
|
+
|
|
1418
|
+
// model: "v4-ODataModel"
|
|
1419
|
+
sinon.assert.calledWithExactly(this.modelSpy.odataV4, {
|
|
1420
|
+
serviceUrl: '/path/to/odata/service;o=STARTUP123/'
|
|
1421
|
+
});
|
|
1422
|
+
|
|
1423
|
+
// model: "v4-ODataModel-ServiceOrigin" with a trailing slash and URL Parameters
|
|
1424
|
+
sinon.assert.calledWithExactly(this.modelSpy.odataV4, {
|
|
1425
|
+
serviceUrl: '/path/to/odata/service/with/trailing/slash;o=STARTUP123/?sap-client=foo&sap-server=bar',
|
|
1426
|
+
annotationURI: [
|
|
1427
|
+
'/path/to/odata/service/with/trailing/slash;o=STARTUP123/annotations.xml?sap-language=EN&sap-client=foo',
|
|
1428
|
+
'test-resources/sap/ui/core/qunit/component/testdata/v4models/sapSystem/path/to/local/odata/annotations/2?sap-language=EN&sap-client=foo'
|
|
1429
|
+
],
|
|
1430
|
+
metadataUrlParams: { "sap-language": "EN" }
|
|
1431
|
+
});
|
|
1432
|
+
|
|
1433
|
+
// model: "v4-ODataModel-OtherOrigins" with multi origin annotations
|
|
1434
|
+
sinon.assert.calledWithExactly(this.modelSpy.odataV4, {
|
|
1435
|
+
serviceUrl: '/path/to/odata/service/with/multi/origin/annotations;o=STARTUP123/?sap-client=foo&sap-server=bar',
|
|
1436
|
+
annotationURI: ["/path/to/other/odata/service;o=STARTUP123/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value?sap-language=EN&sap-client=foo",
|
|
1437
|
+
"test-resources/sap/ui/core/qunit/component/testdata/v4models/sapSystem/path/to/other/odata/service;o=STARTUP123/Annotations%28TechnicalName=%27%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE%27,Version=%270001%27%29/$value?sap-language=EN&sap-client=foo",
|
|
1438
|
+
"/path/to/other/odata/service/other2/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/?sap-language=EN&sap-client=foo",
|
|
1439
|
+
"/path/to/other3/odata/service/;o=sid(G1Y.400)/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value?sap-language=EN&sap-client=foo"
|
|
1440
|
+
],
|
|
1441
|
+
metadataUrlParams: { "sap-language": "EN" }
|
|
1442
|
+
});
|
|
1443
|
+
|
|
1444
|
+
// destroy the component
|
|
1445
|
+
this.oComponent.destroy();
|
|
1446
|
+
|
|
1447
|
+
// check if all models got destroyed (uses the models from #assertModelInstances)
|
|
1448
|
+
this.assertModelsDestroyed();
|
|
1449
|
+
});
|
|
1450
|
+
|
|
1354
1451
|
QUnit.test("metadata v2 with dataSources (extension inheritance)", function(assert) {
|
|
1355
1452
|
this.stubGetUriParameters();
|
|
1356
1453
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Provides class sap.ui.test.v4models.sapSystem.Component
|
|
6
|
+
sap.ui.define(["sap/ui/core/UIComponent"], function(UIComponent) {
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
return UIComponent.extend("sap.ui.test.v4models.sapSystem.Component", {
|
|
10
|
+
interfaces: ["sap.ui.core.IAsyncContentCreation"],
|
|
11
|
+
metadata: {
|
|
12
|
+
manifest: "json"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
|
|
3
|
+
"_version": "1.0.0",
|
|
4
|
+
|
|
5
|
+
"sap.app": {
|
|
6
|
+
"_version": "1.0.0",
|
|
7
|
+
"id": "sap.ui.test.v4models.sapSystem",
|
|
8
|
+
"type": "application",
|
|
9
|
+
"applicationVersion": {
|
|
10
|
+
"version": "1.0.0"
|
|
11
|
+
},
|
|
12
|
+
"i18n": "i18n.properties",
|
|
13
|
+
"title": "{{title}}",
|
|
14
|
+
"description": "{{description}}",
|
|
15
|
+
"dataSources": {
|
|
16
|
+
|
|
17
|
+
"dataSourceODataV4": {
|
|
18
|
+
"uri": "/path/to/odata/service/with/trailing/slash/",
|
|
19
|
+
"type": "OData",
|
|
20
|
+
"settings": {
|
|
21
|
+
"annotations": ["originAnnotations", "annotations2"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"originAnnotations" : {
|
|
26
|
+
"uri": "/path/to/odata/service/with/trailing/slash/annotations.xml",
|
|
27
|
+
"type": "ODataAnnotation"
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"annotations2": {
|
|
31
|
+
"uri": "path/to/local/odata/annotations/2",
|
|
32
|
+
"type": "ODataAnnotation"
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
"ODataWithMultiOriginAnnotations": {
|
|
38
|
+
"uri": "/path/to/odata/service/with/multi/origin/annotations/",
|
|
39
|
+
"type": "OData",
|
|
40
|
+
"settings": {
|
|
41
|
+
"annotations": ["annotationWithOtherOrigin1", "annotationWithOtherOrigin2", "annotationWithOtherOrigin3", "annotationWithOtherOrigin4"]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
"annotationWithOtherOrigin1": {
|
|
46
|
+
"uri": "/path/to/other/odata/service/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value",
|
|
47
|
+
"type":"ODataAnnotation"
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
"annotationWithOtherOrigin2": {
|
|
51
|
+
"uri": "path/to/other/odata/service/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value",
|
|
52
|
+
"type":"ODataAnnotation"
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
"annotationWithOtherOrigin3": {
|
|
56
|
+
"uri": "/path/to/other/odata/service/other2/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/",
|
|
57
|
+
"type":"ODataAnnotation"
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
"annotationWithOtherOrigin4": {
|
|
61
|
+
"uri": "/path/to/other3/odata/service/;o=sid(G1Y.400)/Annotations(TechnicalName='%2FIWBEP%2FTEA_TEST_ANNOTATION_FILE',Version='0001')/$value",
|
|
62
|
+
"type":"ODataAnnotation"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
"sap.ui": {
|
|
68
|
+
"_version": "1.0.0",
|
|
69
|
+
"technology": "UI5"
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"sap.ui5": {
|
|
73
|
+
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"minUI5Version": "1.120.0",
|
|
76
|
+
"libs": {
|
|
77
|
+
"sap.ui.core": {
|
|
78
|
+
"minVersion": "1.120.0"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
"models": {
|
|
84
|
+
"v4-ODataModel": {
|
|
85
|
+
"type": "sap.ui.model.odata.v4.ODataModel",
|
|
86
|
+
"settings": {
|
|
87
|
+
"serviceUrl": "/path/to/odata/service/"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
"v4-ODataModel-ServiceOrigin": {
|
|
92
|
+
"type": "sap.ui.model.odata.v4.ODataModel",
|
|
93
|
+
"dataSource": "dataSourceODataV4"
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
"v4-ODataModel-OtherOrigins": {
|
|
97
|
+
"type": "sap.ui.model.odata.v4.ODataModel",
|
|
98
|
+
"dataSource": "ODataWithMultiOriginAnnotations"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -999,4 +999,25 @@ sap.ui.define([
|
|
|
999
999
|
oLabel.unbindElement();
|
|
1000
1000
|
assert.equal(oLabel.getText(), "", "text value from model");
|
|
1001
1001
|
});
|
|
1002
|
+
|
|
1003
|
+
//*********************************************************************************************
|
|
1004
|
+
// DINC0180763
|
|
1005
|
+
QUnit.test("loadData: calls _ajax with jsonp=false", function () {
|
|
1006
|
+
const oModel = {
|
|
1007
|
+
_ajax() {},
|
|
1008
|
+
fireRequestSent() {}
|
|
1009
|
+
};
|
|
1010
|
+
this.mock(oModel).expects("fireRequestSent").withExactArgs({
|
|
1011
|
+
async: false, headers: "~mHeaders", info: "cache=~bCache;bMerge=~bMerge",
|
|
1012
|
+
infoObject: {cache: "~bCache", merge: "~bMerge"}, type: "~sType", url: "~sURL"
|
|
1013
|
+
});
|
|
1014
|
+
this.mock(oModel).expects("_ajax").withExactArgs({
|
|
1015
|
+
async: false, cache: "~bCache", data: "~oParameters", dataType: 'json', error: sinon.match.func,
|
|
1016
|
+
headers: "~mHeaders", jsonp: false, success: sinon.match.func, type: "~sType", url: "~sURL"
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
// code under test
|
|
1020
|
+
JSONModel.prototype.loadData.call(oModel, "~sURL", "~oParameters", false, "~sType", "~bMerge", "~bCache",
|
|
1021
|
+
"~mHeaders");
|
|
1022
|
+
});
|
|
1002
1023
|
});
|
|
@@ -10844,11 +10844,11 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
10844
10844
|
}, {
|
|
10845
10845
|
__count : "1",
|
|
10846
10846
|
results : [{
|
|
10847
|
-
ForceElementOrgID : "4711"
|
|
10847
|
+
ForceElementOrgID : "4711",
|
|
10848
10848
|
// HierarchyNode : "32,FA163E2C58541EDA8E9C92E909255DAF",
|
|
10849
10849
|
// HierarchyParentNode : "",
|
|
10850
10850
|
// HierarchyLevel : 0,
|
|
10851
|
-
|
|
10851
|
+
HierarchyDescendantCount : 0
|
|
10852
10852
|
// DrillDownState : "collapsed"
|
|
10853
10853
|
}]
|
|
10854
10854
|
})
|
|
@@ -10913,6 +10913,7 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
10913
10913
|
__count : "2",
|
|
10914
10914
|
results : [{
|
|
10915
10915
|
__metadata : {uri : "C_RSHMaintSchedSmltdOrdAndOp('1')"},
|
|
10916
|
+
HierarchyDescendantCount : 0,
|
|
10916
10917
|
MaintenanceOrder : "Foo"
|
|
10917
10918
|
}]
|
|
10918
10919
|
})
|
|
@@ -10942,6 +10943,7 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
10942
10943
|
__count : "2",
|
|
10943
10944
|
results : [{
|
|
10944
10945
|
__metadata : {uri : "C_RSHMaintSchedSmltdOrdAndOp('1')"},
|
|
10946
|
+
HierarchyDescendantCount : 0,
|
|
10945
10947
|
MaintenanceOrder : "Bar"
|
|
10946
10948
|
}]
|
|
10947
10949
|
});
|
|
@@ -11018,6 +11020,7 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
11018
11020
|
__count : "1",
|
|
11019
11021
|
results : [{
|
|
11020
11022
|
__metadata : {uri : "C_RSHMaintSchedSmltdOrdAndOp('1')"},
|
|
11023
|
+
HierarchyDescendantCount : 0,
|
|
11021
11024
|
MaintenanceOrder : "Bar"
|
|
11022
11025
|
}]
|
|
11023
11026
|
})
|
|
@@ -11372,12 +11375,12 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
11372
11375
|
|
|
11373
11376
|
return this.waitForChanges(assert, "change scale to 2 -> amount type's scale wins");
|
|
11374
11377
|
}).then(() => {
|
|
11375
|
-
this.expectValue("weight", "12
|
|
11378
|
+
this.expectValue("weight", "12 KWH");
|
|
11376
11379
|
|
|
11377
11380
|
// code under test
|
|
11378
11381
|
oBindingPart.setType(new Decimal(undefined, {precision : 13}));
|
|
11379
11382
|
|
|
11380
|
-
return this.waitForChanges(assert, "change scale to undefined ->
|
|
11383
|
+
return this.waitForChanges(assert, "change scale to undefined -> type Decimal default scale 0 wins");
|
|
11381
11384
|
});
|
|
11382
11385
|
});
|
|
11383
11386
|
|
|
@@ -11388,15 +11391,17 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
11388
11391
|
// b) the amount part data type's scale and
|
|
11389
11392
|
// with a fix unit decimal places of 7 for the used unit code
|
|
11390
11393
|
// JIRA: CPOUI5MODELS-1600
|
|
11394
|
+
// SNOW: DINC0152691 => consider scale default value 0 for sap.ui.model.odata.type.Decimal
|
|
11391
11395
|
[
|
|
11392
11396
|
{iMaxFractionDigits: 1, iScale: 3, sExpected: "12.3 KWH"}, // maxFractionDigits wins
|
|
11393
11397
|
{iMaxFractionDigits: 9, iScale: 3, sExpected: "12.3410000 KWH"}, // unit's decimal places wins
|
|
11394
11398
|
{iMaxFractionDigits: undefined, iScale: 3, sExpected: "12.341 KWH"}, // scale wins
|
|
11395
11399
|
{iMaxFractionDigits: undefined, iScale: "'variable'", sExpected: "12.3410000 KWH"}, // unit's decimal places wins
|
|
11396
|
-
|
|
11400
|
+
// DINC0152691: Decimal type scale defaults to 0 => scale wins
|
|
11401
|
+
{iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12 KWH"}
|
|
11397
11402
|
].forEach(({iMaxFractionDigits, iScale, sExpected}, i) => {
|
|
11398
11403
|
QUnit.test(`CPOUI5MODELS-1600: UnitType with unit maxFractionDigits, ${i}`, function (assert) {
|
|
11399
|
-
const sURLParameter = "CPOUI5MODELS-1600=true" + i; //
|
|
11404
|
+
const sURLParameter = "CPOUI5MODELS-1600=true" + i; // unique URL for each test needed
|
|
11400
11405
|
const oModel = createModel(`/sap/opu/odata/sap/ZUI5_GWSAMPLE_BASIC/?${sURLParameter}`,
|
|
11401
11406
|
{defaultBindingMode : "TwoWay", tokenHandling : false});
|
|
11402
11407
|
const sScaleConstraint = iScale ? `, scale : ${iScale}` : "";
|
|
@@ -11500,12 +11505,12 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
11500
11505
|
|
|
11501
11506
|
return this.waitForChanges(assert, "change scale to 2 -> amount type's scale wins");
|
|
11502
11507
|
}).then(() => {
|
|
11503
|
-
this.expectValue("price", "12
|
|
11508
|
+
this.expectValue("price", "12\u00a0FOO");
|
|
11504
11509
|
|
|
11505
11510
|
// code under test
|
|
11506
11511
|
oBindingPart.setType(new Decimal(undefined, {precision : 13}));
|
|
11507
11512
|
|
|
11508
|
-
return this.waitForChanges(assert, "change scale to undefined ->
|
|
11513
|
+
return this.waitForChanges(assert, "change scale to undefined -> type Decimal default scale 0 wins");
|
|
11509
11514
|
});
|
|
11510
11515
|
});
|
|
11511
11516
|
|
|
@@ -11516,12 +11521,14 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
11516
11521
|
// b) the amount part data type's scale and
|
|
11517
11522
|
// with a fix currency decimal places of 7 for the used currency
|
|
11518
11523
|
// JIRA: CPOUI5MODELS-1600
|
|
11524
|
+
// SNOW: DINC0152691 => consider scale default value 0 for sap.ui.model.odata.type.Decimal
|
|
11519
11525
|
[
|
|
11520
11526
|
{iMaxFractionDigits: 1, iScale: 3, sExpected: "12.3\u00a0FOO"}, // maxFractionDigits wins
|
|
11521
11527
|
{iMaxFractionDigits: 9, iScale: 3, sExpected: "12.3410000\u00a0FOO"}, // currency's decimal places wins
|
|
11522
11528
|
{iMaxFractionDigits: undefined, iScale: 3, sExpected: "12.341\u00a0FOO"}, // scale wins
|
|
11523
11529
|
{iMaxFractionDigits: undefined, iScale: "'variable'", sExpected: "12.3410000\u00a0FOO"}, // currency's decimal places wins
|
|
11524
|
-
|
|
11530
|
+
// DINC0152691: Decimal type scale defaults to 0 => scale wins
|
|
11531
|
+
{iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12\u00a0FOO"}
|
|
11525
11532
|
].forEach(({iMaxFractionDigits, iScale, sExpected}, i) => {
|
|
11526
11533
|
QUnit.test(`CPOUI5MODELS-1619: CurrencyType with unit maxFractionDigits: ${i}`, function (assert) {
|
|
11527
11534
|
const sURLParameter = "CPOUI5MODELS-1619=" + i; // unqiue URL for each test needed
|
|
@@ -20278,7 +20285,7 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
20278
20285
|
ErhaOrderItem : "100",
|
|
20279
20286
|
ErhaOrderItemName : "100",
|
|
20280
20287
|
HierarchyParentNode : "",
|
|
20281
|
-
HierarchyDescendantCount : 1,
|
|
20288
|
+
HierarchyDescendantCount : "1",
|
|
20282
20289
|
HierarchyDistanceFromRoot : 0,
|
|
20283
20290
|
HierarchyDrillState : "expanded",
|
|
20284
20291
|
HierarchyNode : "100",
|
|
@@ -1087,7 +1087,7 @@ sap.ui.define([
|
|
|
1087
1087
|
results : [{
|
|
1088
1088
|
drillStateFor : sDrillState,
|
|
1089
1089
|
levelFor : "~level",
|
|
1090
|
-
nodeDescendantCountFor : "
|
|
1090
|
+
nodeDescendantCountFor : "42"
|
|
1091
1091
|
}]
|
|
1092
1092
|
},
|
|
1093
1093
|
oExpectedNode = {
|
|
@@ -1099,7 +1099,7 @@ sap.ui.define([
|
|
|
1099
1099
|
isDeepOne : false,
|
|
1100
1100
|
key : "~key('42')",
|
|
1101
1101
|
level : "~level",
|
|
1102
|
-
magnitude :
|
|
1102
|
+
magnitude : 42,
|
|
1103
1103
|
nodeState : {
|
|
1104
1104
|
collapsed : false,
|
|
1105
1105
|
expanded : false,
|
|
@@ -1135,6 +1135,98 @@ sap.ui.define([
|
|
|
1135
1135
|
});
|
|
1136
1136
|
});
|
|
1137
1137
|
|
|
1138
|
+
//*********************************************************************************************
|
|
1139
|
+
[1, "2", "1e5", "9007199254740991"].forEach(function (vMagnitude) {
|
|
1140
|
+
QUnit.test("_addServerIndexNodes: magnitude is safe integer: " + vMagnitude, function (assert) {
|
|
1141
|
+
const oBinding = {
|
|
1142
|
+
_aNodes : [],
|
|
1143
|
+
_mSelected : {},
|
|
1144
|
+
oContext : "~oContext",
|
|
1145
|
+
oModel : {
|
|
1146
|
+
getContext() {},
|
|
1147
|
+
getKey() {},
|
|
1148
|
+
resolveDeep() {}
|
|
1149
|
+
},
|
|
1150
|
+
sPath : "~sPath",
|
|
1151
|
+
oTreeProperties : {
|
|
1152
|
+
"hierarchy-drill-state-for" : "drillStateFor",
|
|
1153
|
+
"hierarchy-level-for" : "levelFor",
|
|
1154
|
+
"hierarchy-node-descendant-count-for" : "nodeDescendantCountFor"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
oData = {
|
|
1158
|
+
__count : "1",
|
|
1159
|
+
results : [{
|
|
1160
|
+
drillStateFor : "~sDrillState",
|
|
1161
|
+
levelFor : "~level",
|
|
1162
|
+
nodeDescendantCountFor : vMagnitude
|
|
1163
|
+
}]
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
this.mock(oBinding.oModel).expects("getKey")
|
|
1167
|
+
.withExactArgs(sinon.match.same(oData.results[0]))
|
|
1168
|
+
.returns("~key('42')");
|
|
1169
|
+
this.mock(oBinding.oModel).expects("resolveDeep").withExactArgs("~sPath", "~oContext").returns("~deepPath");
|
|
1170
|
+
this.mock(oBinding.oModel).expects("getContext")
|
|
1171
|
+
.withExactArgs("/~key('42')", "~deepPath('42')")
|
|
1172
|
+
.returns("~context");
|
|
1173
|
+
|
|
1174
|
+
// code under test
|
|
1175
|
+
ODataTreeBindingFlat.prototype._addServerIndexNodes.call(oBinding, oData, 0);
|
|
1176
|
+
|
|
1177
|
+
assert.ok(typeof oBinding._aNodes[0].magnitude === "number");
|
|
1178
|
+
});
|
|
1179
|
+
});
|
|
1180
|
+
|
|
1181
|
+
//*********************************************************************************************
|
|
1182
|
+
[
|
|
1183
|
+
{magnitude : "Foo", expected : '"Foo"'},
|
|
1184
|
+
{magnitude : 9007199254740992, expected : "9007199254740992"},
|
|
1185
|
+
{magnitude : "9007199254740999", expected : '"9007199254740999"'}
|
|
1186
|
+
].forEach(function (oFixture) {
|
|
1187
|
+
QUnit.test("_addServerIndexNodes: magnitude is not a safe integer: " + oFixture.magnitude, function (assert) {
|
|
1188
|
+
const oBinding = {
|
|
1189
|
+
_aNodes : [],
|
|
1190
|
+
_mSelected : {},
|
|
1191
|
+
oContext : "~oContext",
|
|
1192
|
+
oModel : {
|
|
1193
|
+
getContext() {},
|
|
1194
|
+
getKey() {},
|
|
1195
|
+
resolveDeep() {}
|
|
1196
|
+
},
|
|
1197
|
+
sPath : "~sPath",
|
|
1198
|
+
oTreeProperties : {
|
|
1199
|
+
"hierarchy-drill-state-for" : "drillStateFor",
|
|
1200
|
+
"hierarchy-level-for" : "levelFor",
|
|
1201
|
+
"hierarchy-node-descendant-count-for" : "nodeDescendantCountFor"
|
|
1202
|
+
},
|
|
1203
|
+
getResolvedPath() {}
|
|
1204
|
+
},
|
|
1205
|
+
oData = {
|
|
1206
|
+
__count : "1",
|
|
1207
|
+
results : [{
|
|
1208
|
+
drillStateFor : "~sDrillState",
|
|
1209
|
+
levelFor : "~level",
|
|
1210
|
+
nodeDescendantCountFor : oFixture.magnitude
|
|
1211
|
+
}]
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
this.mock(oBinding.oModel).expects("getKey")
|
|
1215
|
+
.withExactArgs(sinon.match.same(oData.results[0]))
|
|
1216
|
+
.returns("~key('42')");
|
|
1217
|
+
this.mock(oBinding.oModel).expects("resolveDeep").withExactArgs("~sPath", "~oContext").returns("~deepPath");
|
|
1218
|
+
this.mock(oBinding.oModel).expects("getContext")
|
|
1219
|
+
.withExactArgs("/~key('42')", "~deepPath('42')")
|
|
1220
|
+
.returns("~context");
|
|
1221
|
+
this.mock(oBinding).expects("getResolvedPath").withExactArgs().returns("~path");
|
|
1222
|
+
this.oLogMock.expects("error")
|
|
1223
|
+
.withExactArgs("The value of magnitude is not a safe integer: " + oFixture.expected, "~path", sClassName);
|
|
1224
|
+
|
|
1225
|
+
// code under test
|
|
1226
|
+
ODataTreeBindingFlat.prototype._addServerIndexNodes.call(oBinding, oData, 0);
|
|
1227
|
+
});
|
|
1228
|
+
});
|
|
1229
|
+
|
|
1138
1230
|
//*********************************************************************************************
|
|
1139
1231
|
["leaf", "collapsed"].forEach(function (sDrillState) {
|
|
1140
1232
|
var sTitle = "_createChildNode: node has initiallyIsLeaf (drill state = " + sDrillState + ")";
|
|
@@ -483,11 +483,10 @@ sap.ui.define([
|
|
|
483
483
|
assert.notOk(oContext.mChangeListeners);
|
|
484
484
|
|
|
485
485
|
this.mock(oBinding).expects("fetchValue").never();
|
|
486
|
-
this.mock(_Helper).expects("
|
|
487
|
-
.withExactArgs(sinon.match.
|
|
488
|
-
.callsFake((
|
|
489
|
-
assert.
|
|
490
|
-
assert.deepEqual(mChangeListeners, {});
|
|
486
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
487
|
+
.withExactArgs(sinon.match.same(oContext), "", "~listener~")
|
|
488
|
+
.callsFake(() => {
|
|
489
|
+
assert.deepEqual(oContext.mChangeListeners, {});
|
|
491
490
|
});
|
|
492
491
|
}
|
|
493
492
|
|
|
@@ -4965,32 +4964,6 @@ sap.ui.define([
|
|
|
4965
4964
|
}, "~oError~");
|
|
4966
4965
|
});
|
|
4967
4966
|
|
|
4968
|
-
//*********************************************************************************************
|
|
4969
|
-
QUnit.test("deregisterChangeListener", function (assert) {
|
|
4970
|
-
const oContext = Context.create({/*oModel*/}, {/*oBinding*/}, "/path");
|
|
4971
|
-
let oListener = {
|
|
4972
|
-
getPath : () => "foo"
|
|
4973
|
-
};
|
|
4974
|
-
|
|
4975
|
-
// code under test
|
|
4976
|
-
assert.strictEqual(oContext.deregisterChangeListener(), false, "no mChangeListeners");
|
|
4977
|
-
|
|
4978
|
-
oContext.mChangeListeners = {};
|
|
4979
|
-
|
|
4980
|
-
// code under test
|
|
4981
|
-
assert.strictEqual(oContext.deregisterChangeListener(oListener), false, "wrong path");
|
|
4982
|
-
|
|
4983
|
-
oListener = {
|
|
4984
|
-
getPath : () => "@$ui5.context.isSelected"
|
|
4985
|
-
};
|
|
4986
|
-
this.mock(_Helper).expects("removeByPath")
|
|
4987
|
-
.withExactArgs(sinon.match.same(oContext.mChangeListeners), "",
|
|
4988
|
-
sinon.match.same(oListener));
|
|
4989
|
-
|
|
4990
|
-
// code under test
|
|
4991
|
-
assert.strictEqual(oContext.deregisterChangeListener(oListener), true);
|
|
4992
|
-
});
|
|
4993
|
-
|
|
4994
4967
|
//*********************************************************************************************
|
|
4995
4968
|
[0, 1].forEach(function (iFailureIndex) {
|
|
4996
4969
|
QUnit.test("updateAfterCreate, fail=" + iFailureIndex, function () {
|