@openui5/sap.ui.core 1.121.3 → 1.121.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- 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/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 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- 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 +1 -1
- 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/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 +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 -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/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 +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 +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/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 +1 -1
- 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/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 +1 -1
- package/src/sap/ui/model/odata/v4/ODataBinding.js +27 -37
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +8 -20
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +3 -2
- 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 +1 -13
- 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/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/Storage.js +1 -1
- package/test/sap/ui/core/demokit/sample/MessageManager/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/json/JSONModel.qunit.js +117 -85
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +13 -7
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +17 -70
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +19 -42
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +13 -5
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +30 -12
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +0 -1
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +0 -18
- 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/types/DateFormat.qunit.js +51 -22
- package/test/sap/ui/core/qunit/types/Types.qunit.js +35 -6
- package/test/sap/ui/core/relnotes/changes-1.121.json +20 -0
|
@@ -81,6 +81,8 @@ sap.ui.define([
|
|
|
81
81
|
assert.strictEqual(oBinding.oCachePromise.getResult(), null);
|
|
82
82
|
assert.ok(oBinding.hasOwnProperty("mCacheQueryOptions"));
|
|
83
83
|
assert.strictEqual(oBinding.mCacheQueryOptions, undefined);
|
|
84
|
+
assert.ok(oBinding.hasOwnProperty("fnDeregisterChangeListener"));
|
|
85
|
+
assert.strictEqual(oBinding.fnDeregisterChangeListener, undefined);
|
|
84
86
|
assert.ok(oBinding.hasOwnProperty("oFetchCacheCallToken"));
|
|
85
87
|
assert.strictEqual(oBinding.oFetchCacheCallToken, undefined);
|
|
86
88
|
assert.ok(oBinding.hasOwnProperty("mLateQueryOptions"));
|
|
@@ -95,7 +97,6 @@ sap.ui.define([
|
|
|
95
97
|
QUnit.test("destroy", function (assert) {
|
|
96
98
|
var oBinding = new ODataBinding(),
|
|
97
99
|
oCache = {
|
|
98
|
-
deregisterChangeListener : function () {},
|
|
99
100
|
setActive : function () {}
|
|
100
101
|
},
|
|
101
102
|
// we might become asynchronous due to auto $expand/$select reading $metadata
|
|
@@ -107,8 +108,7 @@ sap.ui.define([
|
|
|
107
108
|
oBinding.mCacheQueryOptions = {};
|
|
108
109
|
oBinding.oContext = {}; // @see sap.ui.model.Binding's c'tor
|
|
109
110
|
oBinding.oFetchCacheCallToken = {};
|
|
110
|
-
this.mock(
|
|
111
|
-
.withExactArgs("", sinon.match.same(oBinding));
|
|
111
|
+
this.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
112
112
|
this.mock(oCache).expects("setActive").withExactArgs(false);
|
|
113
113
|
|
|
114
114
|
// code under test
|
|
@@ -1678,7 +1678,6 @@ sap.ui.define([
|
|
|
1678
1678
|
},
|
|
1679
1679
|
mMergedQueryOptions = {},
|
|
1680
1680
|
oOldCache = {
|
|
1681
|
-
deregisterChangeListener : function () {},
|
|
1682
1681
|
setActive : function () {},
|
|
1683
1682
|
setLateQueryOptions : function () {}
|
|
1684
1683
|
},
|
|
@@ -1693,8 +1692,8 @@ sap.ui.define([
|
|
|
1693
1692
|
.withExactArgs("/resource/path", sinon.match.same(mMergedQueryOptions), undefined,
|
|
1694
1693
|
undefined, "~sGroupId~", sinon.match.same(oOldCache))
|
|
1695
1694
|
.returns(oNewCache);
|
|
1696
|
-
this.mock(
|
|
1697
|
-
.withExactArgs(
|
|
1695
|
+
this.mock(oBinding).expects("deregisterChangeListener").exactly(bOldCacheIsReused ? 0 : 1)
|
|
1696
|
+
.withExactArgs();
|
|
1698
1697
|
this.mock(oOldCache).expects("setActive").exactly(bOldCacheIsReused ? 0 : 1)
|
|
1699
1698
|
.withExactArgs(false);
|
|
1700
1699
|
this.mock(oOldCache).expects("setLateQueryOptions")
|
|
@@ -1744,7 +1743,6 @@ sap.ui.define([
|
|
|
1744
1743
|
oContext = {},
|
|
1745
1744
|
mMergedQueryOptions = {},
|
|
1746
1745
|
oOldCache = {
|
|
1747
|
-
deregisterChangeListener : function () {},
|
|
1748
1746
|
setActive : function () {}
|
|
1749
1747
|
},
|
|
1750
1748
|
mQueryOptions = {},
|
|
@@ -1775,8 +1773,7 @@ sap.ui.define([
|
|
|
1775
1773
|
.returns(oCache);
|
|
1776
1774
|
this.mock(oCache).expects("setLateQueryOptions").exactly(bHasLateQueryOptions ? 1 : 0)
|
|
1777
1775
|
.withExactArgs(sinon.match.same(mLateQueryOptions));
|
|
1778
|
-
this.mock(
|
|
1779
|
-
.withExactArgs("", sinon.match.same(oBinding));
|
|
1776
|
+
this.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
1780
1777
|
this.mock(oOldCache).expects("setActive").withExactArgs(false);
|
|
1781
1778
|
|
|
1782
1779
|
assert.strictEqual(
|
|
@@ -1871,7 +1868,6 @@ sap.ui.define([
|
|
|
1871
1868
|
},
|
|
1872
1869
|
mMergedQueryOptions = {},
|
|
1873
1870
|
oOldCache = {
|
|
1874
|
-
deregisterChangeListener : function () {},
|
|
1875
1871
|
setActive : function () {}
|
|
1876
1872
|
},
|
|
1877
1873
|
mQueryOptions = {};
|
|
@@ -1890,8 +1886,7 @@ sap.ui.define([
|
|
|
1890
1886
|
sinon.match.same(oContext), "deep/resource/path", "~sGroupId~",
|
|
1891
1887
|
sinon.match.same(oOldCache))
|
|
1892
1888
|
.returns(oCache1);
|
|
1893
|
-
this.mock(
|
|
1894
|
-
.withExactArgs("", sinon.match.same(oBinding));
|
|
1889
|
+
this.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
1895
1890
|
this.mock(oOldCache).expects("setActive").withExactArgs(false);
|
|
1896
1891
|
|
|
1897
1892
|
assert.strictEqual(
|
|
@@ -3033,70 +3028,23 @@ sap.ui.define([
|
|
|
3033
3028
|
});
|
|
3034
3029
|
|
|
3035
3030
|
//*********************************************************************************************
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
const
|
|
3039
|
-
deregisterChangeListener : mustBeMocked
|
|
3040
|
-
};
|
|
3041
|
-
const oBinding = new ODataBinding({
|
|
3042
|
-
oCachePromise : SyncPromise.resolve(oCache)
|
|
3043
|
-
});
|
|
3044
|
-
|
|
3045
|
-
this.mock(oBinding).expects("getResolvedPath").withExactArgs().returns("/resolved/path");
|
|
3046
|
-
this.mock(_Helper).expects("getRelativePath")
|
|
3047
|
-
.withExactArgs("/absolute/path", "/resolved/path").returns(sRelativePath);
|
|
3048
|
-
this.mock(oCache).expects("deregisterChangeListener")
|
|
3049
|
-
.withExactArgs(sRelativePath, "~oListener~");
|
|
3031
|
+
QUnit.test("deregisterChangeListener", function (assert) {
|
|
3032
|
+
const oBinding = new ODataBinding();
|
|
3033
|
+
const fnDeregisterChangeListener = sinon.spy();
|
|
3050
3034
|
|
|
3051
3035
|
// code under test
|
|
3052
|
-
oBinding.
|
|
3053
|
-
});
|
|
3054
|
-
});
|
|
3036
|
+
oBinding.setDeregisterChangeListener(fnDeregisterChangeListener);
|
|
3055
3037
|
|
|
3056
|
-
|
|
3057
|
-
[false, true].forEach(function (bCache) {
|
|
3058
|
-
QUnit.test(`doDeregisterChangeListener: no ${bCache ? "matching " : ""} cache`, function () {
|
|
3059
|
-
const oBinding = new ODataBinding({
|
|
3060
|
-
oCachePromise : SyncPromise.resolve(bCache ? {} : null),
|
|
3061
|
-
oContext : {
|
|
3062
|
-
getBinding : mustBeMocked
|
|
3063
|
-
},
|
|
3064
|
-
bRelative : true
|
|
3065
|
-
});
|
|
3066
|
-
const oParentBinding = {
|
|
3067
|
-
doDeregisterChangeListener : mustBeMocked
|
|
3068
|
-
};
|
|
3069
|
-
|
|
3070
|
-
this.mock(oBinding).expects("getResolvedPath").exactly(bCache ? 1 : 0)
|
|
3071
|
-
.withExactArgs().returns("/resolved/path");
|
|
3072
|
-
this.mock(_Helper).expects("getRelativePath").exactly(bCache ? 1 : 0)
|
|
3073
|
-
.withExactArgs("/absolute/path", "/resolved/path").returns(undefined);
|
|
3074
|
-
this.mock(oBinding.oContext).expects("getBinding").withExactArgs().returns(oParentBinding);
|
|
3075
|
-
this.mock(oParentBinding).expects("doDeregisterChangeListener")
|
|
3076
|
-
.withExactArgs("/absolute/path", "~oListener~");
|
|
3038
|
+
assert.strictEqual(oBinding.fnDeregisterChangeListener, fnDeregisterChangeListener);
|
|
3077
3039
|
|
|
3078
3040
|
// code under test
|
|
3079
|
-
oBinding.
|
|
3080
|
-
});
|
|
3081
|
-
});
|
|
3082
|
-
|
|
3083
|
-
//*********************************************************************************************
|
|
3084
|
-
QUnit.test("doDeregisterChangeListener: no cache and no valid context", function () {
|
|
3085
|
-
const oBinding = new ODataBinding();
|
|
3041
|
+
oBinding.deregisterChangeListener();
|
|
3086
3042
|
|
|
3087
|
-
|
|
3088
|
-
oBinding.
|
|
3043
|
+
assert.ok(fnDeregisterChangeListener.calledOnceWithExactly());
|
|
3044
|
+
assert.strictEqual(oBinding.fnDeregisterChangeListener, undefined);
|
|
3089
3045
|
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
// code under test - absolute with context
|
|
3093
|
-
oBinding.doDeregisterChangeListener();
|
|
3094
|
-
|
|
3095
|
-
oBinding.bRelative = true;
|
|
3096
|
-
oBinding.oContext = {};
|
|
3097
|
-
|
|
3098
|
-
// code under test - base context
|
|
3099
|
-
oBinding.doDeregisterChangeListener();
|
|
3046
|
+
// code under test
|
|
3047
|
+
oBinding.deregisterChangeListener();
|
|
3100
3048
|
});
|
|
3101
3049
|
|
|
3102
3050
|
//*********************************************************************************************
|
|
@@ -3106,7 +3054,6 @@ sap.ui.define([
|
|
|
3106
3054
|
[
|
|
3107
3055
|
"adjustPredicate",
|
|
3108
3056
|
"destroy",
|
|
3109
|
-
"doDeregisterChangeListener",
|
|
3110
3057
|
"hasPendingChangesForPath"
|
|
3111
3058
|
].forEach(function (sMethod) {
|
|
3112
3059
|
assert.strictEqual(asODataBinding.prototype[sMethod], oBinding[sMethod]);
|
|
@@ -385,8 +385,7 @@ sap.ui.define([
|
|
|
385
385
|
QUnit.test("mixin", function (assert) {
|
|
386
386
|
var oBinding = this.bindContext("/EMPLOYEES('42')"),
|
|
387
387
|
oMixin = {},
|
|
388
|
-
aOverriddenFunctions = ["adjustPredicate", "destroy", "
|
|
389
|
-
"doSetProperty", "doSuspend"];
|
|
388
|
+
aOverriddenFunctions = ["adjustPredicate", "destroy", "doSetProperty", "doSuspend"];
|
|
390
389
|
|
|
391
390
|
asODataParentBinding(oMixin);
|
|
392
391
|
|
|
@@ -703,7 +702,10 @@ sap.ui.define([
|
|
|
703
702
|
});
|
|
704
703
|
|
|
705
704
|
this.mock(oBinding).expects("createReadGroupLock").withExactArgs("group", true)
|
|
706
|
-
.
|
|
705
|
+
.callsFake(function () {
|
|
706
|
+
oBinding.oReadGroupLock = oGroupLock2;
|
|
707
|
+
});
|
|
708
|
+
this.mock(oBinding.oCache).expects("hasChangeListeners").withExactArgs().returns(true);
|
|
707
709
|
|
|
708
710
|
// code under test (as called by ODataBinding#refresh)
|
|
709
711
|
oBinding.refreshInternal("", "group", true);
|
|
@@ -893,8 +895,8 @@ sap.ui.define([
|
|
|
893
895
|
this.mock(oBinding).expects("getRelativePath")
|
|
894
896
|
.withExactArgs("/OperationImport(...)/$Parameter/" + oFixture.path)
|
|
895
897
|
.returns("$Parameter/" + oFixture.path);
|
|
896
|
-
this.mock(_Helper).expects("
|
|
897
|
-
.withExactArgs(sinon.match.same(oBinding.oOperation
|
|
898
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
899
|
+
.withExactArgs(sinon.match.same(oBinding.oOperation), oFixture.path,
|
|
898
900
|
sinon.match.same(oListener));
|
|
899
901
|
|
|
900
902
|
assert.strictEqual(
|
|
@@ -961,8 +963,8 @@ sap.ui.define([
|
|
|
961
963
|
this.mock(oBinding).expects("getRelativePath")
|
|
962
964
|
.withExactArgs("/OperationImport(...)/$Parameter/address/city")
|
|
963
965
|
.returns("$Parameter/address/city");
|
|
964
|
-
this.mock(_Helper).expects("
|
|
965
|
-
.withExactArgs(sinon.match.same(oBinding.oOperation
|
|
966
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
967
|
+
.withExactArgs(sinon.match.same(oBinding.oOperation), "address/city",
|
|
966
968
|
sinon.match.same(oListener));
|
|
967
969
|
|
|
968
970
|
assert.strictEqual(
|
|
@@ -3484,7 +3486,9 @@ sap.ui.define([
|
|
|
3484
3486
|
});
|
|
3485
3487
|
}),
|
|
3486
3488
|
fnFetchCache,
|
|
3487
|
-
oGroupLock = {
|
|
3489
|
+
oGroupLock = {
|
|
3490
|
+
unlock : mustBeMocked
|
|
3491
|
+
},
|
|
3488
3492
|
fnHasChangeListeners,
|
|
3489
3493
|
sPath = {/*EMPLOYEES('42')*/},
|
|
3490
3494
|
oRefreshResult;
|
|
@@ -3498,7 +3502,9 @@ sap.ui.define([
|
|
|
3498
3502
|
fnHasChangeListeners = this.mock(oBinding.oCache).expects("hasChangeListeners")
|
|
3499
3503
|
.withExactArgs().returns(bHasChangeListeners);
|
|
3500
3504
|
this.mock(oBinding).expects("createReadGroupLock").withExactArgs("myGroup", false)
|
|
3501
|
-
.
|
|
3505
|
+
.callsFake(function () {
|
|
3506
|
+
oBinding.oReadGroupLock = oGroupLock;
|
|
3507
|
+
});
|
|
3502
3508
|
this.mock(oBinding).expects("removeCachesAndMessages")
|
|
3503
3509
|
.withExactArgs(sinon.match.same(sPath));
|
|
3504
3510
|
fnFetchCache = oBindingMock.expects("fetchCache")
|
|
@@ -3506,6 +3512,8 @@ sap.ui.define([
|
|
|
3506
3512
|
bKeepCacheOnError ? "myGroup" : undefined);
|
|
3507
3513
|
this.mock(oBinding).expects("createRefreshPromise").exactly(bHasChangeListeners ? 1 : 0)
|
|
3508
3514
|
.withExactArgs(bKeepCacheOnError).callThrough();
|
|
3515
|
+
this.mock(oGroupLock).expects("unlock").exactly(bHasChangeListeners ? 0 : 1)
|
|
3516
|
+
.withExactArgs();
|
|
3509
3517
|
this.mock(oBinding).expects("refreshDependentBindings")
|
|
3510
3518
|
.withExactArgs(sinon.match.same(sPath), "myGroup", sinon.match.same(bCheckUpdate),
|
|
3511
3519
|
bKeepCacheOnError)
|
|
@@ -3518,6 +3526,7 @@ sap.ui.define([
|
|
|
3518
3526
|
});
|
|
3519
3527
|
|
|
3520
3528
|
assert.strictEqual(oBinding.bHasFetchedExpandSelectProperties, false);
|
|
3529
|
+
assert.strictEqual(oBinding.oReadGroupLock, bHasChangeListeners ? oGroupLock : undefined);
|
|
3521
3530
|
sinon.assert.callOrder(fnHasChangeListeners, fnFetchCache);
|
|
3522
3531
|
if (bHasChangeListeners) { // simulate fetchValue triggered by a property binding
|
|
3523
3532
|
oBinding.resolveRefreshPromise(Promise.resolve());
|
|
@@ -3585,6 +3594,7 @@ sap.ui.define([
|
|
|
3585
3594
|
.callsFake(function () {
|
|
3586
3595
|
oBinding.oReadGroupLock = oReadGroupLock;
|
|
3587
3596
|
});
|
|
3597
|
+
this.mock(oBinding.oCache).expects("hasChangeListeners").withExactArgs().returns(true);
|
|
3588
3598
|
this.mock(_Cache).expects("createSingle").returns(oCache);
|
|
3589
3599
|
|
|
3590
3600
|
// code under test
|
|
@@ -4496,8 +4506,6 @@ sap.ui.define([
|
|
|
4496
4506
|
this.mock(oBinding).expects("getRelativePath")
|
|
4497
4507
|
.withExactArgs("/Operation(...)/$Parameter/name")
|
|
4498
4508
|
.returns("$Parameter/name");
|
|
4499
|
-
this.mock(_Helper).expects("addByPath")
|
|
4500
|
-
.withExactArgs(sinon.match.same(oBinding.oOperation.mChangeListeners), "name", null);
|
|
4501
4509
|
|
|
4502
4510
|
// code under test value setting
|
|
4503
4511
|
oBinding.setParameter("name", "value");
|
|
@@ -5202,37 +5210,6 @@ sap.ui.define([
|
|
|
5202
5210
|
});
|
|
5203
5211
|
});
|
|
5204
5212
|
|
|
5205
|
-
//*********************************************************************************************
|
|
5206
|
-
QUnit.test("doDeregisterChangeListener: super", function () {
|
|
5207
|
-
const oBinding = this.bindContext("/EMPLOYEES('42')");
|
|
5208
|
-
|
|
5209
|
-
this.mock(asODataParentBinding.prototype).expects("doDeregisterChangeListener")
|
|
5210
|
-
.on(oBinding).withExactArgs("/absolute/path", "~oListener~");
|
|
5211
|
-
|
|
5212
|
-
// code under test
|
|
5213
|
-
oBinding.doDeregisterChangeListener("/absolute/path", "~oListener~");
|
|
5214
|
-
});
|
|
5215
|
-
|
|
5216
|
-
//*********************************************************************************************
|
|
5217
|
-
[undefined, "", "relative/path"].forEach(function (sRelativePath, i) {
|
|
5218
|
-
QUnit.test(`doDeregisterChangeListener: operation binding, ${sRelativePath}`, function () {
|
|
5219
|
-
const oBinding = this.bindContext("/Operation(...)");
|
|
5220
|
-
|
|
5221
|
-
this.mock(_Helper).expects("getRelativePath")
|
|
5222
|
-
.withExactArgs("/absolute/path", "/Operation(...)/$Parameter")
|
|
5223
|
-
.returns(sRelativePath);
|
|
5224
|
-
this.mock(_Helper).expects("removeByPath").exactly(i ? 1 : 0)
|
|
5225
|
-
.withExactArgs(sinon.match.same(oBinding.oOperation.mChangeListeners), sRelativePath,
|
|
5226
|
-
"~oListener~");
|
|
5227
|
-
this.mock(asODataParentBinding.prototype).expects("doDeregisterChangeListener")
|
|
5228
|
-
.exactly(i ? 0 : 1)
|
|
5229
|
-
.on(oBinding).withExactArgs("/absolute/path", sinon.match.same("~oListener~"));
|
|
5230
|
-
|
|
5231
|
-
// code under test
|
|
5232
|
-
oBinding.doDeregisterChangeListener("/absolute/path", "~oListener~");
|
|
5233
|
-
});
|
|
5234
|
-
});
|
|
5235
|
-
|
|
5236
5213
|
//*********************************************************************************************
|
|
5237
5214
|
QUnit.test("doSetProperty: non operational binding", function (assert) {
|
|
5238
5215
|
var oBinding = this.bindContext("/Employee('42')"),
|
|
@@ -2583,10 +2583,10 @@ sap.ui.define([
|
|
|
2583
2583
|
[
|
|
2584
2584
|
{success : true},
|
|
2585
2585
|
{success : true, refreshKeptElementsFails : true},
|
|
2586
|
+
{success : true, destroyedWhileRefreshing : true},
|
|
2586
2587
|
{success : false}
|
|
2587
2588
|
].forEach(function (oFixture) {
|
|
2588
|
-
var sTitle = "refreshInternal: relative with own cache,
|
|
2589
|
-
+ ", refreshKeptElements fails = " + oFixture.refreshKeptElementsFails;
|
|
2589
|
+
var sTitle = "refreshInternal: relative with own cache, " + JSON.stringify(oFixture);
|
|
2590
2590
|
|
|
2591
2591
|
QUnit.test(sTitle, function (assert) {
|
|
2592
2592
|
var oBinding,
|
|
@@ -2629,12 +2629,18 @@ sap.ui.define([
|
|
|
2629
2629
|
this.mock(oBinding).expects("fetchCache")
|
|
2630
2630
|
.withExactArgs(sinon.match.same(oContext), false, /*bKeepQueryOptions*/true, undefined);
|
|
2631
2631
|
this.mock(oBinding).expects("refreshKeptElements").withExactArgs("myGroup")
|
|
2632
|
-
.
|
|
2632
|
+
.callsFake(function () {
|
|
2633
|
+
if (oFixture.destroyedWhileRefreshing) {
|
|
2634
|
+
oBinding.oHeaderContext = undefined;
|
|
2635
|
+
}
|
|
2636
|
+
return oRefreshKeptElementsPromise;
|
|
2637
|
+
});
|
|
2633
2638
|
this.mock(oBinding).expects("createRefreshPromise").withExactArgs(undefined).callThrough();
|
|
2634
2639
|
this.mock(oBinding).expects("reset")
|
|
2635
2640
|
.withExactArgs(ChangeReason.Refresh, undefined, "myGroup");
|
|
2636
2641
|
this.mock(oBinding.oHeaderContext).expects("checkUpdateInternal")
|
|
2637
|
-
.exactly(oFixture.success && !oFixture.refreshKeptElementsFails
|
|
2642
|
+
.exactly(oFixture.success && !oFixture.refreshKeptElementsFails
|
|
2643
|
+
&& !oFixture.destroyedWhileRefreshing ? 1 : 0)
|
|
2638
2644
|
.withExactArgs()
|
|
2639
2645
|
.returns(oHeaderContextCheckUpdatePromise);
|
|
2640
2646
|
|
|
@@ -2647,7 +2653,9 @@ sap.ui.define([
|
|
|
2647
2653
|
return oRefreshResult.then(function (oResult) {
|
|
2648
2654
|
assert.ok(oFixture.success);
|
|
2649
2655
|
assert.notOk(oFixture.refreshKeptElementsFails);
|
|
2650
|
-
|
|
2656
|
+
if (!oFixture.destroyedWhileRefreshing) {
|
|
2657
|
+
assert.strictEqual(oResult, oHeaderContextCheckUpdatePromise.getResult());
|
|
2658
|
+
}
|
|
2651
2659
|
}, function (oError0) {
|
|
2652
2660
|
assert.strictEqual(oError0, oError);
|
|
2653
2661
|
assert.ok(!oFixture.success || oFixture.refreshKeptElementsFails);
|
|
@@ -5092,12 +5092,6 @@ sap.ui.define([
|
|
|
5092
5092
|
var oListBindingWithoutUI = oModel.bindList("/SalesOrderList"),
|
|
5093
5093
|
oCreatedPromise = oListBindingWithoutUI.create({}, true).created();
|
|
5094
5094
|
|
|
5095
|
-
// This error is unavoidable as #fetchValue runs right after creating the context, but
|
|
5096
|
-
// fails as the context is deleted already.
|
|
5097
|
-
that.oLogMock.expects("error")
|
|
5098
|
-
.withArgs(sinon.match("Failed to drill-down into ($uid="),
|
|
5099
|
-
sSalesOrderService + "SalesOrderList", "sap.ui.model.odata.v4.lib._Cache");
|
|
5100
|
-
|
|
5101
5095
|
assert.ok(oModel.hasPendingChanges());
|
|
5102
5096
|
assert.ok(oListBindingWithoutUI.hasPendingChanges());
|
|
5103
5097
|
assert.strictEqual(oListBindingWithoutUI.getLength(), 1 + 10/*length is not final*/);
|
|
@@ -23265,12 +23259,6 @@ sap.ui.define([
|
|
|
23265
23259
|
|
|
23266
23260
|
assert.strictEqual(oTable.getBinding("rows").getContexts().length, 2);
|
|
23267
23261
|
|
|
23268
|
-
that.oLogMock.expects("error").withExactArgs("Failed to drill-down into"
|
|
23269
|
-
+ " (Country='UK',Region='Z')/Region, invalid segment: (Country='UK',Region='Z')",
|
|
23270
|
-
"/aggregation/BusinessPartners"
|
|
23271
|
-
+ "?$apply=groupby((Country,Region),aggregate(SalesAmount))",
|
|
23272
|
-
"sap.ui.model.odata.v4.lib._Cache");
|
|
23273
|
-
|
|
23274
23262
|
// code under test
|
|
23275
23263
|
assert.strictEqual(oThirdRow.getProperty("Region"), undefined,
|
|
23276
23264
|
"$byPredicate has been cleaned up");
|
|
@@ -61406,4 +61394,34 @@ make root = ${bMakeRoot}`;
|
|
|
61406
61394
|
]);
|
|
61407
61395
|
});
|
|
61408
61396
|
});
|
|
61397
|
+
|
|
61398
|
+
//*********************************************************************************************
|
|
61399
|
+
// Scenario: setBindingContext of a table w/o cache below a context binding w/o own properties.
|
|
61400
|
+
// See that this context binding can refresh properly afterwards.
|
|
61401
|
+
// SNOW: DINC0117588
|
|
61402
|
+
QUnit.test("DINC0117588", async function (assert) {
|
|
61403
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
61404
|
+
const sView = `
|
|
61405
|
+
<FlexBox id="root" binding="{/TEAMS('0')}">
|
|
61406
|
+
<Table id="table" items="{TEAM_2_EMPLOYEES}">
|
|
61407
|
+
<Text id="id" text="{ID}"/>
|
|
61408
|
+
</Table>
|
|
61409
|
+
</FlexBox>`;
|
|
61410
|
+
|
|
61411
|
+
this.expectRequest("TEAMS('0')?$select=Team_Id&$expand=TEAM_2_EMPLOYEES($select=ID)", {
|
|
61412
|
+
TeamId : "0",
|
|
61413
|
+
TEAM_2_EMPLOYEES : [
|
|
61414
|
+
{ID : "1"}
|
|
61415
|
+
]
|
|
61416
|
+
})
|
|
61417
|
+
.expectChange("id", ["1"]);
|
|
61418
|
+
|
|
61419
|
+
await this.createView(assert, sView, oModel);
|
|
61420
|
+
|
|
61421
|
+
this.oView.byId("table").setBindingContext(null);
|
|
61422
|
+
|
|
61423
|
+
await this.waitForChanges(assert);
|
|
61424
|
+
|
|
61425
|
+
await this.oView.byId("root").getBindingContext().requestRefresh();
|
|
61426
|
+
});
|
|
61409
61427
|
});
|
|
@@ -2246,7 +2246,6 @@ sap.ui.define([
|
|
|
2246
2246
|
|
|
2247
2247
|
oPropertyBinding.oCheckUpdateCallToken = {};
|
|
2248
2248
|
oPropertyBinding.vValue = "foo";
|
|
2249
|
-
this.mock(oPropertyBinding).expects("deregisterChangeListener").withExactArgs();
|
|
2250
2249
|
this.mock(this.oModel).expects("bindingDestroyed")
|
|
2251
2250
|
.withExactArgs(sinon.match.same(oPropertyBinding));
|
|
2252
2251
|
this.mock(asODataBinding.prototype).expects("destroy").on(oPropertyBinding).withExactArgs();
|
|
@@ -2361,23 +2360,6 @@ sap.ui.define([
|
|
|
2361
2360
|
oBinding.resetInvalidDataState();
|
|
2362
2361
|
});
|
|
2363
2362
|
|
|
2364
|
-
//*********************************************************************************************
|
|
2365
|
-
QUnit.test("deregisterChangeListener", function () {
|
|
2366
|
-
var oBinding = this.oModel.bindProperty("/EMPLOYEES('1')/AGE");
|
|
2367
|
-
|
|
2368
|
-
oBinding.sReducedPath = "/reduced/path";
|
|
2369
|
-
this.mock(oBinding).expects("doDeregisterChangeListener")
|
|
2370
|
-
.withExactArgs("/reduced/path", sinon.match.same(oBinding));
|
|
2371
|
-
|
|
2372
|
-
// code under test
|
|
2373
|
-
oBinding.deregisterChangeListener();
|
|
2374
|
-
|
|
2375
|
-
oBinding.sReducedPath = undefined;
|
|
2376
|
-
|
|
2377
|
-
// code under test - no further doDeregisterChangeListener
|
|
2378
|
-
oBinding.deregisterChangeListener();
|
|
2379
|
-
});
|
|
2380
|
-
|
|
2381
2363
|
//*********************************************************************************************
|
|
2382
2364
|
QUnit.test("visitSideEffects", function () {
|
|
2383
2365
|
var oBinding = this.oModel.bindProperty("/EMPLOYEES('1')/AGE");
|
|
@@ -1113,8 +1113,8 @@ sap.ui.define([
|
|
|
1113
1113
|
QUnit.test("_Cache#registerChangeListener", function () {
|
|
1114
1114
|
var oCache = new _Cache(this.oRequestor, "TEAMS");
|
|
1115
1115
|
|
|
1116
|
-
this.mock(_Helper).expects("
|
|
1117
|
-
.withExactArgs(sinon.match.same(oCache
|
|
1116
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
1117
|
+
.withExactArgs(sinon.match.same(oCache), "path", "listener");
|
|
1118
1118
|
|
|
1119
1119
|
oCache.registerChangeListener("path", "listener");
|
|
1120
1120
|
});
|
|
@@ -1123,47 +1123,28 @@ sap.ui.define([
|
|
|
1123
1123
|
QUnit.test("_Cache#registerChangeListener: $$sharedRequest", function () {
|
|
1124
1124
|
var oCache = new _Cache(this.oRequestor, "TEAMS", undefined, false, undefined, true);
|
|
1125
1125
|
|
|
1126
|
-
this.mock(_Helper).expects("
|
|
1127
|
-
.withExactArgs(sinon.match.same(oCache
|
|
1126
|
+
this.mock(_Helper).expects("registerChangeListener")
|
|
1127
|
+
.withExactArgs(sinon.match.same(oCache), "", "listener2");
|
|
1128
1128
|
|
|
1129
1129
|
oCache.registerChangeListener("path", "listener1");
|
|
1130
1130
|
oCache.registerChangeListener("", "listener2");
|
|
1131
1131
|
});
|
|
1132
1132
|
|
|
1133
|
-
//*********************************************************************************************
|
|
1134
|
-
QUnit.test("_Cache#deregisterChangeListener", function () {
|
|
1135
|
-
var oCache = new _Cache(this.oRequestor, "TEAMS");
|
|
1136
|
-
|
|
1137
|
-
this.mock(_Helper).expects("removeByPath")
|
|
1138
|
-
.withExactArgs(sinon.match.same(oCache.mChangeListeners), "path", "listener");
|
|
1139
|
-
|
|
1140
|
-
oCache.deregisterChangeListener("path", "listener");
|
|
1141
|
-
});
|
|
1142
|
-
|
|
1143
|
-
//*********************************************************************************************
|
|
1144
|
-
QUnit.test("_Cache#deregisterChangeListener: $$sharedRequest", function () {
|
|
1145
|
-
var oCache = new _Cache(this.oRequestor, "TEAMS", undefined, false, undefined, true);
|
|
1146
|
-
|
|
1147
|
-
this.mock(_Helper).expects("removeByPath")
|
|
1148
|
-
.withExactArgs(sinon.match.same(oCache.mChangeListeners), "", "listener2");
|
|
1149
|
-
|
|
1150
|
-
oCache.deregisterChangeListener("path", "listener1");
|
|
1151
|
-
oCache.deregisterChangeListener("", "listener2");
|
|
1152
|
-
});
|
|
1153
|
-
|
|
1154
1133
|
//*********************************************************************************************
|
|
1155
1134
|
QUnit.test("_Cache#hasChangeListeners", function (assert) {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
// code under test
|
|
1159
|
-
assert.strictEqual(oCache.hasChangeListeners(), false);
|
|
1135
|
+
const oCache = new _Cache(this.oRequestor, "TEAMS");
|
|
1136
|
+
const oHelperMock = this.mock(_Helper);
|
|
1160
1137
|
|
|
1161
|
-
|
|
1138
|
+
oHelperMock.expects("isEmptyObject")
|
|
1139
|
+
.withExactArgs(sinon.match.same(oCache.mChangeListeners))
|
|
1140
|
+
.returns(false);
|
|
1162
1141
|
|
|
1163
1142
|
// code under test
|
|
1164
1143
|
assert.strictEqual(oCache.hasChangeListeners(), true);
|
|
1165
1144
|
|
|
1166
|
-
|
|
1145
|
+
oHelperMock.expects("isEmptyObject")
|
|
1146
|
+
.withExactArgs(sinon.match.same(oCache.mChangeListeners))
|
|
1147
|
+
.returns(true);
|
|
1167
1148
|
|
|
1168
1149
|
// code under test
|
|
1169
1150
|
assert.strictEqual(oCache.hasChangeListeners(), false);
|
|
@@ -1783,6 +1764,20 @@ sap.ui.define([
|
|
|
1783
1764
|
});
|
|
1784
1765
|
});
|
|
1785
1766
|
|
|
1767
|
+
//*********************************************************************************************
|
|
1768
|
+
QUnit.test("_Cache#drillDown: unexpected missing predicate", function (assert) {
|
|
1769
|
+
const oCache = new _Cache(this.oRequestor, "Products");
|
|
1770
|
+
|
|
1771
|
+
this.oLogMock.expects("info").withExactArgs(
|
|
1772
|
+
"Failed to drill-down into ('42')/entity/foo/bar/baz, invalid segment: ('42')",
|
|
1773
|
+
"/~/Products", sClassName);
|
|
1774
|
+
|
|
1775
|
+
return oCache.drillDown([], "('42')/entity/foo/bar/baz")
|
|
1776
|
+
.then(function (vValue) {
|
|
1777
|
+
assert.strictEqual(vValue, undefined);
|
|
1778
|
+
});
|
|
1779
|
+
});
|
|
1780
|
+
|
|
1786
1781
|
//*********************************************************************************************
|
|
1787
1782
|
[0, "None"].forEach(function (vPermissions) {
|
|
1788
1783
|
QUnit.test("_Cache#drillDown: @Core.Permissions: " + vPermissions, function (assert) {
|
|
@@ -8267,7 +8262,10 @@ sap.ui.define([
|
|
|
8267
8262
|
oCache = this.createCache(sResourcePath),
|
|
8268
8263
|
fnCancelCallback = sinon.spy(),
|
|
8269
8264
|
iCountAfterCreate = bInactive ? 26 : 27,
|
|
8270
|
-
oCountChangeListener = {
|
|
8265
|
+
oCountChangeListener = {
|
|
8266
|
+
onChange : function () {},
|
|
8267
|
+
setDeregisterChangeListener : function () {}
|
|
8268
|
+
},
|
|
8271
8269
|
oCountChangeListenerMock = this.mock(oCountChangeListener),
|
|
8272
8270
|
oGroupLock = {
|
|
8273
8271
|
cancel : function () {},
|
|
@@ -8493,7 +8491,8 @@ sap.ui.define([
|
|
|
8493
8491
|
oListener = {
|
|
8494
8492
|
onChange : function () {
|
|
8495
8493
|
assert.ok(false);
|
|
8496
|
-
}
|
|
8494
|
+
},
|
|
8495
|
+
setDeregisterChangeListener : function () {}
|
|
8497
8496
|
},
|
|
8498
8497
|
that = this;
|
|
8499
8498
|
|
|
@@ -8535,7 +8534,10 @@ sap.ui.define([
|
|
|
8535
8534
|
oCacheMock = this.mock(oCache),
|
|
8536
8535
|
oCancelNestedExpectation,
|
|
8537
8536
|
aCollection = [],
|
|
8538
|
-
oCountChangeListener = {
|
|
8537
|
+
oCountChangeListener = {
|
|
8538
|
+
onChange : function () {},
|
|
8539
|
+
setDeregisterChangeListener : function () {}
|
|
8540
|
+
},
|
|
8539
8541
|
oCreatePromise,
|
|
8540
8542
|
oGroupLock = {getGroupId : function () {}},
|
|
8541
8543
|
oHelperMock = this.mock(_Helper),
|
|
@@ -8667,7 +8669,8 @@ sap.ui.define([
|
|
|
8667
8669
|
oCache.registerChangeListener(sPathInCache + sTransientPredicate + "/Name", {
|
|
8668
8670
|
onChange : function () {
|
|
8669
8671
|
assert.ok(false, "No change event for Name");
|
|
8670
|
-
}
|
|
8672
|
+
},
|
|
8673
|
+
setDeregisterChangeListener : function () {}
|
|
8671
8674
|
});
|
|
8672
8675
|
|
|
8673
8676
|
if (bDropTransientElement) { // side-effects refresh might drop transient element
|
|
@@ -9447,7 +9450,10 @@ sap.ui.define([
|
|
|
9447
9450
|
|
|
9448
9451
|
QUnit.test(sTitle, function (assert) {
|
|
9449
9452
|
var oCache = _Cache.create(this.oRequestor, "Employees"),
|
|
9450
|
-
oCountChangeListener = {
|
|
9453
|
+
oCountChangeListener = {
|
|
9454
|
+
onChange : function () {},
|
|
9455
|
+
setDeregisterChangeListener : function () {}
|
|
9456
|
+
},
|
|
9451
9457
|
oCreateGroupLock = {getGroupId : function () {}},
|
|
9452
9458
|
oHelperMock = this.mock(_Helper),
|
|
9453
9459
|
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
|
*
|
|
@@ -5451,4 +5453,32 @@ sap.ui.define([
|
|
|
5451
5453
|
}
|
|
5452
5454
|
});
|
|
5453
5455
|
});
|
|
5456
|
+
|
|
5457
|
+
//*********************************************************************************************
|
|
5458
|
+
QUnit.test("registerChangeListener", function () {
|
|
5459
|
+
const oOwner = {
|
|
5460
|
+
mChangeListeners : "~listeners1~"
|
|
5461
|
+
};
|
|
5462
|
+
const oListener = {
|
|
5463
|
+
setDeregisterChangeListener : mustBeMocked
|
|
5464
|
+
};
|
|
5465
|
+
|
|
5466
|
+
this.mock(_Helper).expects("addByPath")
|
|
5467
|
+
.withExactArgs("~listeners1~", "~path~", sinon.match.same(oListener));
|
|
5468
|
+
const oCallbackExpectation = this.mock(oListener).expects("setDeregisterChangeListener")
|
|
5469
|
+
.withExactArgs(sinon.match.func);
|
|
5470
|
+
|
|
5471
|
+
// code under test
|
|
5472
|
+
_Helper.registerChangeListener(oOwner, "~path~", oListener);
|
|
5473
|
+
|
|
5474
|
+
oOwner.mChangeListeners = "~listeners2~";
|
|
5475
|
+
this.mock(_Helper).expects("removeByPath")
|
|
5476
|
+
.withExactArgs("~listeners2~", "~path~", sinon.match.same(oListener));
|
|
5477
|
+
|
|
5478
|
+
// code under test
|
|
5479
|
+
oCallbackExpectation.args[0][0]();
|
|
5480
|
+
|
|
5481
|
+
// code under test
|
|
5482
|
+
_Helper.registerChangeListener(oOwner, "~path~");
|
|
5483
|
+
});
|
|
5454
5484
|
});
|