@openui5/sap.ui.core 1.122.0 → 1.123.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +7 -1
- package/.eslintrc.json +3 -0
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -17
- package/src/jquery.sap.properties.js +1 -1
- 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/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/future.js +3 -1
- package/src/sap/base/i18n/Formatting.js +119 -94
- 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 +7 -4
- package/src/sap/ui/base/BindingInfo.js +22 -0
- 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 +5 -14
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +15 -14
- 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 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +17 -16
- 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 +53 -18
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +58 -21
- 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 +6 -2
- package/src/sap/ui/core/Fragment.js +10 -5
- 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 +37 -21
- 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 +7 -1
- package/src/sap/ui/core/Renderer.js +4 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +2 -2
- 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 +37 -47
- package/src/sap/ui/core/UIComponent.js +1 -1
- 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/XMLTemplateProcessor.js +12 -0
- package/src/sap/ui/core/_IconRegistry.js +1 -0
- 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 +2 -2
- 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/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +28 -3
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +6 -2
- 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 +12 -7
- 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/rules/CoreHelper.support.js +2 -3
- package/src/sap/ui/core/rules/Misc.support.js +3 -12
- package/src/sap/ui/core/rules/Theming.support.js +5 -9
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- 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 -20
- 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/themes/base/.theming +3 -1
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +5 -1
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +2 -2
- package/src/sap/ui/core/util/ExportCell.js +2 -2
- package/src/sap/ui/core/util/ExportColumn.js +2 -2
- package/src/sap/ui/core/util/ExportRow.js +2 -2
- package/src/sap/ui/core/util/ExportType.js +2 -2
- package/src/sap/ui/core/util/ExportTypeCSV.js +2 -2
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +8 -13
- 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/dom/jquery/Aria.js +19 -0
- package/src/sap/ui/events/jquery/EventExtension.js +4 -3
- 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 +4 -4
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +22 -33
- 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/analytics/AnalyticalVersionInfo.js +1 -1
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +7 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +11 -8
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataExpressionAddons.js +21 -0
- 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/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 +17 -48
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +2 -0
- package/src/sap/ui/model/odata/v4/Context.js +66 -22
- package/src/sap/ui/model/odata/v4/ODataBinding.js +10 -11
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +207 -180
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +75 -52
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +9 -11
- package/src/sap/ui/model/odata/v4/ODataModel.js +34 -35
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +9 -9
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +20 -8
- package/src/sap/ui/model/odata/v4/SubmitMode.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +126 -46
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +56 -11
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +21 -34
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +16 -27
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +2 -6
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Parser.js +6 -5
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +49 -38
- package/src/sap/ui/model/odata/v4/lib/_TreeState.js +75 -24
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +3 -4
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +4 -12
- package/src/sap/ui/model/odata/v4/lib/_V4MetadataConverter.js +1 -1
- 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 +48 -4
- 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 +5 -4
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +4 -1
- package/src/sap/ui/test/ModuleTracking.js +46 -0
- package/src/sap/ui/test/OpaBuilder.js +19 -19
- package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +39 -6
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/_enforceNoReturnValue.js +3 -1
- package/src/ui5loader-autoconfig.js +22 -16
- package/src/ui5loader.js +38 -1
- package/test/sap/ui/core/demokit/docuindex.json +17 -6
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicMessages/Component.js +1 -1
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicMessages/Controller.controller.js +30 -47
- package/test/sap/ui/core/demokit/sample/Messaging/BasicMessages/MessagePopover.fragment.xml +13 -0
- package/test/sap/ui/core/demokit/sample/Messaging/BasicMessages/View.view.xml +135 -0
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicMessages/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicODataMessages/Component.js +1 -1
- package/test/sap/ui/core/demokit/sample/Messaging/BasicODataMessages/Controller.controller.js +58 -0
- package/test/sap/ui/core/demokit/sample/Messaging/BasicODataMessages/MessagePopover.fragment.xml +13 -0
- package/test/sap/ui/core/demokit/sample/Messaging/BasicODataMessages/View.view.xml +57 -0
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicODataMessages/localService/mockserver.js +11 -13
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicODataMessages/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/Component.js +1 -1
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/package.json +1 -1
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/ui5.yaml +11 -0
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/Component.js +2 -2
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/controller/App.controller.js +12 -0
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/controller/BaseController.js +41 -0
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/controller/Employee.controller.js +54 -0
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/controller/NotFound.controller.js +9 -11
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/fragment/MessagePopover.fragment.xml +13 -0
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/i18n/i18n.properties +9 -0
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/index.html +20 -0
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/index.js +16 -0
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/localService/mockserver.js +27 -27
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/manifest.json +7 -4
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/view/App.view.xml +1 -1
- package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/view/Employee.view.xml +6 -6
- package/test/sap/ui/core/demokit/sample/Messaging/ODataBackendMessagesComp/webapp/view/NotFound.view.xml +13 -0
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Types.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/common/Helper.js +8 -9
- package/test/sap/ui/core/demokit/sample/common/SandboxModelHelper.js +1 -1
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithOPA5/GherkinTestRunner.html +2 -2
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithPageObjects/GherkinTestRunner.html +2 -2
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithQUnit/GherkinTestRunner.html +2 -2
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithQUnit/Steps.js +4 -5
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithUIComponent/GherkinTestRunner.html +2 -2
- 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/sample/odata/v2/AutoExpand/AutoExpand.view.xml +1 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/ConsumeV2Service/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Draft/ObjectPage.controller.js +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/MIT.ListBinding.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Main.controller.js +5 -7
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Main.view.xml +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/MIT.ListBindingTemplate.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.view.xml +6 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/MusicArtists/ObjectPage.controller.js +5 -7
- package/test/sap/ui/core/demokit/sample/odata/v4/Products/MIT.Products.html +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/Products/pages/Main.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +27 -9
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/MIT.SalesOrderTP100.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/MIT.SalesOrderTP100.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/MIT.Basics.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/MIT.SalesOrderAdditionalTargets.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/MIT.SalesOrderCreate.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/MIT.SalesOrderCreateMultiple.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/MIT.SalesOrderCreateRelative.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/MIT.SalesOrderMessageHandling.html +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.controller.js +5 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.view.xml +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/pages/Main.js +7 -9
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/MessageHandling.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/MIT.RTA.html +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/MIT.SalesOrdersTemplate.html +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/MIT.Sticky.html +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/Main.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/pages/Main.js +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/06/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/controller/App.controller.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/controller/App.controller.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/controller/App.controller.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/controller/App.controller.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/internal/samples/odata/v2/Products/Main.view.xml +1 -1
- package/test/sap/ui/core/qunit/CustomStyleClassSupport.qunit.js +12 -3
- package/test/sap/ui/core/qunit/CustomThemeFallback.qunit.js +33 -38
- package/test/sap/ui/core/qunit/CustomThemeFallback_unavoidablySync.qunit.js +119 -0
- package/test/sap/ui/core/qunit/EventBus.qunit.js +15 -0
- package/test/sap/ui/core/qunit/Lib_terminologies.qunit.js +109 -0
- package/test/sap/ui/core/qunit/StashedControlSupport_unavoidablySync.qunit.js +19 -0
- package/test/sap/ui/core/qunit/StashedControlSupport_unavoidablySync.view.xml +27 -0
- package/test/sap/ui/core/qunit/app/ThemeClassParameters.qunit.js +105 -140
- package/test/sap/ui/core/qunit/app/testsuite.app.qunit.js +75 -2
- package/test/sap/ui/core/qunit/base/Config.qunit.js +6 -2
- package/test/sap/ui/core/qunit/base/Config_bootstrap.qunit.html +4 -1
- package/test/sap/ui/core/qunit/base/Config_bootstrap.qunit.js +6 -2
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +6 -3
- package/test/sap/ui/core/qunit/base/Config_global.qunit.html +5 -2
- package/test/sap/ui/core/qunit/base/Config_meta.qunit.html +5 -2
- package/test/sap/ui/core/qunit/base/Config_noUrl.qunit.html +5 -2
- package/test/sap/ui/core/qunit/base/Config_noUrl.qunit.js +5 -1
- package/test/sap/ui/core/qunit/base/Config_url.qunit.html +5 -2
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithNoJQuery-without-jquery-ui-position.qunit.html +2 -1
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithNoJQuery.qunit.html +2 -1
- package/test/sap/ui/core/qunit/bootstrap/DebugMode.beforeBootstrap.qunit.js +7 -0
- package/test/sap/ui/core/qunit/bootstrap/DebugModeAsync.qunit.html +10 -4
- package/test/sap/ui/core/qunit/bootstrap/testsuite.bootstrap.qunit.js +7 -0
- package/test/sap/ui/core/qunit/component/Component_keepAlive.qunit.js +9 -0
- package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessAmbiguous.html +2 -2
- package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessDuplicate.html +2 -2
- package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessFailing.html +2 -2
- package/test/sap/ui/core/qunit/gherkin/opa5TestHarness.qunit.html +2 -2
- package/test/sap/ui/core/qunit/gherkin/qUnitTestHarness.qunit.html +2 -2
- package/test/sap/ui/core/qunit/gherkin/testHarnessTests.js +1 -1
- package/test/sap/ui/core/qunit/i18n/GenericLocaleData.qunit.js +1 -1
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +15 -15
- package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +7 -1
- package/test/sap/ui/core/qunit/loader/config.qunit.js +14 -6
- package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +288 -0
- package/test/sap/ui/core/qunit/model/controlhelper/TreeBindingProxy.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +7 -2
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +223 -40
- package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBinding.qunit.js +78 -7
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +142 -17
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +93 -87
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +116 -86
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +3 -3
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1828 -548
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.realOData.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +26 -23
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +9 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +251 -113
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +50 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +3 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +31 -11
- package/test/sap/ui/core/qunit/odata/v4/lib/_Parser.qunit.js +8 -2
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +46 -31
- package/test/sap/ui/core/qunit/odata/v4/lib/_TreeState.qunit.js +144 -45
- package/test/sap/ui/core/qunit/odata/v4/lib/_V2Requestor.qunit.js +5 -5
- package/test/sap/ui/core/qunit/odata/v4/lib/data/v2/QM_INSP_PLAN_SRV/metadata.xml +3 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/data/v2/QM_INSP_PLAN_SRV/metadata_only.xml +3 -3
- package/test/sap/ui/core/qunit/opa/autowaiter/_jsAnimationWaiter.js +82 -0
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/simple/i18n/i18n_fr.properties +1 -0
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/simple/i18n/terminologies/oil/i18n_fr.properties +2 -0
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/simple/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/testdata/uilib-custom-theme-fallback/themes/sap_hcb/library.css +3 -0
- package/test/sap/ui/core/qunit/testsuite.core.framework.qunit.js +19 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +14 -0
- package/test/sap/ui/core/qunit/types/NumberFormat.qunit.js +37 -20
- package/test/sap/ui/core/qunit/types/NumberFormatCurrencies.qunit.js +21 -0
- package/test/sap/ui/core/qunit/types/Types.qunit.js +126 -15
- package/test/sap/ui/core/qunit/ui5classes/ManagedObject.qunit.js +58 -4
- package/test/sap/ui/core/relnotes/changes-1.122.json +0 -22
- package/test/sap/ui/core/relnotes/changes-1.123.json +47 -0
- package/test/sap/ui/core/samples/databinding/DataBindingDeclarativeSyntax.js +55 -56
- package/test/sap/ui/core/samples/databinding/DatabindingDeclarativeSyntax.html +4 -4
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
- package/test/testsuite/js/testfwk.js +47 -64
- package/test/sap/ui/core/demokit/sample/MessageManager/BasicMessages/MessagePopover.fragment.xml +0 -13
- package/test/sap/ui/core/demokit/sample/MessageManager/BasicMessages/View.view.xml +0 -136
- package/test/sap/ui/core/demokit/sample/MessageManager/BasicODataMessages/Controller.controller.js +0 -74
- package/test/sap/ui/core/demokit/sample/MessageManager/BasicODataMessages/MessagePopover.fragment.xml +0 -13
- package/test/sap/ui/core/demokit/sample/MessageManager/BasicODataMessages/View.view.xml +0 -58
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +0 -11
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/controller/App.controller.js +0 -14
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/controller/BaseController.js +0 -55
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/controller/Employee.controller.js +0 -56
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/fragment/MessagePopover.fragment.xml +0 -13
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/i18n/i18n.properties +0 -5
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/index.html +0 -42
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/webapp/view/NotFound.view.xml +0 -11
- package/test/sap/ui/core/qunit/app/beforeBootstrap.js +0 -19
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +0 -24
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicODataMessages/localService/metadata.xml +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicODataMessages/localService/mockdata/Employees.json +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/BasicODataMessages/localService/response/ODataErrorResponse.json +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/localService/metadata.xml +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/localService/mockdata/Employees.json +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/localService/mockdata/Employees_3.json +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/localService/response/ODataErrorResponseTemplate.json +0 -0
- /package/test/sap/ui/core/demokit/sample/{MessageManager → Messaging}/ODataBackendMessagesComp/webapp/localService/response/SAP-Message-Header.json +0 -0
|
@@ -89,4 +89,292 @@ sap.ui.define([
|
|
|
89
89
|
|
|
90
90
|
assert.strictEqual(oPropertyBinding.fnTypeChangedCallback, "~fnCallback");
|
|
91
91
|
});
|
|
92
|
+
|
|
93
|
+
//*********************************************************************************************
|
|
94
|
+
QUnit.test("_setBoundValue: no type", function (assert) {
|
|
95
|
+
const oPropertyBinding = {getDataState() {}, setValue() {}};
|
|
96
|
+
const oDataState = {setInvalidValue() {}};
|
|
97
|
+
this.mock(oPropertyBinding).expects("getDataState").withExactArgs().returns(oDataState);
|
|
98
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs(undefined);
|
|
99
|
+
this.mock(oPropertyBinding).expects("setValue").withExactArgs("~vValue");
|
|
100
|
+
|
|
101
|
+
// code under test
|
|
102
|
+
assert.strictEqual(
|
|
103
|
+
PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", "~fnParse"), undefined);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
//*********************************************************************************************
|
|
107
|
+
QUnit.test("_setBoundValue: with type, sync", function (assert) {
|
|
108
|
+
const oType = {validateValue() {}};
|
|
109
|
+
const oPropertyBinding = {
|
|
110
|
+
oType: oType,
|
|
111
|
+
getDataState() {},
|
|
112
|
+
setValue() {}
|
|
113
|
+
};
|
|
114
|
+
const oDataState = {setInvalidValue() {}};
|
|
115
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
116
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
117
|
+
const oHelper = {fnParse() {}};
|
|
118
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns("~vParsedValue");
|
|
119
|
+
this.mock(oType).expects("validateValue").withExactArgs("~vParsedValue").returns();
|
|
120
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs(undefined);
|
|
121
|
+
oPropertyBindingMock.expects("setValue").withExactArgs("~vParsedValue");
|
|
122
|
+
|
|
123
|
+
// code under test
|
|
124
|
+
assert.strictEqual(
|
|
125
|
+
PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse), undefined);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
//*********************************************************************************************
|
|
129
|
+
QUnit.test("_setBoundValue: with type, sync, error in fnParse", function (assert) {
|
|
130
|
+
const oPropertyBinding = {
|
|
131
|
+
oType: "~oType",
|
|
132
|
+
checkDataState() {},
|
|
133
|
+
getDataState() {}
|
|
134
|
+
};
|
|
135
|
+
const oDataState = {setInvalidValue() {}};
|
|
136
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
137
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
138
|
+
const oHelper = {fnParse() {}};
|
|
139
|
+
const oError = new Error("~oParseError");
|
|
140
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").throws(oError);
|
|
141
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs("~vValue");
|
|
142
|
+
oPropertyBindingMock.expects("checkDataState").withExactArgs();
|
|
143
|
+
|
|
144
|
+
assert.throws(() => {
|
|
145
|
+
// code under test
|
|
146
|
+
PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
147
|
+
}, oError);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
//*********************************************************************************************
|
|
151
|
+
QUnit.test("_setBoundValue: with type, sync, error in validateValue", function (assert) {
|
|
152
|
+
const oType = {validateValue() {}};
|
|
153
|
+
const oPropertyBinding = {
|
|
154
|
+
oType: oType,
|
|
155
|
+
checkDataState() {},
|
|
156
|
+
getDataState() {}
|
|
157
|
+
};
|
|
158
|
+
const oDataState = {setInvalidValue() {}};
|
|
159
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
160
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
161
|
+
const oHelper = {fnParse() {}};
|
|
162
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns("~vParsedValue");
|
|
163
|
+
const oError = new Error("~oValidateError");
|
|
164
|
+
this.mock(oType).expects("validateValue").withExactArgs("~vParsedValue").throws(oError);
|
|
165
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs("~vValue");
|
|
166
|
+
oPropertyBindingMock.expects("checkDataState").withExactArgs();
|
|
167
|
+
|
|
168
|
+
assert.throws(() => {
|
|
169
|
+
// code under test
|
|
170
|
+
PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
171
|
+
}, oError);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
//*********************************************************************************************
|
|
175
|
+
QUnit.test("_setBoundValue: with type, sync, error in setValue", function (assert) {
|
|
176
|
+
const oType = {validateValue() {}};
|
|
177
|
+
const oPropertyBinding = {
|
|
178
|
+
oType: oType,
|
|
179
|
+
checkDataState() {},
|
|
180
|
+
getDataState() {},
|
|
181
|
+
setValue() {}
|
|
182
|
+
};
|
|
183
|
+
const oDataState = {setInvalidValue() {}};
|
|
184
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
185
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
186
|
+
const oHelper = {fnParse() {}};
|
|
187
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns("~vParsedValue");
|
|
188
|
+
this.mock(oType).expects("validateValue").withExactArgs("~vParsedValue").returns();
|
|
189
|
+
const oDataStateMock = this.mock(oDataState);
|
|
190
|
+
oDataStateMock.expects("setInvalidValue").withExactArgs(undefined);
|
|
191
|
+
const oError = new Error("~oError");
|
|
192
|
+
oPropertyBindingMock.expects("setValue").withExactArgs("~vParsedValue").throws(oError);
|
|
193
|
+
oDataStateMock.expects("setInvalidValue").withExactArgs("~vValue");
|
|
194
|
+
oPropertyBindingMock.expects("checkDataState").withExactArgs();
|
|
195
|
+
|
|
196
|
+
assert.throws(() => {
|
|
197
|
+
// code under test
|
|
198
|
+
PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
199
|
+
}, oError);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
//*********************************************************************************************
|
|
203
|
+
QUnit.test("_setBoundValue: with type, async", function (assert) {
|
|
204
|
+
const oType = {validateValue() {}};
|
|
205
|
+
const oPropertyBinding = {
|
|
206
|
+
oType: oType,
|
|
207
|
+
getDataState() {},
|
|
208
|
+
setValue() {}
|
|
209
|
+
};
|
|
210
|
+
const oDataState = {setInvalidValue() {}};
|
|
211
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
212
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
213
|
+
let fnParseResolve;
|
|
214
|
+
const oParseValuePromise = new Promise(function(resolve, rejected) {
|
|
215
|
+
fnParseResolve = resolve;
|
|
216
|
+
});
|
|
217
|
+
const oHelper = {fnParse() {}};
|
|
218
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns(oParseValuePromise);
|
|
219
|
+
const oTypeMock = this.mock(oType);
|
|
220
|
+
oTypeMock.expects("validateValue").never();
|
|
221
|
+
let bResolved = false;
|
|
222
|
+
|
|
223
|
+
// code under test
|
|
224
|
+
const oPromise = PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
225
|
+
oPromise.then(() => {
|
|
226
|
+
bResolved = true;
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
assert.notOk(bResolved);
|
|
230
|
+
|
|
231
|
+
let fnValidateResolve;
|
|
232
|
+
const oValidateValuePromise = new Promise((resolve, rejected) => {
|
|
233
|
+
fnValidateResolve = resolve;
|
|
234
|
+
});
|
|
235
|
+
oTypeMock.expects("validateValue").withExactArgs("~vParsedValue").returns(oValidateValuePromise);
|
|
236
|
+
|
|
237
|
+
// code under test
|
|
238
|
+
fnParseResolve("~vParsedValue");
|
|
239
|
+
|
|
240
|
+
assert.notOk(bResolved);
|
|
241
|
+
|
|
242
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs(undefined);
|
|
243
|
+
oPropertyBindingMock.expects("setValue").withExactArgs("~vParsedValue");
|
|
244
|
+
|
|
245
|
+
// code under test
|
|
246
|
+
fnValidateResolve();
|
|
247
|
+
|
|
248
|
+
return oPromise.then((vResult) => {
|
|
249
|
+
assert.strictEqual(vResult, undefined);
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
//*********************************************************************************************
|
|
254
|
+
QUnit.test("_setBoundValue: with type, async, fnParse rejects", function (assert) {
|
|
255
|
+
const oPropertyBinding = {
|
|
256
|
+
oType: "~oType",
|
|
257
|
+
checkDataState() {},
|
|
258
|
+
getDataState() {}
|
|
259
|
+
};
|
|
260
|
+
const oDataState = {setInvalidValue() {}};
|
|
261
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
262
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
263
|
+
let fnParseReject;
|
|
264
|
+
const oParseValuePromise = new Promise((resolve, rejected) => {
|
|
265
|
+
fnParseReject = rejected;
|
|
266
|
+
});
|
|
267
|
+
const oHelper = {fnParse() {}};
|
|
268
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns(oParseValuePromise);
|
|
269
|
+
|
|
270
|
+
// code under test
|
|
271
|
+
const oPromise = PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
272
|
+
|
|
273
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs("~vValue");
|
|
274
|
+
oPropertyBindingMock.expects("checkDataState").withExactArgs();
|
|
275
|
+
|
|
276
|
+
// code under test
|
|
277
|
+
fnParseReject("~Error");
|
|
278
|
+
|
|
279
|
+
return oPromise.then(() => {
|
|
280
|
+
assert.ok(false);
|
|
281
|
+
}, (oException) => {
|
|
282
|
+
assert.strictEqual(oException, "~Error");
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
//*********************************************************************************************
|
|
287
|
+
QUnit.test("_setBoundValue: with type, async, validateValue rejects", function (assert) {
|
|
288
|
+
const oType = {validateValue() {}};
|
|
289
|
+
const oPropertyBinding = {
|
|
290
|
+
oType: oType,
|
|
291
|
+
checkDataState() {},
|
|
292
|
+
getDataState() {}
|
|
293
|
+
};
|
|
294
|
+
const oDataState = {setInvalidValue() {}};
|
|
295
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
296
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
297
|
+
let fnParseResolve;
|
|
298
|
+
const oParseValuePromise = new Promise((resolve, rejected) => {
|
|
299
|
+
fnParseResolve = resolve;
|
|
300
|
+
});
|
|
301
|
+
const oHelper = {fnParse() {}};
|
|
302
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns(oParseValuePromise);
|
|
303
|
+
const oTypeMock = this.mock(oType);
|
|
304
|
+
oTypeMock.expects("validateValue").never();
|
|
305
|
+
|
|
306
|
+
// code under test
|
|
307
|
+
const oPromise = PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
308
|
+
|
|
309
|
+
let fnValidateReject;
|
|
310
|
+
const oValidateValuePromise = new Promise(function(resolve, rejected) {
|
|
311
|
+
fnValidateReject = rejected;
|
|
312
|
+
});
|
|
313
|
+
oTypeMock.expects("validateValue").withExactArgs("~vParsedValue").returns(oValidateValuePromise);
|
|
314
|
+
|
|
315
|
+
// code under test
|
|
316
|
+
fnParseResolve("~vParsedValue");
|
|
317
|
+
|
|
318
|
+
this.mock(oDataState).expects("setInvalidValue").withExactArgs("~vValue");
|
|
319
|
+
oPropertyBindingMock.expects("checkDataState").withExactArgs();
|
|
320
|
+
|
|
321
|
+
// code under test
|
|
322
|
+
fnValidateReject("~Error");
|
|
323
|
+
|
|
324
|
+
return oPromise.then(() => {
|
|
325
|
+
assert.ok(false);
|
|
326
|
+
}, (oException) => {
|
|
327
|
+
assert.strictEqual(oException, "~Error");
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
//*********************************************************************************************
|
|
332
|
+
QUnit.test("_setBoundValue: with type, async, error in setValue", function (assert) {
|
|
333
|
+
const oType = {validateValue() {}};
|
|
334
|
+
const oPropertyBinding = {
|
|
335
|
+
oType: oType,
|
|
336
|
+
checkDataState() {},
|
|
337
|
+
getDataState() {},
|
|
338
|
+
setValue() {}
|
|
339
|
+
};
|
|
340
|
+
const oDataState = {setInvalidValue() {}};
|
|
341
|
+
const oPropertyBindingMock = this.mock(oPropertyBinding);
|
|
342
|
+
oPropertyBindingMock.expects("getDataState").withExactArgs().returns(oDataState);
|
|
343
|
+
let fnParseResolve;
|
|
344
|
+
const oParseValuePromise = new Promise(function(resolve, rejected) {
|
|
345
|
+
fnParseResolve = resolve;
|
|
346
|
+
});
|
|
347
|
+
const oHelper = {fnParse() {}};
|
|
348
|
+
this.mock(oHelper).expects("fnParse").withExactArgs("~vValue").returns(oParseValuePromise);
|
|
349
|
+
const oTypeMock = this.mock(oType);
|
|
350
|
+
oTypeMock.expects("validateValue").never();
|
|
351
|
+
|
|
352
|
+
// code under test
|
|
353
|
+
const oPromise = PropertyBinding.prototype._setBoundValue.call(oPropertyBinding, "~vValue", oHelper.fnParse);
|
|
354
|
+
|
|
355
|
+
let fnValidateResolve;
|
|
356
|
+
const oValidateValuePromise = new Promise((resolve, rejected) => {
|
|
357
|
+
fnValidateResolve = resolve;
|
|
358
|
+
});
|
|
359
|
+
oTypeMock.expects("validateValue").withExactArgs("~vParsedValue").returns(oValidateValuePromise);
|
|
360
|
+
|
|
361
|
+
// code under test
|
|
362
|
+
fnParseResolve("~vParsedValue");
|
|
363
|
+
|
|
364
|
+
const oDataStateMock = this.mock(oDataState);
|
|
365
|
+
oDataStateMock.expects("setInvalidValue").withExactArgs(undefined);
|
|
366
|
+
const oError = new Error("~oError");
|
|
367
|
+
oPropertyBindingMock.expects("setValue").withExactArgs("~vParsedValue").throws(oError);
|
|
368
|
+
oDataStateMock.expects("setInvalidValue").withExactArgs("~vValue");
|
|
369
|
+
oPropertyBindingMock.expects("checkDataState").withExactArgs();
|
|
370
|
+
|
|
371
|
+
// code under test
|
|
372
|
+
fnValidateResolve();
|
|
373
|
+
|
|
374
|
+
return oPromise.then(() => {
|
|
375
|
+
assert.ok(false);
|
|
376
|
+
}, (oException) => {
|
|
377
|
+
assert.strictEqual(oException, oError);
|
|
378
|
+
});
|
|
379
|
+
});
|
|
92
380
|
});
|
|
@@ -256,6 +256,12 @@ sap.ui.define([
|
|
|
256
256
|
"Binding#setAggregation called with the correct parameters if expandTo changes");
|
|
257
257
|
assert.ok(oRefreshSpy.notCalled, "Binding#refresh not called if expandTo changes");
|
|
258
258
|
|
|
259
|
+
oSetAggregationSpy.resetHistory();
|
|
260
|
+
oRefreshSpy.resetHistory();
|
|
261
|
+
this.oProxy.collapseAll();
|
|
262
|
+
assert.ok(oSetAggregationSpy.notCalled, "Binding#setAggregation not called if expandTo doesn't change");
|
|
263
|
+
assert.ok(oRefreshSpy.calledOnceWithExactly(), "Binding#refresh called if expandTo doesn't change");
|
|
264
|
+
|
|
259
265
|
oSetAggregationSpy.restore();
|
|
260
266
|
oRefreshSpy.restore();
|
|
261
267
|
});
|
|
@@ -269,6 +275,12 @@ sap.ui.define([
|
|
|
269
275
|
"Binding#setAggregation called with the correct parameters if expandTo changes");
|
|
270
276
|
assert.ok(oRefreshSpy.notCalled, "Binding#refresh not called if expandTo changes");
|
|
271
277
|
|
|
278
|
+
oSetAggregationSpy.resetHistory();
|
|
279
|
+
oRefreshSpy.resetHistory();
|
|
280
|
+
this.oProxy.expandToLevel(2);
|
|
281
|
+
assert.ok(oSetAggregationSpy.notCalled, "Binding#setAggregation not called if expandTo doesn't change");
|
|
282
|
+
assert.ok(oRefreshSpy.calledOnceWithExactly(), "Binding#refresh called if expandTo doesn't change");
|
|
283
|
+
|
|
272
284
|
oSetAggregationSpy.restore();
|
|
273
285
|
oRefreshSpy.restore();
|
|
274
286
|
});
|
|
@@ -440,7 +440,10 @@ sap.ui.define([
|
|
|
440
440
|
}
|
|
441
441
|
});
|
|
442
442
|
});
|
|
443
|
-
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* @deprecated
|
|
446
|
+
*/
|
|
444
447
|
const oErrorLogSpy = sinon.spy(Log, "error");
|
|
445
448
|
const oFatalLogSpy = sinon.spy(Log, "fatal");
|
|
446
449
|
const oView = await XMLView.create({
|
|
@@ -459,7 +462,9 @@ sap.ui.define([
|
|
|
459
462
|
oView.destroy();
|
|
460
463
|
assert.ok(oFatalLogSpy.getCall(3).calledWith("[FUTURE FATAL] The registered Event Listener 'onExit' must not have a return value."), "Correct Fatal Log displayed");
|
|
461
464
|
|
|
462
|
-
|
|
465
|
+
/**
|
|
466
|
+
* @deprecated
|
|
467
|
+
*/
|
|
463
468
|
await (async () => {
|
|
464
469
|
await Promise.allSettled(aPromises);
|
|
465
470
|
assert.equal(oErrorLogSpy.callCount, 2, "Two error logs should occur reg. rejected Promises.");
|
|
@@ -11315,74 +11315,257 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
|
|
|
11315
11315
|
|
|
11316
11316
|
//*********************************************************************************************
|
|
11317
11317
|
// Scenario: Do not show more decimal places than available for the amount/quantity part
|
|
11318
|
+
// Observe different formats if the scale of the amount part type's changes
|
|
11318
11319
|
// JIRA: CPOUI5MODELS-1600
|
|
11319
|
-
QUnit.test("
|
|
11320
|
-
const
|
|
11320
|
+
QUnit.test("CPOUI5MODELS-1600: UnitType with unit decimals places > measure scale", function (assert) {
|
|
11321
|
+
const URLParameter = "CPOUI5MODELS-1600=true"; // unqiue URL for each test needed
|
|
11322
|
+
const oModel = createModel(`/sap/opu/odata/sap/ZUI5_GWSAMPLE_BASIC/?${URLParameter}`,
|
|
11321
11323
|
{defaultBindingMode : "TwoWay", tokenHandling : false});
|
|
11322
|
-
const sView =
|
|
11323
|
-
<FlexBox binding="{/ProductSet(
|
|
11324
|
-
<Input id="weight" value="{
|
|
11325
|
-
parts : [{
|
|
11326
|
-
constraints : {precision : 13, scale : 3}
|
|
11327
|
-
path :
|
|
11328
|
-
type :
|
|
11329
|
-
}, {
|
|
11330
|
-
path :
|
|
11331
|
-
type :
|
|
11332
|
-
}, {
|
|
11333
|
-
mode :
|
|
11334
|
-
path :
|
|
11335
|
-
targetType :
|
|
11336
|
-
}]
|
|
11337
|
-
mode :
|
|
11338
|
-
type :
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11324
|
+
const sView = `\
|
|
11325
|
+
<FlexBox binding="{/ProductSet('P1')}">
|
|
11326
|
+
<Input id="weight" value="{
|
|
11327
|
+
parts : [{
|
|
11328
|
+
constraints : {precision : 13, scale : 3},
|
|
11329
|
+
path : 'WeightMeasure',
|
|
11330
|
+
type : 'sap.ui.model.odata.type.Decimal'
|
|
11331
|
+
}, {
|
|
11332
|
+
path : 'WeightUnit',
|
|
11333
|
+
type : 'sap.ui.model.odata.type.String'
|
|
11334
|
+
}, {
|
|
11335
|
+
mode : 'OneTime',
|
|
11336
|
+
path : '/##@@requestUnitsOfMeasure',
|
|
11337
|
+
targetType : 'any'
|
|
11338
|
+
}],
|
|
11339
|
+
mode : 'TwoWay',
|
|
11340
|
+
type : 'sap.ui.model.odata.type.Unit',
|
|
11341
|
+
formatOptions : {preserveDecimals : false}
|
|
11342
|
+
}"/>
|
|
11343
|
+
</FlexBox>`;
|
|
11344
|
+
let oBindingPart;
|
|
11345
|
+
this.expectRequest(`ProductSet('P1')?${URLParameter}`, {
|
|
11346
|
+
ProductID : "P1",
|
|
11347
|
+
WeightMeasure : "12.341",
|
|
11348
|
+
WeightUnit : "KWH"
|
|
11349
|
+
})
|
|
11350
|
+
.expectRequest(`SAP__UnitsOfMeasure?${URLParameter}&$skip=0&$top=5000`, {
|
|
11351
|
+
results : [{
|
|
11352
|
+
DecimalPlaces : 7, // more decimals than WeightMeasure's scale
|
|
11353
|
+
ExternalCode : "KWH"
|
|
11354
|
+
}]
|
|
11355
|
+
})
|
|
11356
|
+
.expectValue("weight", "12.341 KWH"); // amount type's scale wins
|
|
11357
|
+
|
|
11358
|
+
return this.createView(assert, sView, oModel).then(() => {
|
|
11359
|
+
oBindingPart = this.oView.byId("weight").getBinding("value").getBindings()[0];
|
|
11360
|
+
this.expectValue("weight", "12.3410000 KWH");
|
|
11361
|
+
|
|
11362
|
+
// code under test
|
|
11363
|
+
oBindingPart.setType(new Decimal(undefined, {precision : 13, scale : "variable"}));
|
|
11364
|
+
|
|
11365
|
+
return this.waitForChanges(assert, "change scale to variable -> unit's decimals wins");
|
|
11366
|
+
}).then(() => {
|
|
11367
|
+
this.expectValue("weight", "12.34 KWH");
|
|
11368
|
+
|
|
11369
|
+
// code under test
|
|
11370
|
+
oBindingPart.setType(new Decimal(undefined, {precision : 13, scale : 2}));
|
|
11371
|
+
|
|
11372
|
+
return this.waitForChanges(assert, "change scale to 2 -> amount type's scale wins");
|
|
11373
|
+
}).then(() => {
|
|
11374
|
+
this.expectValue("weight", "12.3410000 KWH");
|
|
11375
|
+
|
|
11376
|
+
// code under test
|
|
11377
|
+
oBindingPart.setType(new Decimal(undefined, {precision : 13}));
|
|
11378
|
+
|
|
11379
|
+
return this.waitForChanges(assert, "change scale to undefined -> unit's decimals wins");
|
|
11380
|
+
});
|
|
11381
|
+
});
|
|
11342
11382
|
|
|
11343
|
-
|
|
11383
|
+
//*********************************************************************************************
|
|
11384
|
+
// Scenario: Do not show more decimal places than available for the amount/quantity part
|
|
11385
|
+
// Show that the Unit amount is formatted properly regarding the decimal places depending on:
|
|
11386
|
+
// a) the maxFractionDigits formatOption for the unit type
|
|
11387
|
+
// b) the amount part data type's scale and
|
|
11388
|
+
// with a fix unit decimal places of 7 for the used unit code
|
|
11389
|
+
// JIRA: CPOUI5MODELS-1600
|
|
11390
|
+
[
|
|
11391
|
+
{iMaxFractionDigits: 1, iScale: 3, sExpected: "12.3 KWH"}, // maxFractionDigits wins
|
|
11392
|
+
{iMaxFractionDigits: 9, iScale: 3, sExpected: "12.3410000 KWH"}, // unit's decimal places wins
|
|
11393
|
+
{iMaxFractionDigits: undefined, iScale: 3, sExpected: "12.341 KWH"}, // scale wins
|
|
11394
|
+
{iMaxFractionDigits: undefined, iScale: "'variable'", sExpected: "12.3410000 KWH"}, // unit's decimal places wins
|
|
11395
|
+
{iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12.3410000 KWH"} // unit's decimal places wins
|
|
11396
|
+
].forEach(({iMaxFractionDigits, iScale, sExpected}, i) => {
|
|
11397
|
+
QUnit.test(`CPOUI5MODELS-1600: UnitType with unit maxFractionDigits, ${i}`, function (assert) {
|
|
11398
|
+
const sURLParameter = "CPOUI5MODELS-1600=true" + i; // unqiue URL for each test needed
|
|
11399
|
+
const oModel = createModel(`/sap/opu/odata/sap/ZUI5_GWSAMPLE_BASIC/?${sURLParameter}`,
|
|
11400
|
+
{defaultBindingMode : "TwoWay", tokenHandling : false});
|
|
11401
|
+
const sScaleConstraint = iScale ? `, scale : ${iScale}` : "";
|
|
11402
|
+
const sMaxFractionDigitsOption = iMaxFractionDigits ? `, maxFractionDigits : ${iMaxFractionDigits}` : "";
|
|
11403
|
+
const sView = `\
|
|
11404
|
+
<FlexBox binding="{/ProductSet('P1')}">
|
|
11405
|
+
<Input id="weight" value="{
|
|
11406
|
+
parts : [{
|
|
11407
|
+
constraints : {precision : 13${sScaleConstraint}},
|
|
11408
|
+
path : 'WeightMeasure',
|
|
11409
|
+
type : 'sap.ui.model.odata.type.Decimal'
|
|
11410
|
+
}, {
|
|
11411
|
+
path : 'WeightUnit',
|
|
11412
|
+
type : 'sap.ui.model.odata.type.String'
|
|
11413
|
+
}, {
|
|
11414
|
+
mode : 'OneTime',
|
|
11415
|
+
path : '/##@@requestUnitsOfMeasure',
|
|
11416
|
+
targetType : 'any'
|
|
11417
|
+
}],
|
|
11418
|
+
mode : 'TwoWay',
|
|
11419
|
+
type : 'sap.ui.model.odata.type.Unit',
|
|
11420
|
+
formatOptions : {preserveDecimals : false${sMaxFractionDigitsOption}}
|
|
11421
|
+
}"/>\
|
|
11422
|
+
</FlexBox>`;
|
|
11423
|
+
|
|
11424
|
+
this.expectRequest(`ProductSet('P1')?${sURLParameter}`, {
|
|
11344
11425
|
ProductID : "P1",
|
|
11345
|
-
WeightMeasure : "12.
|
|
11426
|
+
WeightMeasure : "12.341",
|
|
11346
11427
|
WeightUnit : "KWH"
|
|
11347
11428
|
})
|
|
11348
|
-
.expectRequest(
|
|
11429
|
+
.expectRequest(`SAP__UnitsOfMeasure?${sURLParameter}&$skip=0&$top=5000`, {
|
|
11349
11430
|
results : [{
|
|
11350
|
-
DecimalPlaces :
|
|
11431
|
+
DecimalPlaces : 7, // more decimals than WeightMeasure's scale
|
|
11351
11432
|
ExternalCode : "KWH",
|
|
11352
11433
|
ISOCode : "KWH",
|
|
11353
11434
|
Text : "Kilowatt hour",
|
|
11354
11435
|
UnitCode : "KWH"
|
|
11355
11436
|
}]
|
|
11356
11437
|
})
|
|
11357
|
-
.expectValue("weight",
|
|
11438
|
+
.expectValue("weight", sExpected);
|
|
11358
11439
|
|
|
11359
|
-
return this.createView(assert, sView, oModel)
|
|
11360
|
-
|
|
11440
|
+
return this.createView(assert, sView, oModel);
|
|
11441
|
+
});
|
|
11442
|
+
});
|
|
11361
11443
|
|
|
11362
|
-
|
|
11444
|
+
//*********************************************************************************************
|
|
11445
|
+
// Scenario: Do not show more decimal places than available for the amount/quantity part.
|
|
11446
|
+
// Observe different formats if the scale of the amount part type changes
|
|
11447
|
+
// JIRA: CPOUI5MODELS-1619
|
|
11448
|
+
QUnit.test("CPOUI5MODELS-1619: CurrencyType with currency decimals places > measure scale", function (assert) {
|
|
11449
|
+
const sURLParameter = "CPOUI5MODELS-1619=true"; // unqiue URL for each test needed
|
|
11450
|
+
const oModel = createModel(`/sap/opu/odata/sap/ZUI5_GWSAMPLE_BASIC/?${sURLParameter}`,
|
|
11451
|
+
{defaultBindingMode : "TwoWay", tokenHandling : false});
|
|
11452
|
+
const sView = `\
|
|
11453
|
+
<FlexBox binding="{/ProductSet('P1')}">
|
|
11454
|
+
<Input id="price" value="{
|
|
11455
|
+
parts : [{
|
|
11456
|
+
constraints : {precision : 5, scale : 3},
|
|
11457
|
+
path : 'Price',
|
|
11458
|
+
type : 'sap.ui.model.odata.type.Decimal'
|
|
11459
|
+
}, {
|
|
11460
|
+
path : 'CurrencyCode',
|
|
11461
|
+
type : 'sap.ui.model.odata.type.String'
|
|
11462
|
+
}, {
|
|
11463
|
+
mode : 'OneTime',
|
|
11464
|
+
path : '/##@@requestCurrencyCodes',
|
|
11465
|
+
targetType : 'any'
|
|
11466
|
+
}],
|
|
11467
|
+
mode : 'TwoWay',
|
|
11468
|
+
type : 'sap.ui.model.odata.type.Currency',
|
|
11469
|
+
formatOptions : {preserveDecimals : false}
|
|
11470
|
+
}"/>
|
|
11471
|
+
</FlexBox>`;
|
|
11472
|
+
let oBindingPart;
|
|
11473
|
+
this.expectRequest(`ProductSet('P1')?${sURLParameter}`, {
|
|
11474
|
+
ProductID : "P1",
|
|
11475
|
+
Price : "12.341",
|
|
11476
|
+
CurrencyCode : "FOO"
|
|
11477
|
+
})
|
|
11478
|
+
.expectRequest(`SAP__Currencies?${sURLParameter}&$skip=0&$top=5000`, {
|
|
11479
|
+
results : [{
|
|
11480
|
+
CurrencyCode : "FOO",
|
|
11481
|
+
DecimalPlaces : 7 // more decimals than Price's scale
|
|
11482
|
+
}]
|
|
11483
|
+
})
|
|
11484
|
+
.expectValue("price", "12.341\u00a0FOO");
|
|
11485
|
+
|
|
11486
|
+
return this.createView(assert, sView, oModel).then(() => {
|
|
11487
|
+
oBindingPart = this.oView.byId("price").getBinding("value").getBindings()[0];
|
|
11488
|
+
this.expectValue("price", "12.3410000\u00a0FOO");
|
|
11363
11489
|
|
|
11364
11490
|
// code under test
|
|
11365
|
-
|
|
11491
|
+
oBindingPart.setType(new Decimal(undefined, {precision : 13, scale : "variable"}));
|
|
11366
11492
|
|
|
11367
|
-
return this.waitForChanges(assert);
|
|
11493
|
+
return this.waitForChanges(assert, "change scale to variable -> currency's decimals wins");
|
|
11368
11494
|
}).then(() => {
|
|
11369
|
-
this.expectValue("
|
|
11370
|
-
.expectValue("weight", "0.000 KWH"); // twice because 2 parts changed
|
|
11495
|
+
this.expectValue("price", "12.34\u00a0FOO");
|
|
11371
11496
|
|
|
11372
11497
|
// code under test
|
|
11373
|
-
|
|
11498
|
+
oBindingPart.setType(new Decimal(undefined, {precision : 13, scale : 2}));
|
|
11374
11499
|
|
|
11375
|
-
return this.waitForChanges(assert);
|
|
11500
|
+
return this.waitForChanges(assert, "change scale to 2 -> amount type's scale wins");
|
|
11376
11501
|
}).then(() => {
|
|
11377
|
-
this.expectValue("
|
|
11502
|
+
this.expectValue("price", "12.3410000\u00a0FOO");
|
|
11378
11503
|
|
|
11379
|
-
// code under test
|
|
11380
|
-
|
|
11504
|
+
// code under test
|
|
11505
|
+
oBindingPart.setType(new Decimal(undefined, {precision : 13}));
|
|
11381
11506
|
|
|
11382
|
-
return this.waitForChanges(assert);
|
|
11507
|
+
return this.waitForChanges(assert, "change scale to undefined -> currency's decimals wins");
|
|
11383
11508
|
});
|
|
11384
11509
|
});
|
|
11385
11510
|
|
|
11511
|
+
//*********************************************************************************************
|
|
11512
|
+
// Scenario: Do not show more decimal places than available for the amount/quantity part.
|
|
11513
|
+
// Show that the currency amount is formatted properly regarding the decimal places depending on:
|
|
11514
|
+
// a) the maxFractionDigits formatOption for the unit type
|
|
11515
|
+
// b) the amount part data type's scale and
|
|
11516
|
+
// with a fix currency decimal places of 7 for the used currency
|
|
11517
|
+
// JIRA: CPOUI5MODELS-1600
|
|
11518
|
+
[
|
|
11519
|
+
{iMaxFractionDigits: 1, iScale: 3, sExpected: "12.3\u00a0FOO"}, // maxFractionDigits wins
|
|
11520
|
+
{iMaxFractionDigits: 9, iScale: 3, sExpected: "12.3410000\u00a0FOO"}, // currency's decimal places wins
|
|
11521
|
+
{iMaxFractionDigits: undefined, iScale: 3, sExpected: "12.341\u00a0FOO"}, // scale wins
|
|
11522
|
+
{iMaxFractionDigits: undefined, iScale: "'variable'", sExpected: "12.3410000\u00a0FOO"}, // currency's decimal places wins
|
|
11523
|
+
{iMaxFractionDigits: undefined, iScale: undefined, sExpected: "12.3410000\u00a0FOO"} // currency's decimal places wins
|
|
11524
|
+
].forEach(({iMaxFractionDigits, iScale, sExpected}, i) => {
|
|
11525
|
+
QUnit.test(`CPOUI5MODELS-1619: CurrencyType with unit maxFractionDigits: ${i}`, function (assert) {
|
|
11526
|
+
const sURLParameter = "CPOUI5MODELS-1619=" + i; // unqiue URL for each test needed
|
|
11527
|
+
const oModel = createModel(`/sap/opu/odata/sap/ZUI5_GWSAMPLE_BASIC/?${sURLParameter}`,
|
|
11528
|
+
{defaultBindingMode : "TwoWay", tokenHandling : false});
|
|
11529
|
+
const sScaleConstraint = iScale ? `, scale : ${iScale}` : "";
|
|
11530
|
+
const sMaxFractionDigitsOption = iMaxFractionDigits ? `, maxFractionDigits : ${iMaxFractionDigits}` : "";
|
|
11531
|
+
const sView = `\
|
|
11532
|
+
<FlexBox binding="{/ProductSet('P1')}">
|
|
11533
|
+
<Input id="price" value="{
|
|
11534
|
+
parts : [{
|
|
11535
|
+
constraints : {precision : 13${sScaleConstraint}},
|
|
11536
|
+
path : 'Price',
|
|
11537
|
+
type : 'sap.ui.model.odata.type.Decimal'
|
|
11538
|
+
}, {
|
|
11539
|
+
path : 'CurrencyCode',
|
|
11540
|
+
type : 'sap.ui.model.odata.type.String'
|
|
11541
|
+
}, {
|
|
11542
|
+
mode : 'OneTime',
|
|
11543
|
+
path : '/##@@requestCurrencyCodes',
|
|
11544
|
+
targetType : 'any'
|
|
11545
|
+
}],
|
|
11546
|
+
mode : 'TwoWay',
|
|
11547
|
+
type : 'sap.ui.model.odata.type.Currency',
|
|
11548
|
+
formatOptions : {preserveDecimals : false${sMaxFractionDigitsOption}}
|
|
11549
|
+
}" />
|
|
11550
|
+
</FlexBox>`;
|
|
11551
|
+
|
|
11552
|
+
this.expectRequest(`ProductSet('P1')?${sURLParameter}`, {
|
|
11553
|
+
ProductID : "P1",
|
|
11554
|
+
Price : "12.341",
|
|
11555
|
+
CurrencyCode : "FOO"
|
|
11556
|
+
})
|
|
11557
|
+
.expectRequest(`SAP__Currencies?${sURLParameter}&$skip=0&$top=5000`, {
|
|
11558
|
+
results : [{
|
|
11559
|
+
CurrencyCode : "FOO",
|
|
11560
|
+
DecimalPlaces : 7 // more decimals than Price's scale
|
|
11561
|
+
}]
|
|
11562
|
+
})
|
|
11563
|
+
.expectValue("price", sExpected);
|
|
11564
|
+
|
|
11565
|
+
return this.createView(assert, sView, oModel);
|
|
11566
|
+
});
|
|
11567
|
+
});
|
|
11568
|
+
|
|
11386
11569
|
//*********************************************************************************************
|
|
11387
11570
|
// Scenario: If the OData service has no customizing for currencies, the OData Currency type
|
|
11388
11571
|
// uses the UI5 built-in CLDR information for formatting and parsing.
|