@openui5/sap.ui.core 1.120.1 → 1.120.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/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +1 -1
- 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/BindingParser.js +4 -4
- package/src/sap/ui/base/DataType.js +5 -5
- 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 +9 -9
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/ManagedObjectRegistry.js +186 -169
- 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 +3 -3
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +30 -144
- package/src/sap/ui/core/ComponentContainer.js +3 -3
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentRegistry.js +153 -0
- package/src/sap/ui/core/ComponentSupport.js +3 -3
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/Control.js +6 -4
- package/src/sap/ui/core/Core.js +6 -4
- 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 +25 -141
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/ElementRegistry.js +159 -0
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +5 -5
- package/src/sap/ui/core/FocusHandler.js +3 -2
- package/src/sap/ui/core/Fragment.js +5 -5
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +7 -7
- 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 +55 -11
- package/src/sap/ui/core/Manifest.js +4 -5
- package/src/sap/ui/core/Message.js +2 -1
- package/src/sap/ui/core/Messaging.js +2 -2
- 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/Shortcut.js +15 -9
- package/src/sap/ui/core/StaticArea.js +4 -1
- package/src/sap/ui/core/Theming.js +3 -3
- 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 +51 -13
- package/src/sap/ui/core/UIAreaRegistry.js +150 -0
- package/src/sap/ui/core/UIComponent.js +3 -3
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +95 -76
- package/src/sap/ui/core/cldr/Unicode-Data-Files-LICENSE.txt +1 -1
- package/src/sap/ui/core/cldr/cy.json +12 -3
- package/src/sap/ui/core/cldr/en_AU.json +48 -12
- package/src/sap/ui/core/cldr/en_GB.json +24 -6
- package/src/sap/ui/core/cldr/en_HK.json +24 -6
- package/src/sap/ui/core/cldr/en_IE.json +24 -6
- package/src/sap/ui/core/cldr/en_IN.json +24 -6
- package/src/sap/ui/core/cldr/en_NZ.json +24 -6
- package/src/sap/ui/core/cldr/en_PG.json +24 -6
- package/src/sap/ui/core/cldr/en_SG.json +24 -6
- package/src/sap/ui/core/cldr/en_ZA.json +24 -6
- package/src/sap/ui/core/cldr/es.json +288 -72
- package/src/sap/ui/core/cldr/es_AR.json +288 -72
- package/src/sap/ui/core/cldr/es_BO.json +288 -72
- package/src/sap/ui/core/cldr/es_CL.json +144 -36
- package/src/sap/ui/core/cldr/es_CO.json +144 -36
- package/src/sap/ui/core/cldr/es_MX.json +288 -72
- package/src/sap/ui/core/cldr/fa.json +48 -12
- package/src/sap/ui/core/cldr/id.json +56 -14
- package/src/sap/ui/core/cldr/kk.json +184 -46
- package/src/sap/ui/core/cldr/ms.json +56 -14
- package/src/sap/ui/core/cldr/nb.json +36 -9
- package/src/sap/ui/core/cldr/nl.json +264 -66
- package/src/sap/ui/core/cldr/nl_BE.json +264 -66
- package/src/sap/ui/core/cldr/pt.json +288 -72
- package/src/sap/ui/core/cldr/pt_PT.json +288 -72
- package/src/sap/ui/core/cldr/sr.json +96 -24
- package/src/sap/ui/core/cldr/sr_Latn.json +72 -18
- 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 +25 -13
- 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 +9 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +7 -7
- 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/message/MessageType.js +1 -1
- package/src/sap/ui/core/mvc/Controller.js +15 -13
- package/src/sap/ui/core/mvc/ControllerExtension.js +7 -5
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +1 -1
- package/src/sap/ui/core/mvc/ControllerMetadata.js +1 -1
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +4 -4
- 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 +20 -9
- package/src/sap/ui/core/mvc/XMLView.js +8 -2
- 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/routing/History.js +1 -1
- package/src/sap/ui/core/routing/Route.js +6 -6
- package/src/sap/ui/core/routing/Router.js +6 -6
- package/src/sap/ui/core/routing/Targets.js +3 -3
- package/src/sap/ui/core/routing/async/Target.js +2 -2
- package/src/sap/ui/core/routing/async/Targets.js +1 -1
- package/src/sap/ui/core/rules/Misc.support.js +3 -3
- 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 +6 -4
- 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/theming/Parameters.js +7 -7
- package/src/sap/ui/core/theming/ThemeHelper.js +2 -2
- package/src/sap/ui/core/theming/ThemeManager.js +2 -2
- 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 +34 -3
- 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/Binding.js +2 -2
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +5 -5
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +10 -10
- package/src/sap/ui/model/FilterProcessor.js +8 -5
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +2 -2
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +6 -6
- 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 +3 -3
- 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 +4 -4
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +32 -27
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +198 -155
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +9 -4
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +9 -6
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +220 -85
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +33 -20
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +70 -18
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +9 -5
- 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 +1 -1
- 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 +1 -1
- 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 +5 -5
- package/src/sap/ui/test/BranchTracking.js +4 -0
- package/src/sap/ui/test/actions/EnterText.js +1 -5
- package/src/sap/ui/test/generic/GenericTestCollection.js +1 -0
- package/src/sap/ui/test/generic/TestBase.js +4 -4
- package/src/sap/ui/test/generic/Utils.js +3 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +23 -15
- package/src/ui5loader.js +9 -4
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/common/Controller.js +0 -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/sample/odata/v4/Ancestry/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.controller.js +14 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.view.xml +6 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/MIT.MultipleInlineCreationRowsGrid.html +5 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.view.xml +9 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +23 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +58 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.controller.js +75 -30
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +19 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +84 -28
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/data/metadata.xml +3 -3
- 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/BindingParser.qunit.js +4 -4
- package/test/sap/ui/core/qunit/CommandExecution.qunit.js +3 -1
- package/test/sap/ui/core/qunit/Core.qunit.js +1 -1
- package/test/sap/ui/core/qunit/DataBinding.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Declarative.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Element_base.qunit.js +8 -7
- package/test/sap/ui/core/qunit/Element_base_legacyAPIs.qunit.js +48 -0
- package/test/sap/ui/core/qunit/Element_closestTo.qunit.js +1 -1
- package/test/sap/ui/core/qunit/Fragment.qunit.js +63 -13
- package/test/sap/ui/core/qunit/HTML.qunit.js +5 -5
- package/test/sap/ui/core/qunit/Lib.qunit.js +19 -2
- package/test/sap/ui/core/qunit/PlaceAt.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Shortcut.qunit.js +9 -1
- package/test/sap/ui/core/qunit/UIArea.qunit.js +7 -6
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +41 -0
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.html +7 -5
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +46 -7
- package/test/sap/ui/core/qunit/base/config/GlobalConfigForCascade.js +24 -21
- package/test/sap/ui/core/qunit/component/Component.qunit.js +9 -8
- package/test/sap/ui/core/qunit/component/ComponentContainer.qunit.js +1 -1
- package/test/sap/ui/core/qunit/component/Models.qunit.js +29 -30
- package/test/sap/ui/core/qunit/component/UIComponent.qunit.js +3 -3
- package/test/sap/ui/core/qunit/generic/ControlMemoryLeaks.qunit.js +4 -3
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +6 -7
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +3 -2
- package/test/sap/ui/core/qunit/generic/legacy/testsuite.generic.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +65 -0
- package/test/sap/ui/core/qunit/jquery.sap.ui.qunit.js +12 -12
- package/test/sap/ui/core/qunit/loader/syncMode_unavoidablySync.qunit.js +54 -1
- package/test/sap/ui/core/qunit/messages/messagesGeneral.qunit.js +3 -1
- package/test/sap/ui/core/qunit/mockserver/testdata/shopping/Products.json +1 -1
- package/test/sap/ui/core/qunit/model/FilterProcessor.qunit.js +22 -8
- package/test/sap/ui/core/qunit/mvc/AnyView.qunit.js +3 -0
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +3 -2
- package/test/sap/ui/core/qunit/mvc/EventHandlerResolver.qunit.js +2 -2
- package/test/sap/ui/core/qunit/mvc/View.qunit.js +38 -35
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessor.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorAsync.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/extensions/ControllerMetadata.qunit.js +6 -2
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/extensions/testdata/AnotherMain.controller.js +3 -1
- package/test/sap/ui/core/qunit/mvc/testdata/XMLViewEmbeddingTypedViews.view.xml +1 -1
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing.qunit.js +26 -7
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLTemplateProcessorRequireXML_legacyAPIs.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLView_legacyAPIs.qunit.js +2 -2
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +36 -34
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +69 -0
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +43 -22
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +318 -217
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +2111 -124
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +43 -35
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +20 -2
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +453 -125
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +70 -33
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +256 -8
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +10 -2
- package/test/sap/ui/core/qunit/opa/actions/EnterText.qunit.js +38 -14
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +102 -52
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -1
- package/test/sap/ui/core/qunit/routing/async/Targets.qunit.js +4 -5
- package/test/sap/ui/core/qunit/routing/async/TitleHistory.qunit.js +1 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/Component.js +1 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/manifest.json +1 -5
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/Component.js +1 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/manifest.json +1 -5
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/Component.js +15 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/manifest.json +8 -0
- package/test/sap/ui/core/qunit/routing/sync/Router.qunit.js +2 -2
- package/test/sap/ui/core/qunit/routing/sync/Targets.qunit.js +2 -3
- package/test/sap/ui/core/qunit/testdata/fragments/XMLTestFragmentWithXMLView.fragment.xml +5 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.base.configuration.qunit.js +1 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.control.framework.qunit.js +4 -0
- package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +190 -0
- package/test/sap/ui/core/qunit/types/DateInterval.qunit.js +2 -2
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry.qunit.js +161 -0
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry_legacyAPIs.qunit.js +150 -0
- package/test/sap/ui/core/qunit/ui5classes/testsuite.ui5classes.qunit.js +84 -0
- package/test/sap/ui/core/qunit/util/ViewSerializer.qunit.js +4 -3
- package/test/sap/ui/core/relnotes/changes-1.120.json +225 -0
|
@@ -170,7 +170,7 @@ sap.ui.define([
|
|
|
170
170
|
assert.throws(function () {
|
|
171
171
|
// code under test
|
|
172
172
|
_AggregationHelper.beforeOverwritePlaceholder(oPlaceholder, null, oCache, 41);
|
|
173
|
-
}, new Error("Wrong placeholder"), "
|
|
173
|
+
}, new Error("Wrong placeholder"), "rank");
|
|
174
174
|
|
|
175
175
|
assert.throws(function () {
|
|
176
176
|
// code under test
|
|
@@ -1113,6 +1113,7 @@ sap.ui.define([
|
|
|
1113
1113
|
assert.strictEqual(JSON.stringify(mQueryOptions), sQueryOptionsJSON, "unchanged");
|
|
1114
1114
|
assert.strictEqual(oAggregation.$NodeProperty, "aNodeID");
|
|
1115
1115
|
assert.strictEqual(oAggregation.$ParentNavigationProperty, "aParentNavigation");
|
|
1116
|
+
assert.notOk("$LimitedRank" in oAggregation, "unchanged");
|
|
1116
1117
|
});
|
|
1117
1118
|
});
|
|
1118
1119
|
|
|
@@ -1133,6 +1134,7 @@ sap.ui.define([
|
|
|
1133
1134
|
$apply : "com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root"
|
|
1134
1135
|
+ ",HierarchyQualifier='X',NodeProperty='???',Levels=1)"
|
|
1135
1136
|
});
|
|
1137
|
+
assert.notOk("$LimitedRank" in oAggregation, "unchanged");
|
|
1136
1138
|
});
|
|
1137
1139
|
|
|
1138
1140
|
//*********************************************************************************************
|
|
@@ -1161,21 +1163,37 @@ sap.ui.define([
|
|
|
1161
1163
|
foo : "bar"
|
|
1162
1164
|
});
|
|
1163
1165
|
|
|
1166
|
+
assert.notOk("$LimitedRank" in oAggregation, "unchanged");
|
|
1164
1167
|
assert.notOk("$NodeProperty" in oAggregation);
|
|
1165
1168
|
assert.deepEqual(mQueryOptions, {foo : "bar"});
|
|
1166
1169
|
});
|
|
1167
1170
|
|
|
1168
1171
|
//*********************************************************************************************
|
|
1169
|
-
[undefined, 1, 2, 3, Number.MAX_SAFE_INTEGER, Infinity].forEach(function (iExpandTo) {
|
|
1172
|
+
[undefined, 1, 2, 3, 999, Number.MAX_SAFE_INTEGER, Infinity].forEach(function (iExpandTo) {
|
|
1170
1173
|
[false, true].forEach(function (bStored) {
|
|
1171
1174
|
[false, true].forEach(function (bAllLevels) {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1175
|
+
[{
|
|
1176
|
+
DistanceFromRootProperty : {$PropertyPath : "DistFromRoot"},
|
|
1177
|
+
DrillStateProperty : {$PropertyPath : "myDrillState"},
|
|
1178
|
+
LimitedDescendantCountProperty : {$PropertyPath : "LtdDescendant_Count"}
|
|
1179
|
+
}, {
|
|
1180
|
+
DistanceFromRoot : {$Path : "DistFromRoot"},
|
|
1181
|
+
DrillState : {$Path : "myDrillState"},
|
|
1182
|
+
LimitedDescendantCount : {$Path : "LtdDescendant_Count"}
|
|
1183
|
+
}, {
|
|
1184
|
+
DistanceFromRoot : {$Path : "DistFromRoot"},
|
|
1185
|
+
DrillState : {$Path : "myDrillState"},
|
|
1186
|
+
LimitedDescendantCount : {$Path : "LtdDescendant_Count"},
|
|
1187
|
+
LimitedRank : {$Path : "LtdPreorderRank"}
|
|
1188
|
+
}].forEach((oRecursiveHierarchy, i) => {
|
|
1189
|
+
var sTitle = "buildApply4Hierarchy: top levels of nodes, $select, expandTo : "
|
|
1190
|
+
+ iExpandTo + ", property paths already stored: " + bStored
|
|
1191
|
+
+ ", all levels: " + bAllLevels
|
|
1192
|
+
+ ", Rec.Hier. #" + i;
|
|
1193
|
+
|
|
1194
|
+
if (iExpandTo >= 999 && bAllLevels) {
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1179
1197
|
|
|
1180
1198
|
QUnit.test(sTitle, function (assert) {
|
|
1181
1199
|
var oAggregation = {
|
|
@@ -1187,12 +1205,9 @@ sap.ui.define([
|
|
|
1187
1205
|
},
|
|
1188
1206
|
oAggregationMock = this.mock(oAggregation),
|
|
1189
1207
|
oExpectedAggregation = iExpandTo > 1 ? {
|
|
1190
|
-
$
|
|
1191
|
-
$
|
|
1192
|
-
|
|
1193
|
-
} : {
|
|
1194
|
-
$DrillStateProperty : "myDrillState"
|
|
1195
|
-
},
|
|
1208
|
+
$DistanceFromRoot : "DistFromRoot",
|
|
1209
|
+
$LimitedDescendantCount : "LtdDescendant_Count"
|
|
1210
|
+
} : {},
|
|
1196
1211
|
iExpectedLevels = iExpandTo || 1,
|
|
1197
1212
|
aExpectedSelect = iExpandTo > 1
|
|
1198
1213
|
? ["ID", "SomeNodeID", "DistFromRoot", "LtdDescendant_Count", "myDrillState"]
|
|
@@ -1204,21 +1219,21 @@ sap.ui.define([
|
|
|
1204
1219
|
sQueryOptionsJSON = JSON.stringify(mQueryOptions);
|
|
1205
1220
|
|
|
1206
1221
|
if (bStored) {
|
|
1207
|
-
oAggregation.$
|
|
1222
|
+
oAggregation.$DrillState = "myDrillState";
|
|
1208
1223
|
oAggregation.$NodeProperty = "SomeNodeID";
|
|
1209
1224
|
oAggregation.$ParentNavigationProperty = "SomeParentNavigation";
|
|
1210
1225
|
}
|
|
1211
1226
|
if (bAllLevels) {
|
|
1212
1227
|
aExpectedSelect = ["ID", "SomeNodeID", "DistFromRoot", "myDrillState"];
|
|
1213
1228
|
oExpectedAggregation = {
|
|
1214
|
-
$
|
|
1229
|
+
$DistanceFromRoot : "DistFromRoot"
|
|
1215
1230
|
};
|
|
1216
1231
|
if (bStored) {
|
|
1217
|
-
oAggregation.$
|
|
1232
|
+
oAggregation.$DistanceFromRoot = "DistFromRoot";
|
|
1218
1233
|
}
|
|
1219
1234
|
} else if (bStored && iExpandTo > 1) {
|
|
1220
|
-
oAggregation.$
|
|
1221
|
-
oAggregation.$
|
|
1235
|
+
oAggregation.$DistanceFromRoot = "DistFromRoot";
|
|
1236
|
+
oAggregation.$LimitedDescendantCount = "LtdDescendant_Count";
|
|
1222
1237
|
}
|
|
1223
1238
|
oAggregationMock.expects("$fetchMetadata").exactly(bStored ? 0 : 1)
|
|
1224
1239
|
.withExactArgs("/meta/@Org.OData.Aggregation.V1.RecursiveHierarchy#X")
|
|
@@ -1228,18 +1243,14 @@ sap.ui.define([
|
|
|
1228
1243
|
}));
|
|
1229
1244
|
oAggregationMock.expects("$fetchMetadata").exactly(bStored ? 0 : 1)
|
|
1230
1245
|
.withExactArgs("/meta/@com.sap.vocabularies.Hierarchy.v1.RecursiveHierarchy#X")
|
|
1231
|
-
.returns(SyncPromise.resolve(
|
|
1232
|
-
DistanceFromRootProperty : {$PropertyPath : "DistFromRoot"},
|
|
1233
|
-
DrillStateProperty : {$PropertyPath : "myDrillState"},
|
|
1234
|
-
LimitedDescendantCountProperty : {$PropertyPath : "LtdDescendant_Count"}
|
|
1235
|
-
}));
|
|
1246
|
+
.returns(SyncPromise.resolve(oRecursiveHierarchy));
|
|
1236
1247
|
oExpectedAggregation = Object.assign({
|
|
1237
1248
|
expandTo : iExpandTo,
|
|
1238
1249
|
hierarchyQualifier : "X",
|
|
1239
1250
|
$fetchMetadata : oAggregation.$fetchMetadata, // remember the mock(!)
|
|
1240
1251
|
$metaPath : "/meta",
|
|
1241
1252
|
$path : "/Foo",
|
|
1242
|
-
$
|
|
1253
|
+
$DrillState : "myDrillState",
|
|
1243
1254
|
$NodeProperty : "SomeNodeID",
|
|
1244
1255
|
$ParentNavigationProperty : "SomeParentNavigation"
|
|
1245
1256
|
}, oExpectedAggregation);
|
|
@@ -1248,7 +1259,7 @@ sap.ui.define([
|
|
|
1248
1259
|
// code under test
|
|
1249
1260
|
_AggregationHelper.buildApply4Hierarchy(oAggregation, mQueryOptions, bAllLevels),
|
|
1250
1261
|
{
|
|
1251
|
-
$apply : bAllLevels || iExpandTo >=
|
|
1262
|
+
$apply : bAllLevels || iExpandTo >= 999
|
|
1252
1263
|
? "com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root/Foo"
|
|
1253
1264
|
+ ",HierarchyQualifier='X',NodeProperty='SomeNodeID')"
|
|
1254
1265
|
: "com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root/Foo"
|
|
@@ -1260,8 +1271,17 @@ sap.ui.define([
|
|
|
1260
1271
|
|
|
1261
1272
|
assert.strictEqual(JSON.stringify(mQueryOptions), sQueryOptionsJSON, "unchanged");
|
|
1262
1273
|
assert.strictEqual(oAggregation.$fetchMetadata, oExpectedAggregation.$fetchMetadata);
|
|
1274
|
+
if (bStored) {
|
|
1275
|
+
assert.notOk("$LimitedRank" in oAggregation, "unchanged");
|
|
1276
|
+
} else {
|
|
1277
|
+
const sLimitedRank
|
|
1278
|
+
= oRecursiveHierarchy.LimitedRank ? "LtdPreorderRank" : "LimitedRank";
|
|
1279
|
+
assert.strictEqual(oAggregation.$LimitedRank, sLimitedRank);
|
|
1280
|
+
oExpectedAggregation.$LimitedRank = sLimitedRank;
|
|
1281
|
+
}
|
|
1263
1282
|
assert.deepEqual(oAggregation, oExpectedAggregation);
|
|
1264
1283
|
});
|
|
1284
|
+
});
|
|
1265
1285
|
});
|
|
1266
1286
|
});
|
|
1267
1287
|
});
|
|
@@ -1288,7 +1308,15 @@ sap.ui.define([
|
|
|
1288
1308
|
+ "/orderby(~$orderby~)",
|
|
1289
1309
|
mQueryOptions : {$filter : "~$filter~", $orderby : "~$orderby~"}
|
|
1290
1310
|
}].forEach(function (mFixture, i) {
|
|
1291
|
-
|
|
1311
|
+
[
|
|
1312
|
+
{DrillStateProperty : {$PropertyPath : "path/to/aDrillState"}},
|
|
1313
|
+
{DrillState : {$Path : "path/to/aDrillState"}}
|
|
1314
|
+
].forEach((oRecursiveHierarchy, j) => {
|
|
1315
|
+
[false, true].forEach((bStored) => {
|
|
1316
|
+
const sTitle = "buildApply4Hierarchy: children of a given parent, #" + i + ", #" + j
|
|
1317
|
+
+ ", $LimitedRank already stored" + bStored;
|
|
1318
|
+
|
|
1319
|
+
QUnit.test(sTitle, function (assert) {
|
|
1292
1320
|
var oAggregation = Object.assign({
|
|
1293
1321
|
hierarchyQualifier : "XYZ",
|
|
1294
1322
|
$fetchMetadata : function () {},
|
|
@@ -1304,6 +1332,9 @@ sap.ui.define([
|
|
|
1304
1332
|
}, mFixture.mQueryOptions),
|
|
1305
1333
|
sQueryOptionsJSON = JSON.stringify(mQueryOptions);
|
|
1306
1334
|
|
|
1335
|
+
if (bStored) {
|
|
1336
|
+
oAggregation.$LimitedRank = "~LimitedRank~";
|
|
1337
|
+
}
|
|
1307
1338
|
oAggregationMock.expects("$fetchMetadata")
|
|
1308
1339
|
.withExactArgs("/meta/path/@Org.OData.Aggregation.V1.RecursiveHierarchy#XYZ")
|
|
1309
1340
|
.returns(SyncPromise.resolve({
|
|
@@ -1312,22 +1343,28 @@ sap.ui.define([
|
|
|
1312
1343
|
}));
|
|
1313
1344
|
oAggregationMock.expects("$fetchMetadata")
|
|
1314
1345
|
.withExactArgs("/meta/path/@com.sap.vocabularies.Hierarchy.v1.RecursiveHierarchy#XYZ")
|
|
1315
|
-
.returns(SyncPromise.resolve(
|
|
1316
|
-
DrillStateProperty : {$PropertyPath : "aDrillState"}
|
|
1317
|
-
}));
|
|
1346
|
+
.returns(SyncPromise.resolve(oRecursiveHierarchy));
|
|
1318
1347
|
|
|
1319
1348
|
// code under test
|
|
1320
1349
|
assert.deepEqual(_AggregationHelper.buildApply4Hierarchy(oAggregation, mQueryOptions), {
|
|
1321
1350
|
$apply : mFixture.sExpectedApply,
|
|
1322
1351
|
// no more $filter or $orderby!
|
|
1323
|
-
$select : ["ID", "myID", "aDrillState"],
|
|
1352
|
+
$select : ["ID", "myID", "path/to/aDrillState"],
|
|
1324
1353
|
foo : "bar"
|
|
1325
1354
|
});
|
|
1326
1355
|
|
|
1327
1356
|
assert.strictEqual(JSON.stringify(mQueryOptions), sQueryOptionsJSON, "unchanged");
|
|
1357
|
+
if (bStored) {
|
|
1358
|
+
assert.strictEqual(oAggregation.$LimitedRank, "~LimitedRank~", "unchanged");
|
|
1359
|
+
} else {
|
|
1360
|
+
assert.strictEqual(oAggregation.$LimitedRank, "path/to/LimitedRank",
|
|
1361
|
+
"derived from DrillState");
|
|
1362
|
+
}
|
|
1328
1363
|
assert.strictEqual(oAggregation.$NodeProperty, "myID");
|
|
1329
1364
|
assert.strictEqual(oAggregation.$ParentNavigationProperty, "myParentNavigation");
|
|
1330
1365
|
});
|
|
1366
|
+
});
|
|
1367
|
+
});
|
|
1331
1368
|
});
|
|
1332
1369
|
|
|
1333
1370
|
//*********************************************************************************************
|
|
@@ -1859,7 +1896,7 @@ sap.ui.define([
|
|
|
1859
1896
|
oPlaceholder = _AggregationHelper.createPlaceholder(3, 5, oParentCache);
|
|
1860
1897
|
|
|
1861
1898
|
assert.strictEqual(oPlaceholder["@$ui5.node.level"], 3);
|
|
1862
|
-
assert.strictEqual(_Helper.getPrivateAnnotation(oPlaceholder, "
|
|
1899
|
+
assert.strictEqual(_Helper.getPrivateAnnotation(oPlaceholder, "rank"), 5);
|
|
1863
1900
|
assert.strictEqual(_Helper.getPrivateAnnotation(oPlaceholder, "parent"), oParentCache);
|
|
1864
1901
|
assert.strictEqual(_Helper.getPrivateAnnotation(oPlaceholder, "placeholder"), true);
|
|
1865
1902
|
});
|
|
@@ -228,6 +228,23 @@ sap.ui.define([
|
|
|
228
228
|
assert.strictEqual(oCache.sOriginalResourcePath, sResourcePath);
|
|
229
229
|
});
|
|
230
230
|
|
|
231
|
+
//*********************************************************************************************
|
|
232
|
+
QUnit.test("_Cache#setQueryOptions defaulting", function (assert) {
|
|
233
|
+
const oCache = new _Cache(this.oRequestor);
|
|
234
|
+
|
|
235
|
+
// code under test
|
|
236
|
+
oCache.setQueryOptions();
|
|
237
|
+
|
|
238
|
+
assert.deepEqual(oCache.mQueryOptions, {});
|
|
239
|
+
|
|
240
|
+
oCache.bSentRequest = true;
|
|
241
|
+
|
|
242
|
+
assert.throws(() => {
|
|
243
|
+
// code under test
|
|
244
|
+
oCache.setQueryOptions();
|
|
245
|
+
}, new Error("Cannot set query options: Cache has already sent a request"));
|
|
246
|
+
});
|
|
247
|
+
|
|
231
248
|
//*********************************************************************************************
|
|
232
249
|
QUnit.test("_Cache#setResourcePath", function (assert) {
|
|
233
250
|
var oCache = new _Cache(this.oRequestor, "TEAMS('42')/name.space.Operation");
|
|
@@ -424,8 +441,8 @@ sap.ui.define([
|
|
|
424
441
|
.withExactArgs(undefined, oFixture.iStatus < 0
|
|
425
442
|
? [oMessage1, oMessage2] : [oMessage1]);
|
|
426
443
|
oRestoreExpectation = that.mock(oCache).expects("restoreElement").exactly(iOnFailure)
|
|
427
|
-
.withExactArgs(sinon.match.same(aCacheData),
|
|
428
|
-
sinon.match.same(aCacheData
|
|
444
|
+
.withExactArgs("~insert~", sinon.match.same(aCacheData[1]), 2, undefined,
|
|
445
|
+
sinon.match.same(aCacheData), sPath)
|
|
429
446
|
.callsFake(() => {
|
|
430
447
|
assert.deepEqual(aCacheData.$deleted.length, 4);
|
|
431
448
|
});
|
|
@@ -1041,7 +1058,7 @@ sap.ui.define([
|
|
|
1041
1058
|
});
|
|
1042
1059
|
|
|
1043
1060
|
//*********************************************************************************************
|
|
1044
|
-
[
|
|
1061
|
+
[undefined, "~path~"].forEach(function (sPath) {
|
|
1045
1062
|
[false, true].forEach(function (bTransient) {
|
|
1046
1063
|
[false, true].forEach(function (bDefault) {
|
|
1047
1064
|
const sTitle = `_Cache#restoreElement, path=${sPath}, transient=${bTransient},
|
|
@@ -1057,22 +1074,24 @@ sap.ui.define([
|
|
|
1057
1074
|
if (bDefault) {
|
|
1058
1075
|
oCache.aElements = aElements;
|
|
1059
1076
|
}
|
|
1077
|
+
const sPath0 = sPath || ""; // to test defaulting
|
|
1060
1078
|
this.mock(oCache).expects("adjustIndexes")
|
|
1061
|
-
.withExactArgs(
|
|
1079
|
+
.withExactArgs(sPath0, sinon.match.same(aElements), 42, 1, "~iDeletedIndex~");
|
|
1062
1080
|
const oHelperMock = this.mock(_Helper);
|
|
1063
1081
|
oHelperMock.expects("getPrivateAnnotation").exactly(bDefault && bTransient ? 0 : 1)
|
|
1064
1082
|
.withExactArgs("~oElement~", "transientPredicate")
|
|
1065
1083
|
.returns(bTransient ? "($uid=id-1-23)" : undefined);
|
|
1066
1084
|
oHelperMock.expects("addToCount")
|
|
1067
|
-
.withExactArgs(sinon.match.same(oCache.mChangeListeners),
|
|
1085
|
+
.withExactArgs(sinon.match.same(oCache.mChangeListeners), sPath0,
|
|
1068
1086
|
sinon.match.same(aElements), 1);
|
|
1069
1087
|
this.mock(aElements).expects("splice").withExactArgs(42, 0, "~oElement~");
|
|
1070
1088
|
oHelperMock.expects("getPrivateAnnotation").withExactArgs("~oElement~", "predicate")
|
|
1071
1089
|
.returns("~predicate~");
|
|
1072
1090
|
|
|
1073
1091
|
// code under test
|
|
1074
|
-
oCache.restoreElement(
|
|
1075
|
-
|
|
1092
|
+
oCache.restoreElement(42, "~oElement~", "~iDeletedIndex~",
|
|
1093
|
+
bDefault && bTransient ? "($uid=id-1-23)" : undefined, bDefault ? undefined : aElements,
|
|
1094
|
+
sPath);
|
|
1076
1095
|
|
|
1077
1096
|
assert.strictEqual(oCache.iLimit, bTransient || sPath ? 234 : 235);
|
|
1078
1097
|
assert.strictEqual(aElements.$created, bTransient ? 3 : 2);
|
|
@@ -2140,7 +2159,7 @@ sap.ui.define([
|
|
|
2140
2159
|
.withExactArgs("/Products/PostAddress")
|
|
2141
2160
|
.returns(SyncPromise.resolve({}));
|
|
2142
2161
|
this.mock(_Helper).expects("isSelected")
|
|
2143
|
-
.withExactArgs("PostAddress",
|
|
2162
|
+
.withExactArgs("PostAddress", {})
|
|
2144
2163
|
.returns(false);
|
|
2145
2164
|
this.mock(oCache).expects("fetchLateProperty")
|
|
2146
2165
|
.withExactArgs("~oGroupLock~", sinon.match.same(oData), "",
|
|
@@ -7614,6 +7633,48 @@ sap.ui.define([
|
|
|
7614
7633
|
});
|
|
7615
7634
|
});
|
|
7616
7635
|
|
|
7636
|
+
//*********************************************************************************************
|
|
7637
|
+
QUnit.test("CollectionCache#requestElements: $filter=false", function (assert) {
|
|
7638
|
+
var oCache = this.createCache("Employees", {$filter : "false"}),
|
|
7639
|
+
oCacheMock = this.mock(oCache),
|
|
7640
|
+
oCheckRangeExpectation,
|
|
7641
|
+
iEnd = 10,
|
|
7642
|
+
oFillExpectation,
|
|
7643
|
+
iStart = 0,
|
|
7644
|
+
oHandleResponseExpectation,
|
|
7645
|
+
oPromise,
|
|
7646
|
+
oResult = {"@odata.count" : "0", value : []};
|
|
7647
|
+
|
|
7648
|
+
oCache.bSentRequest = false;
|
|
7649
|
+
|
|
7650
|
+
oCacheMock.expects("getResourcePathWithQuery").never();
|
|
7651
|
+
this.oRequestorMock.expects("request").never();
|
|
7652
|
+
oCacheMock.expects("fetchTypes").withExactArgs().returns(SyncPromise.resolve("~mTypes~"));
|
|
7653
|
+
oFillExpectation = oCacheMock.expects("fill")
|
|
7654
|
+
.withExactArgs(sinon.match.instanceOf(SyncPromise), iStart, iEnd);
|
|
7655
|
+
Promise.resolve().then(function () { // must be called asynchronously
|
|
7656
|
+
oCheckRangeExpectation = oCacheMock.expects("checkRange")
|
|
7657
|
+
.withExactArgs(sinon.match.same(oPromise), iStart, iEnd);
|
|
7658
|
+
oHandleResponseExpectation = oCacheMock.expects("handleResponse")
|
|
7659
|
+
.withExactArgs(oResult, iStart, "~mTypes~")
|
|
7660
|
+
.returns("~iFiltered~");
|
|
7661
|
+
oCacheMock.expects("handleCount")
|
|
7662
|
+
.withExactArgs("~oGroupLock~", 0, iStart, iEnd, oResult, "~iFiltered~");
|
|
7663
|
+
});
|
|
7664
|
+
|
|
7665
|
+
// code under test
|
|
7666
|
+
oPromise = oCache.requestElements(iStart, iEnd, "~oGroupLock~", 0, "~fnDataRequested~");
|
|
7667
|
+
|
|
7668
|
+
assert.deepEqual(oCache.aReadRequests, [{iStart, iEnd}]);
|
|
7669
|
+
|
|
7670
|
+
assert.strictEqual(oCache.bSentRequest, true);
|
|
7671
|
+
assert.strictEqual(oFillExpectation.args[0][0], oPromise);
|
|
7672
|
+
|
|
7673
|
+
return oPromise.then(function () {
|
|
7674
|
+
assert.ok(oCheckRangeExpectation.calledBefore(oHandleResponseExpectation));
|
|
7675
|
+
});
|
|
7676
|
+
});
|
|
7677
|
+
|
|
7617
7678
|
//*********************************************************************************************
|
|
7618
7679
|
QUnit.test("CollectionCache#checkRange", function (assert) {
|
|
7619
7680
|
var oCache = this.createCache("Employees");
|
|
@@ -10280,6 +10341,99 @@ sap.ui.define([
|
|
|
10280
10341
|
});
|
|
10281
10342
|
});
|
|
10282
10343
|
|
|
10344
|
+
//*********************************************************************************************
|
|
10345
|
+
QUnit.test("CollectionCache#move", function (assert) {
|
|
10346
|
+
const oCache = this.createCache("n/a");
|
|
10347
|
+
|
|
10348
|
+
const aElements = oCache.aElements = ["a", "b", "c", "d", "e", "f", "g", "h"];
|
|
10349
|
+
|
|
10350
|
+
function deepEqual(aExpected) {
|
|
10351
|
+
assert.strictEqual(oCache.aElements, aElements, "same ref");
|
|
10352
|
+
assert.deepEqual(oCache.aElements, aExpected);
|
|
10353
|
+
}
|
|
10354
|
+
|
|
10355
|
+
// code under test (nothing to do)
|
|
10356
|
+
oCache.move(4, 4, 3);
|
|
10357
|
+
|
|
10358
|
+
deepEqual(["a", "b", "c", "d", "e", "f", "g", "h"]);
|
|
10359
|
+
|
|
10360
|
+
// code under test (nothing to do)
|
|
10361
|
+
oCache.move(1, 4, 0);
|
|
10362
|
+
|
|
10363
|
+
deepEqual(["a", "b", "c", "d", "e", "f", "g", "h"]);
|
|
10364
|
+
|
|
10365
|
+
// code under test
|
|
10366
|
+
oCache.move(1, 4, 3);
|
|
10367
|
+
|
|
10368
|
+
deepEqual(["a", "e", "f", "g", /**/"b", "c", "d"/**/, "h"]);
|
|
10369
|
+
|
|
10370
|
+
// code under test (undo)
|
|
10371
|
+
oCache.move(4, 1, 3);
|
|
10372
|
+
|
|
10373
|
+
deepEqual(["a", "b", "c", "d", "e", "f", "g", "h"]);
|
|
10374
|
+
|
|
10375
|
+
// code under test
|
|
10376
|
+
oCache.move(1, 5, 2);
|
|
10377
|
+
|
|
10378
|
+
deepEqual(["a", "d", "e", "f", "g", /**/"b", "c"/**/, "h"]);
|
|
10379
|
+
|
|
10380
|
+
// code under test (undo)
|
|
10381
|
+
oCache.move(5, 1, 2);
|
|
10382
|
+
|
|
10383
|
+
deepEqual(["a", "b", "c", "d", "e", "f", "g", "h"]);
|
|
10384
|
+
|
|
10385
|
+
// code under test
|
|
10386
|
+
oCache.move(1, 3, 4);
|
|
10387
|
+
|
|
10388
|
+
deepEqual(["a", "f", "g", /**/"b", "c", "d", "e"/**/, "h"]);
|
|
10389
|
+
|
|
10390
|
+
// code under test (undo)
|
|
10391
|
+
oCache.move(3, 1, 4);
|
|
10392
|
+
|
|
10393
|
+
deepEqual(["a", "b", "c", "d", "e", "f", "g", "h"]);
|
|
10394
|
+
});
|
|
10395
|
+
|
|
10396
|
+
//*********************************************************************************************
|
|
10397
|
+
QUnit.test("CollectionCache#move: no RangeError", function (assert) {
|
|
10398
|
+
const oCache = this.createCache("n/a");
|
|
10399
|
+
|
|
10400
|
+
for (let i = 0; i < 1_000_000; i += 1) {
|
|
10401
|
+
oCache.aElements[i] = i;
|
|
10402
|
+
}
|
|
10403
|
+
|
|
10404
|
+
// code under test (no "RangeError: Maximum call stack size exceeded")
|
|
10405
|
+
oCache.move(5_000, 10_000, 990_000);
|
|
10406
|
+
|
|
10407
|
+
for (let i = 0; i < 5_000; i += 1) {
|
|
10408
|
+
if (oCache.aElements[i] !== i) {
|
|
10409
|
+
assert.ok(false);
|
|
10410
|
+
break;
|
|
10411
|
+
}
|
|
10412
|
+
}
|
|
10413
|
+
for (let i = 0; i < 990_000; i += 1) {
|
|
10414
|
+
if (oCache.aElements[10_000 + i] !== 5_000 + i) {
|
|
10415
|
+
assert.ok(false);
|
|
10416
|
+
break;
|
|
10417
|
+
}
|
|
10418
|
+
}
|
|
10419
|
+
for (let i = 0; i < 5_000; i += 1) {
|
|
10420
|
+
if (oCache.aElements[5_000 + i] !== 995_000 + i) {
|
|
10421
|
+
assert.ok(false);
|
|
10422
|
+
break;
|
|
10423
|
+
}
|
|
10424
|
+
}
|
|
10425
|
+
|
|
10426
|
+
// code under test (undo)
|
|
10427
|
+
oCache.move(10_000, 5_000, 990_000);
|
|
10428
|
+
|
|
10429
|
+
for (let i = 0; i < 1_000_000; i += 1) {
|
|
10430
|
+
if (oCache.aElements[i] !== i) {
|
|
10431
|
+
assert.ok(false);
|
|
10432
|
+
break;
|
|
10433
|
+
}
|
|
10434
|
+
}
|
|
10435
|
+
});
|
|
10436
|
+
|
|
10283
10437
|
//*********************************************************************************************
|
|
10284
10438
|
[
|
|
10285
10439
|
{error : false, path : "EMPLOYEE_2_TEAM"},
|
|
@@ -12512,6 +12666,100 @@ sap.ui.define([
|
|
|
12512
12666
|
});
|
|
12513
12667
|
});
|
|
12514
12668
|
|
|
12669
|
+
//*********************************************************************************************
|
|
12670
|
+
QUnit.test("CollectionCache#read waits for prefetch 'after'", async function (assert) {
|
|
12671
|
+
const oCache = this.createCache("Employees");
|
|
12672
|
+
const oGroupLock = {
|
|
12673
|
+
getUnlockedCopy : mustBeMocked,
|
|
12674
|
+
unlock : mustBeMocked
|
|
12675
|
+
};
|
|
12676
|
+
this.mock(_Helper).expects("getPrivateAnnotation").never();
|
|
12677
|
+
this.mock(this.oRequestor).expects("waitForBatchResponseReceived").never();
|
|
12678
|
+
oCache.aElements.push(...aTestData.slice(0, 5));
|
|
12679
|
+
this.mock(ODataUtils).expects("_getReadIntervals")
|
|
12680
|
+
.withExactArgs(sinon.match.same(oCache.aElements), 0, 5, 10, Infinity)
|
|
12681
|
+
.returns([{
|
|
12682
|
+
end : 15,
|
|
12683
|
+
start : 5 // [0..5[ already available, see above
|
|
12684
|
+
}]);
|
|
12685
|
+
const oGetUnlockedCopyExpectation = this.mock(oGroupLock).expects("getUnlockedCopy")
|
|
12686
|
+
.withExactArgs().returns("~unlockedCopy~");
|
|
12687
|
+
this.mock(oCache).expects("requestElements")
|
|
12688
|
+
.withExactArgs(5, 15, "~unlockedCopy~", 0, "~fnDataRequested~")
|
|
12689
|
+
.callsFake(() => {
|
|
12690
|
+
// just at the edge, there is a promise we need to wait for
|
|
12691
|
+
oCache.aElements[14] = Promise.resolve();
|
|
12692
|
+
// just beyond, there is a promise which never resolves and MUST be ignored
|
|
12693
|
+
oCache.aElements[15] = new Promise(() => {});
|
|
12694
|
+
});
|
|
12695
|
+
const oUnlockExpectation = this.mock(oGroupLock).expects("unlock").withExactArgs();
|
|
12696
|
+
|
|
12697
|
+
// code under test
|
|
12698
|
+
const oSyncPromise = oCache.read(0, 5, 10, oGroupLock, "~fnDataRequested~");
|
|
12699
|
+
|
|
12700
|
+
assert.ok(oSyncPromise.isPending());
|
|
12701
|
+
assert.ok(oUnlockExpectation.calledAfter(oGetUnlockedCopyExpectation));
|
|
12702
|
+
|
|
12703
|
+
await oSyncPromise; // no need to check result, it's defined by aElements way above
|
|
12704
|
+
});
|
|
12705
|
+
|
|
12706
|
+
//*********************************************************************************************
|
|
12707
|
+
[10, 30].forEach((iPrefetchLength) => {
|
|
12708
|
+
const sTitle = `CollectionCache#read waits for prefetch 'before', ${iPrefetchLength}`;
|
|
12709
|
+
|
|
12710
|
+
QUnit.test(sTitle, async function (assert) {
|
|
12711
|
+
const oCache = this.createCache("Employees");
|
|
12712
|
+
const oGroupLock = {
|
|
12713
|
+
getUnlockedCopy : mustBeMocked,
|
|
12714
|
+
unlock : mustBeMocked
|
|
12715
|
+
};
|
|
12716
|
+
this.mock(_Helper).expects("getPrivateAnnotation").never();
|
|
12717
|
+
this.mock(this.oRequestor).expects("waitForBatchResponseReceived").never();
|
|
12718
|
+
oCache.aElements.splice(20, 0, ...aTestData.slice(20, 25));
|
|
12719
|
+
oCache.iLimit = 25; // simulate a known $count
|
|
12720
|
+
const iStart = iPrefetchLength === 10 ? 10 : 0; // Math.max(0, 20 - iPrefetchLength)
|
|
12721
|
+
this.mock(ODataUtils).expects("_getReadIntervals")
|
|
12722
|
+
.withExactArgs(sinon.match.same(oCache.aElements), 20, 5, iPrefetchLength, 25)
|
|
12723
|
+
.returns([{
|
|
12724
|
+
end : 20,
|
|
12725
|
+
start : iStart // [20..25[ already available, see above
|
|
12726
|
+
}]);
|
|
12727
|
+
const oGetUnlockedCopyExpectation = this.mock(oGroupLock).expects("getUnlockedCopy")
|
|
12728
|
+
.withExactArgs().returns("~unlockedCopy~");
|
|
12729
|
+
this.mock(oCache).expects("requestElements")
|
|
12730
|
+
.withExactArgs(iStart, 20, "~unlockedCopy~", 0, "~fnDataRequested~")
|
|
12731
|
+
.callsFake(() => {
|
|
12732
|
+
switch (iPrefetchLength) {
|
|
12733
|
+
case 10:
|
|
12734
|
+
// just at the edge, there is a promise we need to wait for
|
|
12735
|
+
oCache.aElements[10] = Promise.resolve();
|
|
12736
|
+
// just beyond, there is a promise which never resolves and MUST be ignored
|
|
12737
|
+
oCache.aElements[9] = new Promise(() => {});
|
|
12738
|
+
break;
|
|
12739
|
+
|
|
12740
|
+
case 30:
|
|
12741
|
+
// just at the edge, there is a promise we need to wait for
|
|
12742
|
+
oCache.aElements[0] = Promise.resolve();
|
|
12743
|
+
// just beyond, there is a promise which never resolves and MUST be ignored
|
|
12744
|
+
oCache.aElements[55] = new Promise(() => {});
|
|
12745
|
+
break;
|
|
12746
|
+
|
|
12747
|
+
default:
|
|
12748
|
+
throw iPrefetchLength;
|
|
12749
|
+
}
|
|
12750
|
+
});
|
|
12751
|
+
const oUnlockExpectation = this.mock(oGroupLock).expects("unlock").withExactArgs();
|
|
12752
|
+
|
|
12753
|
+
// code under test
|
|
12754
|
+
const oSyncPromise = oCache.read(20, 5, iPrefetchLength, oGroupLock, "~fnDataRequested~");
|
|
12755
|
+
|
|
12756
|
+
assert.ok(oSyncPromise.isPending());
|
|
12757
|
+
assert.ok(oUnlockExpectation.calledAfter(oGetUnlockedCopyExpectation));
|
|
12758
|
+
|
|
12759
|
+
await oSyncPromise; // no need to check result, it's defined by aElements way above
|
|
12760
|
+
});
|
|
12761
|
+
});
|
|
12762
|
+
|
|
12515
12763
|
//*********************************************************************************************
|
|
12516
12764
|
QUnit.test("CollectionCache#addKeptElement", function (assert) {
|
|
12517
12765
|
var oCache = this.createCache("Employees"),
|
|
@@ -4079,6 +4079,9 @@ sap.ui.define([
|
|
|
4079
4079
|
assert.strictEqual(oBatchQueue0[0].iSerialNumber, 0);
|
|
4080
4080
|
}
|
|
4081
4081
|
|
|
4082
|
+
const oModelInterfaceMock = this.mock(oModelInterface);
|
|
4083
|
+
oModelInterfaceMock.expects("onCreateGroup").withExactArgs("group");
|
|
4084
|
+
|
|
4082
4085
|
// code under test
|
|
4083
4086
|
aBatchQueue = oRequestor.getOrCreateBatchQueue("group");
|
|
4084
4087
|
|
|
@@ -4087,10 +4090,15 @@ sap.ui.define([
|
|
|
4087
4090
|
// code under test
|
|
4088
4091
|
assert.strictEqual(oRequestor.getOrCreateBatchQueue("group"), aBatchQueue);
|
|
4089
4092
|
|
|
4090
|
-
|
|
4093
|
+
oModelInterfaceMock.expects("onCreateGroup").withExactArgs("group2");
|
|
4091
4094
|
|
|
4092
4095
|
// code under test
|
|
4093
4096
|
checkBatchQueue(oRequestor.getOrCreateBatchQueue("group2"), "group2");
|
|
4097
|
+
|
|
4098
|
+
oModelInterfaceMock.expects("onCreateGroup").withExactArgs("group3").never();
|
|
4099
|
+
|
|
4100
|
+
// code under test: create queue without informing the model
|
|
4101
|
+
checkBatchQueue(oRequestor.getOrCreateBatchQueue("group3", true), "group3");
|
|
4094
4102
|
});
|
|
4095
4103
|
|
|
4096
4104
|
//*****************************************************************************************
|
|
@@ -4110,7 +4118,7 @@ sap.ui.define([
|
|
|
4110
4118
|
aRequests = [aChangeSet0, oGetRequest];
|
|
4111
4119
|
|
|
4112
4120
|
aRequests.iChangeSet = 0;
|
|
4113
|
-
this.mock(oRequestor).expects("getOrCreateBatchQueue").withExactArgs("group")
|
|
4121
|
+
this.mock(oRequestor).expects("getOrCreateBatchQueue").withExactArgs("group", true)
|
|
4114
4122
|
.returns(aRequests);
|
|
4115
4123
|
this.mock(oRequestor).expects("getSerialNumber").withExactArgs().returns(42);
|
|
4116
4124
|
|
|
@@ -11,7 +11,9 @@ sap.ui.define([
|
|
|
11
11
|
"sap/m/TimePicker",
|
|
12
12
|
"sap/m/Popover",
|
|
13
13
|
"sap/m/Button",
|
|
14
|
+
"sap/m/Select",
|
|
14
15
|
"sap/ui/core/Icon",
|
|
16
|
+
"sap/ui/core/Item",
|
|
15
17
|
"sap/ui/test/Opa5",
|
|
16
18
|
"sap/ui/test/opaQunit",
|
|
17
19
|
"sap/m/library",
|
|
@@ -30,7 +32,9 @@ sap.ui.define([
|
|
|
30
32
|
TimePicker,
|
|
31
33
|
Popover,
|
|
32
34
|
Button,
|
|
35
|
+
Select,
|
|
33
36
|
Icon,
|
|
37
|
+
Item,
|
|
34
38
|
Opa5,
|
|
35
39
|
opaTest,
|
|
36
40
|
mobileLibrary,
|
|
@@ -320,6 +324,40 @@ sap.ui.define([
|
|
|
320
324
|
assert.strictEqual(this.oControl.getValue(), "{");
|
|
321
325
|
});
|
|
322
326
|
|
|
327
|
+
QUnit.test("No runtime error when entering text on control that is not an input", async function (assert) {
|
|
328
|
+
this.oControl = new Icon({src: "sap-icon://edit"});
|
|
329
|
+
|
|
330
|
+
this.oControl.placeAt("qunit-fixture");
|
|
331
|
+
await nextUIUpdate();
|
|
332
|
+
|
|
333
|
+
var action = new EnterText({ text: "entering some long enough text on an non-input control"});
|
|
334
|
+
|
|
335
|
+
try {
|
|
336
|
+
// without an internal safe-check, the line below causes runtime error
|
|
337
|
+
// with the current alorithm, when executed on a non-input control:
|
|
338
|
+
action.executeOn(this.oControl);
|
|
339
|
+
assert.ok("The test completes without runtime error");
|
|
340
|
+
} catch (error) {
|
|
341
|
+
assert.notOk("Runtime error upon enterng the text: " + error);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
QUnit.test("Should enter text on select", async function (assert) {
|
|
346
|
+
this.oControl = new Select({
|
|
347
|
+
items: [
|
|
348
|
+
new Item({text: "one"}),
|
|
349
|
+
new Item({text: "two"})
|
|
350
|
+
]
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
this.oControl.placeAt("qunit-fixture");
|
|
354
|
+
await nextUIUpdate();
|
|
355
|
+
|
|
356
|
+
new EnterText({ text: "two" }).executeOn(this.oControl);
|
|
357
|
+
|
|
358
|
+
assert.strictEqual(this.oControl.getSelectedIndex(), 1);
|
|
359
|
+
});
|
|
360
|
+
|
|
323
361
|
QUnit.module("Logging", {
|
|
324
362
|
beforeEach: function () {
|
|
325
363
|
this.oEnterText = new EnterText({});
|
|
@@ -365,20 +403,6 @@ sap.ui.define([
|
|
|
365
403
|
sinon.assert.calledWith(this.oErrorLog, sinon.match(/Please provide a text/));
|
|
366
404
|
});
|
|
367
405
|
|
|
368
|
-
QUnit.test("Should log a warning and exit early when control is not an input", async function (assert) {
|
|
369
|
-
this.oControl = new Icon({src: "sap-icon://edit"});
|
|
370
|
-
|
|
371
|
-
this.oControl.placeAt("qunit-fixture");
|
|
372
|
-
await nextUIUpdate();
|
|
373
|
-
|
|
374
|
-
// without a safe-check, the line below causes errors with the
|
|
375
|
-
// the current alorithm, when executed on a non-input control:
|
|
376
|
-
this.oEnterText.setText("entering some long enough text on an non-input control");
|
|
377
|
-
this.oEnterText.executeOn(this.oControl);
|
|
378
|
-
|
|
379
|
-
sinon.assert.calledWith(this.oDebugLog, sinon.match(/Cannot enter text in control/));
|
|
380
|
-
});
|
|
381
|
-
|
|
382
406
|
QUnit.test("Should enter number with decimals in input of type number and preserve the value", function (assert) {
|
|
383
407
|
var fnDone = assert.async();
|
|
384
408
|
var sTextInControl = "12.4";
|