@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
|
@@ -5179,12 +5179,6 @@ sap.ui.define([
|
|
|
5179
5179
|
|
|
5180
5180
|
oContext.setSelected(true);
|
|
5181
5181
|
|
|
5182
|
-
// This error is unavoidable as #fetchValue runs right after creating the context, but
|
|
5183
|
-
// fails as the context is deleted already.
|
|
5184
|
-
that.oLogMock.expects("error")
|
|
5185
|
-
.withArgs(sinon.match("Failed to drill-down into ($uid="),
|
|
5186
|
-
sSalesOrderService + "SalesOrderList", "sap.ui.model.odata.v4.lib._Cache");
|
|
5187
|
-
|
|
5188
5182
|
assert.ok(oModel.hasPendingChanges());
|
|
5189
5183
|
assert.ok(oListBindingWithoutUI.hasPendingChanges());
|
|
5190
5184
|
assert.strictEqual(oListBindingWithoutUI.getLength(), 1 + 10/*length is not final*/);
|
|
@@ -8353,6 +8347,59 @@ sap.ui.define([
|
|
|
8353
8347
|
});
|
|
8354
8348
|
});
|
|
8355
8349
|
|
|
8350
|
+
//*********************************************************************************************
|
|
8351
|
+
// Scenario: Table gets a binding context for which data was already loaded and then a refresh
|
|
8352
|
+
// is performed synchronously.
|
|
8353
|
+
// SNOW: CS20240007657519
|
|
8354
|
+
QUnit.test("CS20240007657519", async function (assert) {
|
|
8355
|
+
const oModel = this.createSalesOrdersModel({autoExpandSelect : true});
|
|
8356
|
+
const sView = `
|
|
8357
|
+
<FlexBox binding="{/SalesOrderList('1')}" id="form">
|
|
8358
|
+
<Table id="table" items="{path : 'SO_2_SOITEM', parameters : {$$ownRequest : true}}">
|
|
8359
|
+
<Text id="position" text="{ItemPosition}"/>
|
|
8360
|
+
</Table>
|
|
8361
|
+
</FlexBox>`;
|
|
8362
|
+
|
|
8363
|
+
this.expectRequest("SalesOrderList('1')/SO_2_SOITEM"
|
|
8364
|
+
+ "?$select=ItemPosition,SalesOrderID&$skip=0&$top=100", {
|
|
8365
|
+
value : [ // implicitly sorted descending
|
|
8366
|
+
{SalesOrderID : "1", ItemPosition : "0020"},
|
|
8367
|
+
{SalesOrderID : "1", ItemPosition : "0010"}
|
|
8368
|
+
]
|
|
8369
|
+
})
|
|
8370
|
+
.expectChange("position", ["0020", "0010"]);
|
|
8371
|
+
|
|
8372
|
+
await this.createView(assert, sView, oModel);
|
|
8373
|
+
|
|
8374
|
+
const oTable = this.oView.byId("table");
|
|
8375
|
+
const oFormContext = this.oView.byId("form").getBindingContext();
|
|
8376
|
+
|
|
8377
|
+
oTable.setBindingContext(null);
|
|
8378
|
+
|
|
8379
|
+
await this.waitForChanges(assert);
|
|
8380
|
+
|
|
8381
|
+
oTable.setBindingContext(oFormContext);
|
|
8382
|
+
|
|
8383
|
+
this.expectCanceledError("Failed to get contexts for " + sSalesOrderService
|
|
8384
|
+
+ "SalesOrderList('1')/SO_2_SOITEM with start index 0 and length 100",
|
|
8385
|
+
sODLB + ": /SalesOrderList('1')|SO_2_SOITEM"
|
|
8386
|
+
+ " is ignoring response from inactive cache: " + sSalesOrderService
|
|
8387
|
+
+ "SalesOrderList('1')/SO_2_SOITEM?$select=ItemPosition,SalesOrderID")
|
|
8388
|
+
.expectRequest("SalesOrderList('1')/SO_2_SOITEM"
|
|
8389
|
+
+ "?$select=ItemPosition,SalesOrderID&$skip=0&$top=100", {
|
|
8390
|
+
value : [
|
|
8391
|
+
{SalesOrderID : "1", ItemPosition : "0030"}, // a new one!
|
|
8392
|
+
{SalesOrderID : "1", ItemPosition : "0020"},
|
|
8393
|
+
{SalesOrderID : "1", ItemPosition : "0010"}
|
|
8394
|
+
]
|
|
8395
|
+
})
|
|
8396
|
+
.expectChange("position", ["0030", "0020", "0010"]);
|
|
8397
|
+
|
|
8398
|
+
oFormContext.refresh();
|
|
8399
|
+
|
|
8400
|
+
await this.waitForChanges(assert);
|
|
8401
|
+
});
|
|
8402
|
+
|
|
8356
8403
|
//*********************************************************************************************
|
|
8357
8404
|
// Scenario: Read and modify an entity with key aliases
|
|
8358
8405
|
// CPOUI5ODATAV4-1580: show usage of ODataModel#getKeyPredicate
|
|
@@ -23406,12 +23453,6 @@ sap.ui.define([
|
|
|
23406
23453
|
|
|
23407
23454
|
assert.strictEqual(oTable.getBinding("rows").getContexts().length, 2);
|
|
23408
23455
|
|
|
23409
|
-
that.oLogMock.expects("error").withExactArgs("Failed to drill-down into"
|
|
23410
|
-
+ " (Country='UK',Region='Z')/Region, invalid segment: (Country='UK',Region='Z')",
|
|
23411
|
-
"/aggregation/BusinessPartners"
|
|
23412
|
-
+ "?$apply=groupby((Country,Region),aggregate(SalesAmount))",
|
|
23413
|
-
"sap.ui.model.odata.v4.lib._Cache");
|
|
23414
|
-
|
|
23415
23456
|
// code under test
|
|
23416
23457
|
assert.strictEqual(oThirdRow.getProperty("Region"), undefined,
|
|
23417
23458
|
"$byPredicate has been cleaned up");
|
|
@@ -36881,6 +36922,7 @@ make root = ${bMakeRoot}`;
|
|
|
36881
36922
|
ID : "3",
|
|
36882
36923
|
Name : "Gamma"
|
|
36883
36924
|
}, {
|
|
36925
|
+
"@odata.etag" : "Delta's ETag",
|
|
36884
36926
|
DescendantCount : "0",
|
|
36885
36927
|
DistanceFromRoot : "0",
|
|
36886
36928
|
DrillState : "leaf",
|
|
@@ -36912,6 +36954,7 @@ make root = ${bMakeRoot}`;
|
|
|
36912
36954
|
this.expectRequest({
|
|
36913
36955
|
batchNo : 2,
|
|
36914
36956
|
headers : {
|
|
36957
|
+
"If-Match" : "Delta's ETag",
|
|
36915
36958
|
Prefer : "return=minimal"
|
|
36916
36959
|
},
|
|
36917
36960
|
method : "PATCH",
|
|
@@ -36923,6 +36966,7 @@ make root = ${bMakeRoot}`;
|
|
|
36923
36966
|
.expectRequest({
|
|
36924
36967
|
batchNo : 2,
|
|
36925
36968
|
headers : {
|
|
36969
|
+
"If-Match" : "Delta's ETag",
|
|
36926
36970
|
Prefer : "return=minimal"
|
|
36927
36971
|
},
|
|
36928
36972
|
method : "POST",
|
|
@@ -48193,8 +48237,7 @@ make root = ${bMakeRoot}`;
|
|
|
48193
48237
|
return this.createView(assert, sView).then(function () {
|
|
48194
48238
|
that.expectCanceledError("Failed to get contexts for " + sTeaBusi
|
|
48195
48239
|
+ "EMPLOYEES with start index 0 and length 100",
|
|
48196
|
-
|
|
48197
|
-
+ "EMPLOYEES");
|
|
48240
|
+
"Binding already destroyed");
|
|
48198
48241
|
|
|
48199
48242
|
that.oView.destroy();
|
|
48200
48243
|
delete that.oView;
|
|
@@ -67100,6 +67143,36 @@ make root = ${bMakeRoot}`;
|
|
|
67100
67143
|
});
|
|
67101
67144
|
});
|
|
67102
67145
|
|
|
67146
|
+
//*********************************************************************************************
|
|
67147
|
+
// Scenario: setBindingContext of a table w/o cache below a context binding w/o own properties.
|
|
67148
|
+
// See that this context binding can refresh properly afterwards.
|
|
67149
|
+
// SNOW: DINC0117588
|
|
67150
|
+
QUnit.test("DINC0117588", async function (assert) {
|
|
67151
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
67152
|
+
const sView = `
|
|
67153
|
+
<FlexBox id="root" binding="{/TEAMS('0')}">
|
|
67154
|
+
<Table id="table" items="{TEAM_2_EMPLOYEES}">
|
|
67155
|
+
<Text id="id" text="{ID}"/>
|
|
67156
|
+
</Table>
|
|
67157
|
+
</FlexBox>`;
|
|
67158
|
+
|
|
67159
|
+
this.expectRequest("TEAMS('0')?$select=Team_Id&$expand=TEAM_2_EMPLOYEES($select=ID)", {
|
|
67160
|
+
TeamId : "0",
|
|
67161
|
+
TEAM_2_EMPLOYEES : [
|
|
67162
|
+
{ID : "1"}
|
|
67163
|
+
]
|
|
67164
|
+
})
|
|
67165
|
+
.expectChange("id", ["1"]);
|
|
67166
|
+
|
|
67167
|
+
await this.createView(assert, sView, oModel);
|
|
67168
|
+
|
|
67169
|
+
this.oView.byId("table").setBindingContext(null);
|
|
67170
|
+
|
|
67171
|
+
await this.waitForChanges(assert);
|
|
67172
|
+
|
|
67173
|
+
await this.oView.byId("root").getBindingContext().requestRefresh();
|
|
67174
|
+
});
|
|
67175
|
+
|
|
67103
67176
|
//*********************************************************************************************
|
|
67104
67177
|
// Scenario: Create an item, persist it, select it and sort the cache. Because of the selected
|
|
67105
67178
|
// (and thus effectively kept-alive) element, the cache cannot be recreated. Then delete the
|
|
@@ -32,8 +32,6 @@ sap.ui.define([
|
|
|
32
32
|
refreshDataState : function () {}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
function mustBeMocked() { throw new Error("Must be mocked"); }
|
|
36
|
-
|
|
37
35
|
//*********************************************************************************************
|
|
38
36
|
QUnit.module("sap.ui.model.odata.v4.ODataPropertyBinding", {
|
|
39
37
|
beforeEach : function () {
|
|
@@ -692,7 +690,7 @@ sap.ui.define([
|
|
|
692
690
|
.withExactArgs(sinon.match.same(oGroupLock), undefined, sinon.match.func,
|
|
693
691
|
sinon.match.same(oBinding))
|
|
694
692
|
.returns(SyncPromise.resolve(Promise.resolve().then(function () {
|
|
695
|
-
that.mock(oBinding).expects("
|
|
693
|
+
that.mock(oBinding).expects("checkSameCache")
|
|
696
694
|
.withExactArgs(sinon.match.same(oCache));
|
|
697
695
|
return vValue;
|
|
698
696
|
})));
|
|
@@ -2260,7 +2258,6 @@ sap.ui.define([
|
|
|
2260
2258
|
|
|
2261
2259
|
oPropertyBinding.oCheckUpdateCallToken = {};
|
|
2262
2260
|
oPropertyBinding.vValue = "foo";
|
|
2263
|
-
this.mock(oPropertyBinding).expects("deregisterChangeListener").withExactArgs();
|
|
2264
2261
|
this.mock(this.oModel).expects("bindingDestroyed")
|
|
2265
2262
|
.withExactArgs(sinon.match.same(oPropertyBinding));
|
|
2266
2263
|
this.mock(asODataBinding.prototype).expects("destroy").on(oPropertyBinding).withExactArgs();
|
|
@@ -2375,52 +2372,6 @@ sap.ui.define([
|
|
|
2375
2372
|
oBinding.resetInvalidDataState();
|
|
2376
2373
|
});
|
|
2377
2374
|
|
|
2378
|
-
//*********************************************************************************************
|
|
2379
|
-
[false, true].forEach(function (bRelative) {
|
|
2380
|
-
[false, true].forEach(function (bHasContext) {
|
|
2381
|
-
[false, true].forEach(function (bHasMethod) {
|
|
2382
|
-
const sTitle = `deregisterChangeListener: relative=${bRelative}, w/ context=${bHasContext},
|
|
2383
|
-
w/ method=${bHasMethod}`;
|
|
2384
|
-
|
|
2385
|
-
QUnit.test(sTitle, function () {
|
|
2386
|
-
const oBinding = this.oModel.bindProperty((bRelative ? "" : "/") + "EMPLOYEES('1')/AGE");
|
|
2387
|
-
if (bRelative && bHasContext) {
|
|
2388
|
-
oBinding.oContext = {};
|
|
2389
|
-
if (bHasMethod) {
|
|
2390
|
-
oBinding.oContext.deregisterChangeListener = mustBeMocked;
|
|
2391
|
-
this.mock(oBinding.oContext).expects("deregisterChangeListener").twice()
|
|
2392
|
-
.withExactArgs(sinon.match.same(oBinding)).returns(false);
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
oBinding.sReducedPath = "/reduced/path";
|
|
2396
|
-
this.mock(oBinding).expects("doDeregisterChangeListener")
|
|
2397
|
-
.withExactArgs("/reduced/path", sinon.match.same(oBinding));
|
|
2398
|
-
|
|
2399
|
-
// code under test
|
|
2400
|
-
oBinding.deregisterChangeListener();
|
|
2401
|
-
|
|
2402
|
-
oBinding.sReducedPath = undefined;
|
|
2403
|
-
|
|
2404
|
-
// code under test - no further doDeregisterChangeListener
|
|
2405
|
-
oBinding.deregisterChangeListener();
|
|
2406
|
-
});
|
|
2407
|
-
});
|
|
2408
|
-
});
|
|
2409
|
-
});
|
|
2410
|
-
|
|
2411
|
-
//*********************************************************************************************
|
|
2412
|
-
QUnit.test("deregisterChangeListener: ask context; answers true", function () {
|
|
2413
|
-
const oBinding = this.oModel.bindProperty("EMPLOYEES('1')/AGE");
|
|
2414
|
-
oBinding.oContext = {deregisterChangeListener : mustBeMocked};
|
|
2415
|
-
oBinding.sReducedPath = "/reduced/path";
|
|
2416
|
-
|
|
2417
|
-
this.mock(oBinding.oContext).expects("deregisterChangeListener")
|
|
2418
|
-
.withExactArgs(sinon.match.same(oBinding)).returns(true);
|
|
2419
|
-
|
|
2420
|
-
// code under test
|
|
2421
|
-
oBinding.deregisterChangeListener();
|
|
2422
|
-
});
|
|
2423
|
-
|
|
2424
2375
|
//*********************************************************************************************
|
|
2425
2376
|
QUnit.test("visitSideEffects", function () {
|
|
2426
2377
|
var oBinding = this.oModel.bindProperty("/EMPLOYEES('1')/AGE");
|
|
@@ -4613,9 +4613,10 @@ sap.ui.define([
|
|
|
4613
4613
|
.returns(SyncPromise.resolve({foo : "n/a", $bar : "n/a", baz : "n/a"}));
|
|
4614
4614
|
this.mock(oGroupLock).expects("getUnlockedCopy").withExactArgs().returns("~groupLockCopy~");
|
|
4615
4615
|
oRequestorMock.expects("request")
|
|
4616
|
-
.withExactArgs("POST", "non/canonical/changeNextSibling", "~groupLockCopy~",
|
|
4617
|
-
|
|
4618
|
-
|
|
4616
|
+
.withExactArgs("POST", "non/canonical/changeNextSibling", "~groupLockCopy~", {
|
|
4617
|
+
"If-Match" : "~oChildNode~",
|
|
4618
|
+
Prefer : "return=minimal"
|
|
4619
|
+
}, {NextSibling : sSiblingPath ? {foo : "A", baz : "C"} : null})
|
|
4619
4620
|
.returns("B");
|
|
4620
4621
|
this.mock(oCache).expects("requestRank")
|
|
4621
4622
|
.withExactArgs("~oChildNode~", sinon.match.same(oGroupLock), true)
|
|
@@ -1112,8 +1112,8 @@ sap.ui.define([
|
|
|
1112
1112
|
QUnit.test("_Cache#registerChangeListener", function () {
|
|
1113
1113
|
var oCache = new _Cache(this.oRequestor, "TEAMS");
|
|
1114
1114
|
|
|
1115
|
-
this.mock(_Helper).expects("
|
|
1116
|
-
.withExactArgs(sinon.match.same(oCache
|
|
1115
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
1116
|
+
.withExactArgs(sinon.match.same(oCache), "path", "listener");
|
|
1117
1117
|
|
|
1118
1118
|
oCache.registerChangeListener("path", "listener");
|
|
1119
1119
|
});
|
|
@@ -1122,47 +1122,28 @@ sap.ui.define([
|
|
|
1122
1122
|
QUnit.test("_Cache#registerChangeListener: $$sharedRequest", function () {
|
|
1123
1123
|
var oCache = new _Cache(this.oRequestor, "TEAMS", undefined, false, undefined, true);
|
|
1124
1124
|
|
|
1125
|
-
this.mock(_Helper).expects("
|
|
1126
|
-
.withExactArgs(sinon.match.same(oCache
|
|
1125
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
1126
|
+
.withExactArgs(sinon.match.same(oCache), "", "listener2");
|
|
1127
1127
|
|
|
1128
1128
|
oCache.registerChangeListener("path", "listener1");
|
|
1129
1129
|
oCache.registerChangeListener("", "listener2");
|
|
1130
1130
|
});
|
|
1131
1131
|
|
|
1132
|
-
//*********************************************************************************************
|
|
1133
|
-
QUnit.test("_Cache#deregisterChangeListener", function () {
|
|
1134
|
-
var oCache = new _Cache(this.oRequestor, "TEAMS");
|
|
1135
|
-
|
|
1136
|
-
this.mock(_Helper).expects("removeByPath")
|
|
1137
|
-
.withExactArgs(sinon.match.same(oCache.mChangeListeners), "path", "listener");
|
|
1138
|
-
|
|
1139
|
-
oCache.deregisterChangeListener("path", "listener");
|
|
1140
|
-
});
|
|
1141
|
-
|
|
1142
|
-
//*********************************************************************************************
|
|
1143
|
-
QUnit.test("_Cache#deregisterChangeListener: $$sharedRequest", function () {
|
|
1144
|
-
var oCache = new _Cache(this.oRequestor, "TEAMS", undefined, false, undefined, true);
|
|
1145
|
-
|
|
1146
|
-
this.mock(_Helper).expects("removeByPath")
|
|
1147
|
-
.withExactArgs(sinon.match.same(oCache.mChangeListeners), "", "listener2");
|
|
1148
|
-
|
|
1149
|
-
oCache.deregisterChangeListener("path", "listener1");
|
|
1150
|
-
oCache.deregisterChangeListener("", "listener2");
|
|
1151
|
-
});
|
|
1152
|
-
|
|
1153
1132
|
//*********************************************************************************************
|
|
1154
1133
|
QUnit.test("_Cache#hasChangeListeners", function (assert) {
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
// code under test
|
|
1158
|
-
assert.strictEqual(oCache.hasChangeListeners(), false);
|
|
1134
|
+
const oCache = new _Cache(this.oRequestor, "TEAMS");
|
|
1135
|
+
const oHelperMock = this.mock(_Helper);
|
|
1159
1136
|
|
|
1160
|
-
|
|
1137
|
+
oHelperMock.expects("isEmptyObject")
|
|
1138
|
+
.withExactArgs(sinon.match.same(oCache.mChangeListeners))
|
|
1139
|
+
.returns(false);
|
|
1161
1140
|
|
|
1162
1141
|
// code under test
|
|
1163
1142
|
assert.strictEqual(oCache.hasChangeListeners(), true);
|
|
1164
1143
|
|
|
1165
|
-
|
|
1144
|
+
oHelperMock.expects("isEmptyObject")
|
|
1145
|
+
.withExactArgs(sinon.match.same(oCache.mChangeListeners))
|
|
1146
|
+
.returns(true);
|
|
1166
1147
|
|
|
1167
1148
|
// code under test
|
|
1168
1149
|
assert.strictEqual(oCache.hasChangeListeners(), false);
|
|
@@ -1782,6 +1763,20 @@ sap.ui.define([
|
|
|
1782
1763
|
});
|
|
1783
1764
|
});
|
|
1784
1765
|
|
|
1766
|
+
//*********************************************************************************************
|
|
1767
|
+
QUnit.test("_Cache#drillDown: unexpected missing predicate", function (assert) {
|
|
1768
|
+
const oCache = new _Cache(this.oRequestor, "Products");
|
|
1769
|
+
|
|
1770
|
+
this.oLogMock.expects("info").withExactArgs(
|
|
1771
|
+
"Failed to drill-down into ('42')/entity/foo/bar/baz, invalid segment: ('42')",
|
|
1772
|
+
"/~/Products", sClassName);
|
|
1773
|
+
|
|
1774
|
+
return oCache.drillDown([], "('42')/entity/foo/bar/baz")
|
|
1775
|
+
.then(function (vValue) {
|
|
1776
|
+
assert.strictEqual(vValue, undefined);
|
|
1777
|
+
});
|
|
1778
|
+
});
|
|
1779
|
+
|
|
1785
1780
|
//*********************************************************************************************
|
|
1786
1781
|
[0, "None"].forEach(function (vPermissions) {
|
|
1787
1782
|
QUnit.test("_Cache#drillDown: @Core.Permissions: " + vPermissions, function (assert) {
|
|
@@ -8285,7 +8280,10 @@ sap.ui.define([
|
|
|
8285
8280
|
oCache = this.createCache(sResourcePath),
|
|
8286
8281
|
fnCancelCallback = sinon.spy(),
|
|
8287
8282
|
iCountAfterCreate = bInactive ? 26 : 27,
|
|
8288
|
-
oCountChangeListener = {
|
|
8283
|
+
oCountChangeListener = {
|
|
8284
|
+
onChange : function () {},
|
|
8285
|
+
setDeregisterChangeListener : function () {}
|
|
8286
|
+
},
|
|
8289
8287
|
oCountChangeListenerMock = this.mock(oCountChangeListener),
|
|
8290
8288
|
oGroupLock = {
|
|
8291
8289
|
cancel : function () {},
|
|
@@ -8511,7 +8509,8 @@ sap.ui.define([
|
|
|
8511
8509
|
oListener = {
|
|
8512
8510
|
onChange : function () {
|
|
8513
8511
|
assert.ok(false);
|
|
8514
|
-
}
|
|
8512
|
+
},
|
|
8513
|
+
setDeregisterChangeListener : function () {}
|
|
8515
8514
|
},
|
|
8516
8515
|
that = this;
|
|
8517
8516
|
|
|
@@ -8553,7 +8552,10 @@ sap.ui.define([
|
|
|
8553
8552
|
oCacheMock = this.mock(oCache),
|
|
8554
8553
|
oCancelNestedExpectation,
|
|
8555
8554
|
aCollection = [],
|
|
8556
|
-
oCountChangeListener = {
|
|
8555
|
+
oCountChangeListener = {
|
|
8556
|
+
onChange : function () {},
|
|
8557
|
+
setDeregisterChangeListener : function () {}
|
|
8558
|
+
},
|
|
8557
8559
|
oCreatePromise,
|
|
8558
8560
|
oGroupLock = {getGroupId : function () {}},
|
|
8559
8561
|
oHelperMock = this.mock(_Helper),
|
|
@@ -8685,7 +8687,8 @@ sap.ui.define([
|
|
|
8685
8687
|
oCache.registerChangeListener(sPathInCache + sTransientPredicate + "/Name", {
|
|
8686
8688
|
onChange : function () {
|
|
8687
8689
|
assert.ok(false, "No change event for Name");
|
|
8688
|
-
}
|
|
8690
|
+
},
|
|
8691
|
+
setDeregisterChangeListener : function () {}
|
|
8689
8692
|
});
|
|
8690
8693
|
|
|
8691
8694
|
if (bDropTransientElement) { // side-effects refresh might drop transient element
|
|
@@ -9465,7 +9468,10 @@ sap.ui.define([
|
|
|
9465
9468
|
|
|
9466
9469
|
QUnit.test(sTitle, function (assert) {
|
|
9467
9470
|
var oCache = _Cache.create(this.oRequestor, "Employees"),
|
|
9468
|
-
oCountChangeListener = {
|
|
9471
|
+
oCountChangeListener = {
|
|
9472
|
+
onChange : function () {},
|
|
9473
|
+
setDeregisterChangeListener : function () {}
|
|
9474
|
+
},
|
|
9469
9475
|
oCreateGroupLock = {getGroupId : function () {}},
|
|
9470
9476
|
oHelperMock = this.mock(_Helper),
|
|
9471
9477
|
oPromise,
|
|
@@ -14,6 +14,8 @@ sap.ui.define([
|
|
|
14
14
|
|
|
15
15
|
var sClassName = "sap.ui.model.odata.v4.lib._Helper";
|
|
16
16
|
|
|
17
|
+
function mustBeMocked() { throw new Error("Must be mocked"); }
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* Checks the given cloned error according to the given expectations.
|
|
19
21
|
*
|
|
@@ -5468,4 +5470,32 @@ sap.ui.define([
|
|
|
5468
5470
|
}
|
|
5469
5471
|
});
|
|
5470
5472
|
});
|
|
5473
|
+
|
|
5474
|
+
//*********************************************************************************************
|
|
5475
|
+
QUnit.test("registerChangeListener", function () {
|
|
5476
|
+
const oOwner = {
|
|
5477
|
+
mChangeListeners : "~listeners1~"
|
|
5478
|
+
};
|
|
5479
|
+
const oListener = {
|
|
5480
|
+
setDeregisterChangeListener : mustBeMocked
|
|
5481
|
+
};
|
|
5482
|
+
|
|
5483
|
+
this.mock(_Helper).expects("addByPath")
|
|
5484
|
+
.withExactArgs("~listeners1~", "~path~", sinon.match.same(oListener));
|
|
5485
|
+
const oCallbackExpectation = this.mock(oListener).expects("setDeregisterChangeListener")
|
|
5486
|
+
.withExactArgs(sinon.match.func);
|
|
5487
|
+
|
|
5488
|
+
// code under test
|
|
5489
|
+
_Helper.registerChangeListener(oOwner, "~path~", oListener);
|
|
5490
|
+
|
|
5491
|
+
oOwner.mChangeListeners = "~listeners2~";
|
|
5492
|
+
this.mock(_Helper).expects("removeByPath")
|
|
5493
|
+
.withExactArgs("~listeners2~", "~path~", sinon.match.same(oListener));
|
|
5494
|
+
|
|
5495
|
+
// code under test
|
|
5496
|
+
oCallbackExpectation.args[0][0]();
|
|
5497
|
+
|
|
5498
|
+
// code under test
|
|
5499
|
+
_Helper.registerChangeListener(oOwner, "~path~");
|
|
5500
|
+
});
|
|
5471
5501
|
});
|
|
@@ -34,9 +34,10 @@ sap.ui.define(['sap/ui/performance/trace/FESR', 'sap/ui/performance/trace/Intera
|
|
|
34
34
|
afterEach: function(assert) {
|
|
35
35
|
assert.notOk(FESR.getActive(), "FESR is deactivated");
|
|
36
36
|
},
|
|
37
|
-
dummyRequest: function() {
|
|
37
|
+
dummyRequest: function(bUseUrlObject) {
|
|
38
38
|
var xhr = new XMLHttpRequest();
|
|
39
|
-
|
|
39
|
+
const sUrl = "resources/ui5loader.js?noCache=" + Date.now() + "-" + (++requestCounter);
|
|
40
|
+
xhr.open("GET", bUseUrlObject ? new URL(sUrl, document.baseURI) : sUrl, false);
|
|
40
41
|
xhr.send();
|
|
41
42
|
return xhr;
|
|
42
43
|
}
|
|
@@ -94,8 +95,8 @@ sap.ui.define(['sap/ui/performance/trace/FESR', 'sap/ui/performance/trace/Intera
|
|
|
94
95
|
Interaction.end(true);
|
|
95
96
|
oXhrHandle.abort();
|
|
96
97
|
|
|
97
|
-
// trigger another request to send FESR
|
|
98
|
-
oXhrHandle = this.dummyRequest();
|
|
98
|
+
// trigger another request to send FESR using URL object to ensure isCORSRequest can handle URL objects as well
|
|
99
|
+
oXhrHandle = this.dummyRequest(/* bUseUrlObject */ true);
|
|
99
100
|
|
|
100
101
|
assert.ok(oHeaderSpy.args.some(function(args) {
|
|
101
102
|
if (args[0] === "SAP-Perf-FESRec") {
|
|
@@ -167,8 +168,8 @@ sap.ui.define(['sap/ui/performance/trace/FESR', 'sap/ui/performance/trace/Intera
|
|
|
167
168
|
Interaction.end(true);
|
|
168
169
|
oXhrHandle.abort();
|
|
169
170
|
|
|
170
|
-
// trigger another request to send FESR
|
|
171
|
-
oXhrHandle = this.dummyRequest();
|
|
171
|
+
// trigger another request to send FESR using URL object to ensure isCORSRequest can handle URL objects as well
|
|
172
|
+
oXhrHandle = this.dummyRequest(/* bUseUrlObject */ true);
|
|
172
173
|
|
|
173
174
|
assert.ok(oHeaderSpy.args.some(function(args) {
|
|
174
175
|
if (args[0] === "SAP-Perf-FESRec") {
|
|
@@ -215,7 +216,8 @@ sap.ui.define(['sap/ui/performance/trace/FESR', 'sap/ui/performance/trace/Intera
|
|
|
215
216
|
Interaction.end(true);
|
|
216
217
|
oXhrHandle.abort();
|
|
217
218
|
// trigger initial FESR header creation (which should include the actual "action")
|
|
218
|
-
|
|
219
|
+
// using URL object to ensure isCORSRequest can handle URL objects as well
|
|
220
|
+
oXhrHandle = this.dummyRequest(/* bUseUrlObject */ true);
|
|
219
221
|
|
|
220
222
|
assert.ok(oHeaderSpy.args.some(function(args) {
|
|
221
223
|
if (args[0] === "SAP-Perf-FESRec") {
|