@openui5/sap.ui.core 1.115.1 → 1.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +18 -0
- package/.eslintrc.json +1 -11
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- 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.sjax.js +2 -2
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/Event.js +106 -0
- package/src/sap/base/Eventing.js +319 -0
- package/src/sap/base/config/MemoryConfigurationProvider.js +10 -1
- package/src/sap/base/config.js +3 -2
- package/src/sap/base/i18n/Formatting.js +989 -0
- package/src/sap/base/i18n/LanguageTag.js +189 -0
- package/src/sap/base/i18n/Localization.js +710 -0
- package/src/sap/base/i18n/ResourceBundle.js +5 -20
- package/src/sap/base/i18n/date/CalendarType.js +54 -0
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
- package/src/sap/base/i18n/date/TimezoneUtils.js +287 -0
- package/src/sap/base/util/JSTokenizer.js +1 -1
- package/src/sap/base/util/fetch.js +4 -4
- package/src/sap/base/util/mixedFetch.js +2 -2
- 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/base/util/syncFetch.js +2 -2
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +6 -4
- package/src/sap/ui/base/EventProvider.js +4 -12
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +9 -15
- package/src/sap/ui/base/ManagedObjectMetadata.js +33 -12
- 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/base/SyncPromise.js +10 -5
- package/src/sap/ui/core/.library +3 -3
- package/src/sap/ui/core/AccessKeysEnablement.js +10 -5
- package/src/sap/ui/core/AnimationMode.js +49 -0
- package/src/sap/ui/core/BusyIndicator.js +33 -42
- package/src/sap/ui/core/CalendarType.js +11 -37
- package/src/sap/ui/core/Component.js +4 -5
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +2 -2
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/ConfigTest.js +17 -0
- package/src/sap/ui/core/Configuration.js +409 -1282
- package/src/sap/ui/core/Control.js +7 -12
- package/src/sap/ui/core/ControlBehavior.js +157 -0
- package/src/sap/ui/core/Core.js +126 -132
- 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 +14 -3
- package/src/sap/ui/core/ElementMetadata.js +2 -4
- 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/IconPool.js +1 -2
- 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 +5 -7
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +12 -12
- 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 +126 -38
- 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 +154 -430
- package/src/sap/ui/core/LocaleData.js +50 -14
- package/src/sap/ui/core/Manifest.js +5 -5
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +37 -50
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/Rendering.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 +11 -9
- package/src/sap/ui/core/StaticArea.js +31 -17
- package/src/sap/ui/core/Theming.js +458 -0
- 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/XMLTemplateProcessor.js +28 -5
- package/src/sap/ui/core/_IconRegistry.js +89 -12
- package/src/sap/ui/core/boot/_bootConfig.js +137 -0
- package/src/sap/ui/core/boot/_runBoot.js +16 -0
- package/src/sap/ui/core/boot/initDOM.js +96 -0
- package/src/sap/ui/core/boot/loadCalendar.js +50 -0
- package/src/sap/ui/core/boot/loadManifest.js +55 -0
- package/src/sap/ui/core/boot/loadModules.js +80 -0
- package/src/sap/ui/core/boot/manifest.json +11 -0
- package/src/sap/ui/core/boot/onInit.js +44 -0
- package/src/sap/ui/core/boot.js +107 -0
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +12 -83
- package/src/sap/ui/core/date/UI5Date.js +10 -4
- package/src/sap/ui/core/delegate/ItemNavigation.js +8 -10
- package/src/sap/ui/core/delegate/ScrollEnablement.js +5 -5
- 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 +33 -27
- package/src/sap/ui/core/format/TimezoneUtil.js +15 -273
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +32 -6
- 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/MessageMixin.js +6 -5
- 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/messagebundle_ar.properties +57 -55
- package/src/sap/ui/core/messagebundle_bg.properties +57 -55
- package/src/sap/ui/core/messagebundle_ca.properties +30 -28
- package/src/sap/ui/core/messagebundle_cs.properties +44 -42
- package/src/sap/ui/core/messagebundle_cy.properties +59 -57
- package/src/sap/ui/core/messagebundle_da.properties +57 -55
- package/src/sap/ui/core/messagebundle_de.properties +59 -57
- package/src/sap/ui/core/messagebundle_el.properties +48 -46
- package/src/sap/ui/core/messagebundle_en.properties +59 -57
- package/src/sap/ui/core/messagebundle_en_GB.properties +59 -57
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +3 -0
- package/src/sap/ui/core/messagebundle_es.properties +48 -46
- package/src/sap/ui/core/messagebundle_es_MX.properties +58 -56
- package/src/sap/ui/core/messagebundle_et.properties +55 -53
- package/src/sap/ui/core/messagebundle_fi.properties +51 -49
- package/src/sap/ui/core/messagebundle_fr.properties +36 -34
- package/src/sap/ui/core/messagebundle_fr_CA.properties +21 -19
- package/src/sap/ui/core/messagebundle_hi.properties +42 -40
- package/src/sap/ui/core/messagebundle_hr.properties +57 -55
- package/src/sap/ui/core/messagebundle_hu.properties +58 -56
- package/src/sap/ui/core/messagebundle_id.properties +59 -57
- package/src/sap/ui/core/messagebundle_it.properties +75 -73
- package/src/sap/ui/core/messagebundle_iw.properties +59 -57
- package/src/sap/ui/core/messagebundle_ja.properties +50 -48
- package/src/sap/ui/core/messagebundle_kk.properties +44 -42
- package/src/sap/ui/core/messagebundle_ko.properties +20 -18
- package/src/sap/ui/core/messagebundle_lt.properties +59 -57
- package/src/sap/ui/core/messagebundle_lv.properties +59 -57
- package/src/sap/ui/core/messagebundle_ms.properties +60 -58
- package/src/sap/ui/core/messagebundle_nl.properties +58 -56
- package/src/sap/ui/core/messagebundle_no.properties +56 -54
- package/src/sap/ui/core/messagebundle_pl.properties +56 -54
- package/src/sap/ui/core/messagebundle_pt.properties +58 -56
- package/src/sap/ui/core/messagebundle_pt_PT.properties +58 -56
- package/src/sap/ui/core/messagebundle_ro.properties +59 -57
- package/src/sap/ui/core/messagebundle_ru.properties +57 -55
- package/src/sap/ui/core/messagebundle_sh.properties +59 -57
- package/src/sap/ui/core/messagebundle_sk.properties +57 -55
- package/src/sap/ui/core/messagebundle_sl.properties +58 -56
- package/src/sap/ui/core/messagebundle_sv.properties +54 -52
- package/src/sap/ui/core/messagebundle_th.properties +18 -16
- package/src/sap/ui/core/messagebundle_tr.properties +58 -56
- package/src/sap/ui/core/messagebundle_uk.properties +59 -57
- package/src/sap/ui/core/messagebundle_vi.properties +59 -57
- package/src/sap/ui/core/messagebundle_zh_CN.properties +58 -56
- package/src/sap/ui/core/messagebundle_zh_TW.properties +58 -56
- 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 +14 -2
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +14 -16
- 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/HashChanger.js +1 -0
- package/src/sap/ui/core/routing/Route.js +1 -0
- package/src/sap/ui/core/routing/Router.js +3 -1
- package/src/sap/ui/core/rules/Config.support.js +2 -2
- package/src/sap/ui/core/rules/Misc.support.js +1 -1
- package/src/sap/ui/core/rules/Model.support.js +3 -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 +7 -4
- package/src/sap/ui/core/support/controls/TimelineOverview.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/Icon.less +2 -2
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +4 -4
- package/src/sap/ui/core/themes/base/base.less +41 -20
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +6 -10
- package/src/sap/ui/core/theming/ThemeManager.js +312 -450
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +5 -10
- 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 +4 -5
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +3 -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/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/events/PseudoEvents.js +17 -9
- package/src/sap/ui/model/Binding.js +19 -15
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +57 -19
- 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/ListBinding.js +42 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +5 -4
- package/src/sap/ui/model/PropertyBinding.js +10 -0
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +4 -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/AnalyticalBinding.js +166 -79
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +4 -3
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +2 -2
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +14 -27
- package/src/sap/ui/model/analytics/odata4analytics.js +6 -12
- package/src/sap/ui/model/base/ManagedObjectModel.js +3 -2
- package/src/sap/ui/model/json/JSONModel.js +6 -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 +191 -5
- package/src/sap/ui/model/odata/ODataMetadata.js +38 -4
- 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 +8 -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 +3 -3
- 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 +3 -2
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +14 -3
- package/src/sap/ui/model/odata/v2/ODataModel.js +46 -32
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +4 -4
- package/src/sap/ui/model/odata/v4/Context.js +39 -32
- package/src/sap/ui/model/odata/v4/ODataBinding.js +85 -52
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +23 -19
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +139 -50
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +30 -36
- package/src/sap/ui/model/odata/v4/ODataModel.js +49 -44
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +72 -37
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +34 -29
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +95 -9
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +25 -27
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +95 -209
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +168 -1
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +14 -5
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +34 -19
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +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 +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/TestUtils.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +1 -3
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +10 -5
- package/src/sap/ui/test/matchers/LabelFor.js +1 -0
- package/src/sap/ui/test/matchers/_Visitor.js +6 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +2 -5
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
- package/src/sap/ui/thirdparty/qunit-2.js +9 -3
- package/src/sap/ui/util/ActivityDetection.js +7 -1
- package/src/sap/ui/util/Mobile.js +21 -14
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap-ui-boot.js +23 -6
- package/src/ui5-boot.js +50 -0
- package/src/ui5loader-autoconfig.js +150 -75
- package/src/ui5loader.js +458 -514
- package/test/sap/ui/core/Device.js +1 -1
- package/test/sap/ui/core/FormatHelper.js +3 -2
- package/test/sap/ui/core/demokit/docuindex.json +6 -0
- package/test/sap/ui/core/demokit/sample/OpaAction/applicationUnderTest/view/Main.view.xml +1 -0
- package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/OpaBusyIndicator.js +1 -1
- package/test/sap/ui/core/demokit/sample/OpaMatchers/OpaMatchers.js +2 -2
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/MIT.ODataTypes.html +9 -14
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js +7 -0
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +2 -2
- package/test/sap/ui/core/demokit/sample/common/pages/Any.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v2/AutoExpand/AutoExpand.view.xml +24 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.view.xml +24 -6
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/DataAggregation.view.xml +20 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/filter.js +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Component.js +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.controller.js +43 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.view.xml +47 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.controller.js +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.view.xml +7 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/NotFound.view.xml +8 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.controller.js +123 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.view.xml +92 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.html +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.js +70 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/README.html +55 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/SandboxModel.js +56 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/POST-SalesOrderList.json +66 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000')-SO_2_SOITEM.json +57 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000').json +20 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000001').json +9 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000007')-SO_2_BP.json +12 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList.json +62 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.json +85 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.xml +185 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.json +93 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.xml +262 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/metadata.xml +1779 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/manifest.json +134 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/pages/Main.js +119 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/Draft/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FieldGroups/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.view.xml +4 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/GridTable/GridTable.view.xml +12 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Main.controller.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.OptimisticBatch.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +0 -41
- package/test/sap/ui/core/demokit/sample/odata/v4/Products/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +26 -8
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/data/metadata.xml +4 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.controller.js +5 -17
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/pages/Main.js +18 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/Create.js +10 -6
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/manifest.json +18 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.view.xml +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/pages/Main.js +4 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/test/integration/arrangements/Startup.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/controller/App.controller.js +3 -8
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/controller/App.controller.js +3 -8
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/test/integration/arrangements/Startup.js +1 -1
- package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +25 -7
- package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +86 -2
- package/test/sap/ui/core/qunit/DataState.qunit.js +2 -7
- package/test/sap/ui/core/qunit/HTML.qunit.js +31 -31
- package/test/sap/ui/core/qunit/IconPool.qunit.js +53 -4
- package/test/sap/ui/core/qunit/Lib.qunit.js +55 -2
- package/test/sap/ui/core/qunit/LocalBusyIndicator.qunit.js +22 -15
- package/test/sap/ui/core/qunit/ManagedObject.qunit.js +5 -3
- package/test/sap/ui/core/qunit/ManagedObjectModel.qunit.js +43 -5
- package/test/sap/ui/core/qunit/Object.qunit.js +4 -1
- package/test/sap/ui/core/qunit/ThemeManager.qunit.js +2 -2
- package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +9 -3
- package/test/sap/ui/core/qunit/Theming.beforeBootstrap.qunit.js +13 -0
- package/test/sap/ui/core/qunit/Theming.qunit.js +247 -0
- package/test/sap/ui/core/qunit/analytics/AnalyticalBinding.qunit.js +510 -185
- package/test/sap/ui/core/qunit/analytics/AnalyticalTreeBindingAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +81 -16
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +20 -29
- package/test/sap/ui/core/qunit/app/MessageListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +18 -1
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +24 -0
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +277 -0
- package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +282 -0
- package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +5 -6
- package/test/sap/ui/core/qunit/base/security/sanitizeHTML.qunit.js +17 -0
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +1 -2
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +13 -12
- package/test/sap/ui/core/qunit/bootstrap/Configuration.main.qunit.js +11 -0
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.html +4 -3
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +451 -281
- package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +19 -30
- package/test/sap/ui/core/qunit/component/Models.qunit.js +12 -30
- package/test/sap/ui/core/qunit/component/Models_unavoidablySync.qunit.js +8 -26
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/Component.js +0 -4
- package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/sync/Component.js +2 -6
- package/test/sap/ui/core/qunit/component/testdata/customizing/customersub/Component.js +0 -4
- package/test/sap/ui/core/qunit/component/testdata/inherit/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/inherit/parent/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentA/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentB/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentA/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentB/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/other/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/terminologies/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component1/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component2/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component3/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component5/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/reuse/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/v1/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v1empty/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v1inline/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v1missing/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v2/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2asyncRootView/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2empty/Component.js +2 -9
- package/test/sap/ui/core/qunit/component/testdata/v2inline/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2missing/Component.js +2 -9
- package/test/sap/ui/core/qunit/component/testdata/v2version/Component.js +2 -2
- package/test/sap/ui/core/qunit/dnd/DragDropInfo.qunit.js +1 -2
- package/test/sap/ui/core/qunit/generic/EnforceSemanticRendering.qunit.js +2 -2
- package/test/sap/ui/core/qunit/generic/SettersContextReturn.qunit.js +2 -2
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +2 -0
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +2 -0
- package/test/sap/ui/core/qunit/generic/legacy/SettersContextReturn.qunit.js +2 -2
- package/test/sap/ui/core/qunit/gherkin/dataTableUtils.qunit.js +2 -2
- package/test/sap/ui/core/qunit/i18n/Locale.qunit.js +0 -52
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +49 -14
- package/test/sap/ui/core/qunit/i18n/UI5Date.qunit.js +16 -4
- package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +74 -114
- package/test/sap/ui/core/qunit/i18n/UniversalDateUtils.qunit.js +34 -39
- package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +18 -0
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
- package/test/sap/ui/core/qunit/internal/BeforePush.ODataV4.js +28 -0
- package/test/sap/ui/core/qunit/internal/BeforePush.html +1 -0
- package/test/sap/ui/core/qunit/internal/BeforePush.js +15 -0
- package/test/sap/ui/core/qunit/internal/performance/ExpressionParser.performance.qunit.js +1 -0
- package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/json/JSONPropertyBinding.qunit.js +7 -12
- package/test/sap/ui/core/qunit/json/JSONTwoWay.qunit.js +3 -8
- package/test/sap/ui/core/qunit/loader/asyncMode.qunit.js +2 -2
- package/test/sap/ui/core/qunit/loader/asyncMode_unavoidablySync.qunit.js +1 -1
- package/test/sap/ui/core/qunit/loader/fixture/amd-with-export-true/module1.js +2 -2
- package/test/sap/ui/core/qunit/loader/testsuite.loader.qunit.js +0 -3
- package/test/sap/ui/core/qunit/messages/MessageMixin.qunit.js +2 -7
- package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +1 -1
- package/test/sap/ui/core/qunit/model/Binding.qunit.js +36 -11
- package/test/sap/ui/core/qunit/model/ClientListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ClientTreeBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/CompositeDataState.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/Context.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ContextBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata.xml +2 -0
- package/test/sap/ui/core/qunit/model/ListBinding.qunit.js +63 -6
- package/test/sap/ui/core/qunit/model/Model.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +40 -0
- package/test/sap/ui/core/qunit/model/TreeBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/TreeBindingAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +51 -0
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +9 -8
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +4 -4
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +4 -4
- package/test/sap/ui/core/qunit/mvc/testdata/Async.view.xml +1 -1
- package/test/sap/ui/core/qunit/mvc/testdata/AsyncTypedView.js +5 -1
- package/test/sap/ui/core/qunit/odata/AnnotationParserNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/ODataMessageParser.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +2 -8
- package/test/sap/ui/core/qunit/odata/ODataMetadataNoFakeService.qunit.js +68 -9
- package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +24 -0
- package/test/sap/ui/core/qunit/odata/v2/Context.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataContextBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +31 -17
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +260 -56
- package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +70 -15
- package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +4 -9
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModel.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v2/_CreatedContextsCache.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v4/AnnotationHelper.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +55 -22
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +184 -151
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +60 -30
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +305 -69
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +20 -69
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1282 -255
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +90 -61
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.realOData.qunit.js +0 -3
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +283 -170
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +103 -78
- package/test/sap/ui/core/qunit/odata/v4/data/metadata.json +2 -1
- package/test/sap/ui/core/qunit/odata/v4/data/metadata.xml +4 -0
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +2 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +151 -1
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +24 -11
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +279 -458
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +204 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_MetadataRequestor.qunit.js +7 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +145 -26
- package/test/sap/ui/core/qunit/odata/v4/testsuite.odatav4.qunit.js +4 -0
- package/test/sap/ui/core/qunit/opa/_LogCollector.qunit.js +1 -1
- package/test/sap/ui/core/qunit/opa/matchers/LabelFor.qunit.js +4 -2
- package/test/sap/ui/core/qunit/opa/matchers/_Busy.qunit.js +129 -2
- package/test/sap/ui/core/qunit/opa/matchers/_Editable.qunit.js +5 -1
- package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +5 -0
- package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +17 -37
- package/test/sap/ui/core/qunit/routing/HashChanger.qunit.js +1 -6
- package/test/sap/ui/core/qunit/routing/RouterHashChanger.qunit.js +1 -10
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +1 -22
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -4
- package/test/sap/ui/core/qunit/routing/fixture/Async1.view.xml +1 -1
- package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +34 -1
- package/test/sap/ui/core/qunit/testdata/fastnavigation/view/FastNavigation.view.xml +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/i18n.properties +1 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/library.js +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/manifest.json +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/library.js +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/messagebundle.properties +1 -0
- package/test/sap/ui/core/qunit/testdata/xml-require/helper/Formatter.js +7 -4
- package/test/sap/ui/core/qunit/testdata/xml-require/view/XMLTemplateProcessorAsync_require_in_html.view.xml +36 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.databinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +29 -0
- package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +1381 -1570
- package/test/sap/ui/core/qunit/types/SimpleType.qunit.js +16 -2
- package/test/sap/ui/core/qunit/types/Types.qunit.js +2 -37
- package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +1 -1
- package/test/sap/ui/core/qunit/util/Popup.qunit.js +7 -11
- package/test/sap/ui/core/qunit/util/SyncPromise.qunit.js +4 -1
- package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +3 -1
- package/test/sap/ui/core/qunit/util/jQuery.sap.Version.qunit.js +3 -0
- package/test/sap/ui/core/qunit/util/jQuery.sap.measure.qunit.js +16 -11
- package/test/sap/ui/core/qunit/util/reflection/BaseTreeModifier.qunit.js +1 -1
- package/test/sap/ui/core/qunit/xml/XMLListBinding.qunit.js +1 -3
- package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +4 -14
- package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +7 -11
- package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +1 -1
- package/test/sap/ui/core/qunit/xml/XMLTwoWay.qunit.js +3 -7
- package/test/sap/ui/core/relnotes/changes-1.115.json +1 -37
- package/test/sap/ui/core/relnotes/changes-1.116.json +71 -0
- package/test/sap/ui/core/relnotes/changes-1.117.json +127 -0
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/HyphenationPlayground/windows/1600x1200/chrome/horizon/ltr/cozy/19_thirdParty_language_sl.ref.lnk +1 -1
- package/test/testsuite/js/samples.js +2 -0
- package/ui5.yaml +166 -1
- package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +0 -45
- /package/test/sap/ui/core/qunit/bootstrap/{GlobalConfigurationSettings.js → Configuration.beforeBootstrap.qunit.js} +0 -0
|
@@ -62,6 +62,7 @@ sap.ui.define([
|
|
|
62
62
|
|
|
63
63
|
assert.deepEqual(oBinding.mAggregatedQueryOptions, {});
|
|
64
64
|
assert.strictEqual(oBinding.bAggregatedQueryOptionsInitial, true);
|
|
65
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {});
|
|
65
66
|
assert.deepEqual(oBinding.aChildCanUseCachePromises, []);
|
|
66
67
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
67
68
|
assert.strictEqual(oBinding.iPatchCounter, 0);
|
|
@@ -694,19 +695,31 @@ sap.ui.define([
|
|
|
694
695
|
});
|
|
695
696
|
|
|
696
697
|
//*********************************************************************************************
|
|
697
|
-
QUnit.test("aggregateQueryOptions: do not embed
|
|
698
|
+
QUnit.test("aggregateQueryOptions: merge mLateQueryOptions, do not embed", function (assert) {
|
|
698
699
|
var oBinding = new ODataParentBinding({
|
|
699
|
-
mAggregatedQueryOptions : {}
|
|
700
|
+
mAggregatedQueryOptions : {$search : "covfefe"},
|
|
701
|
+
mLateQueryOptions : {$select : ["late"]}
|
|
700
702
|
}),
|
|
701
|
-
mChildQueryOptions = {
|
|
703
|
+
mChildQueryOptions = {
|
|
704
|
+
$count : true,
|
|
705
|
+
$filter : "baz eq 42",
|
|
706
|
+
$select : ["bar"]
|
|
707
|
+
};
|
|
702
708
|
|
|
703
709
|
// code under test
|
|
704
|
-
assert.ok(oBinding.aggregateQueryOptions({$expand : {foo : mChildQueryOptions}}
|
|
710
|
+
assert.ok(oBinding.aggregateQueryOptions({$expand : {foo : mChildQueryOptions}}));
|
|
705
711
|
|
|
706
|
-
assert.deepEqual(oBinding.mAggregatedQueryOptions, {
|
|
712
|
+
assert.deepEqual(oBinding.mAggregatedQueryOptions, {
|
|
713
|
+
$expand : {foo : mChildQueryOptions},
|
|
714
|
+
$search : "covfefe"
|
|
715
|
+
});
|
|
716
|
+
assert.deepEqual(oBinding.mLateQueryOptions, {
|
|
717
|
+
$expand : {foo : mChildQueryOptions},
|
|
718
|
+
$select : ["late"]
|
|
719
|
+
});
|
|
707
720
|
assert.notStrictEqual(oBinding.mAggregatedQueryOptions.$expand.foo, mChildQueryOptions);
|
|
708
721
|
assert.notStrictEqual(oBinding.mAggregatedQueryOptions.$expand.foo.$select,
|
|
709
|
-
mChildQueryOptions.$select);
|
|
722
|
+
mChildQueryOptions.$select, "do not embed child query options");
|
|
710
723
|
});
|
|
711
724
|
|
|
712
725
|
//*********************************************************************************************
|
|
@@ -833,8 +846,6 @@ sap.ui.define([
|
|
|
833
846
|
function (assert) {
|
|
834
847
|
var mAggregatedQueryOptions = {},
|
|
835
848
|
oMetaModel = {
|
|
836
|
-
fetchObject : function () {},
|
|
837
|
-
getMetaPath : function () {},
|
|
838
849
|
getReducedPath : function () {}
|
|
839
850
|
},
|
|
840
851
|
fnFetchMetadata = function () {},
|
|
@@ -846,7 +857,7 @@ sap.ui.define([
|
|
|
846
857
|
? SyncPromise.resolve(Promise.resolve(null))
|
|
847
858
|
: SyncPromise.resolve(null),
|
|
848
859
|
oContext : {},
|
|
849
|
-
|
|
860
|
+
doFetchOrGetQueryOptions : function () {},
|
|
850
861
|
oModel : {
|
|
851
862
|
getMetaModel : function () { return oMetaModel; },
|
|
852
863
|
oInterface : {
|
|
@@ -858,13 +869,11 @@ sap.ui.define([
|
|
|
858
869
|
sPath : "path"
|
|
859
870
|
}),
|
|
860
871
|
oBindingMock = this.mock(oBinding),
|
|
861
|
-
mChildLocalQueryOptions = {},
|
|
862
872
|
mChildQueryOptions = oFixture.hasChildQueryOptions ? {} : undefined,
|
|
873
|
+
mClonedQueryOptions = {},
|
|
863
874
|
oContext = Context.create(this.oModel, oBinding, "/Set('2')"),
|
|
864
|
-
mExtendResult = {},
|
|
865
875
|
oHelperMock = this.mock(_Helper),
|
|
866
876
|
mLocalQueryOptions = {},
|
|
867
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
868
877
|
oModelMock = this.mock(oBinding.oModel),
|
|
869
878
|
oPromise;
|
|
870
879
|
|
|
@@ -874,21 +883,21 @@ sap.ui.define([
|
|
|
874
883
|
oHelperMock.expects("getMetaPath").withExactArgs("/Set('2')").returns("/Set");
|
|
875
884
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
876
885
|
.returns("/resolved/child/metaPath");
|
|
877
|
-
oBindingMock.expects("
|
|
886
|
+
oBindingMock.expects("doFetchOrGetQueryOptions")
|
|
878
887
|
.withExactArgs(sinon.match.same(oBinding.oContext))
|
|
879
888
|
.returns(SyncPromise.resolve(mLocalQueryOptions));
|
|
880
|
-
|
|
889
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
881
890
|
.withExactArgs(sinon.match.same(fnFetchMetadata),
|
|
882
891
|
"/resolved/child/metaPath")
|
|
883
892
|
.returns(Promise.resolve().then(function () {
|
|
884
893
|
oBindingMock.expects("selectKeyProperties")
|
|
885
894
|
.exactly(oFixture.initial ? 1 : 0)
|
|
886
|
-
.withExactArgs(sinon.match.same(
|
|
895
|
+
.withExactArgs(sinon.match.same(mClonedQueryOptions), "/Set");
|
|
887
896
|
return {$kind : oFixture.$kind};
|
|
888
897
|
}));
|
|
889
898
|
oBindingMock.expects("getBaseForPathReduction")
|
|
890
899
|
.withExactArgs().returns("/base/path");
|
|
891
|
-
|
|
900
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
892
901
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
893
902
|
.returns("/reduced/child/path");
|
|
894
903
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
@@ -896,12 +905,11 @@ sap.ui.define([
|
|
|
896
905
|
oHelperMock.expects("getRelativePath")
|
|
897
906
|
.withExactArgs("/reduced/child/metapath", "/Set")
|
|
898
907
|
.returns("reducedChildMetaPath");
|
|
899
|
-
|
|
908
|
+
oHelperMock.expects("clone").exactly(oFixture.initial ? 1 : 0)
|
|
900
909
|
.withExactArgs(sinon.match.same(mLocalQueryOptions))
|
|
901
|
-
.returns(
|
|
910
|
+
.returns(mClonedQueryOptions);
|
|
902
911
|
oHelperMock.expects("wrapChildQueryOptions")
|
|
903
|
-
.withExactArgs("/Set", "reducedChildMetaPath",
|
|
904
|
-
sinon.match.same(mChildLocalQueryOptions),
|
|
912
|
+
.withExactArgs("/Set", "reducedChildMetaPath", {},
|
|
905
913
|
sinon.match.same(fnFetchMetadata))
|
|
906
914
|
.returns(mChildQueryOptions);
|
|
907
915
|
oBindingMock.expects("aggregateQueryOptions")
|
|
@@ -911,17 +919,20 @@ sap.ui.define([
|
|
|
911
919
|
.returns(oFixture.canMergeQueryOptions);
|
|
912
920
|
|
|
913
921
|
// code under test
|
|
914
|
-
oPromise = oBinding.fetchIfChildCanUseCache(oContext, "childPath",
|
|
915
|
-
|
|
922
|
+
oPromise = oBinding.fetchIfChildCanUseCache(oContext, "childPath", undefined,
|
|
923
|
+
"~bIsProperty~");
|
|
916
924
|
|
|
925
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
926
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath.childPath, oPromise);
|
|
927
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath),
|
|
928
|
+
["childPath"]);
|
|
917
929
|
return Promise.all([oPromise, oBinding.oCachePromise]).then(function (aResult) {
|
|
918
930
|
assert.strictEqual(aResult[0],
|
|
919
931
|
oFixture.hasChildQueryOptions && oFixture.canMergeQueryOptions
|
|
920
932
|
? "/reduced/child/path"
|
|
921
933
|
: undefined);
|
|
922
|
-
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
923
934
|
assert.strictEqual(oBinding.mAggregatedQueryOptions,
|
|
924
|
-
oFixture.initial ?
|
|
935
|
+
oFixture.initial ? mClonedQueryOptions : mAggregatedQueryOptions);
|
|
925
936
|
assert.strictEqual(oBinding.bAggregatedQueryOptionsInitial, false);
|
|
926
937
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
927
938
|
});
|
|
@@ -946,8 +957,6 @@ sap.ui.define([
|
|
|
946
957
|
? SyncPromise.reject({}) // "Failed to create cache..."
|
|
947
958
|
: SyncPromise.resolve(Promise.resolve(oCache)), // it might become pending again
|
|
948
959
|
oMetaModel = {
|
|
949
|
-
fetchObject : function () {},
|
|
950
|
-
getMetaPath : function () {},
|
|
951
960
|
getReducedPath : function () {}
|
|
952
961
|
},
|
|
953
962
|
fnFetchMetadata = function () {},
|
|
@@ -955,7 +964,7 @@ sap.ui.define([
|
|
|
955
964
|
bAggregatedQueryOptionsInitial : false,
|
|
956
965
|
oCache : bRejected ? undefined : oCache,
|
|
957
966
|
oCachePromise : oCachePromise,
|
|
958
|
-
|
|
967
|
+
doFetchOrGetQueryOptions : function () {},
|
|
959
968
|
oModel : {
|
|
960
969
|
getMetaModel : function () {
|
|
961
970
|
return oMetaModel;
|
|
@@ -975,7 +984,6 @@ sap.ui.define([
|
|
|
975
984
|
? Context.createNewContext(this.oModel, oBinding, "/Set('2')")
|
|
976
985
|
: Context.create(this.oModel, oBinding, "/Set('2')"),
|
|
977
986
|
oHelperMock = this.mock(_Helper),
|
|
978
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
979
987
|
oModelMock = this.mock(oBinding.oModel),
|
|
980
988
|
oPromise;
|
|
981
989
|
|
|
@@ -985,14 +993,15 @@ sap.ui.define([
|
|
|
985
993
|
oHelperMock.expects("getMetaPath").withExactArgs("/Set('2')").returns("/Set");
|
|
986
994
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
987
995
|
.returns("/resolved/child/metaPath");
|
|
988
|
-
oBindingMock.expects("
|
|
989
|
-
|
|
990
|
-
this.mock(_Helper).expects("fetchPropertyAndType")
|
|
996
|
+
oBindingMock.expects("doFetchOrGetQueryOptions").returns(undefined);
|
|
997
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
991
998
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/metaPath")
|
|
992
999
|
.returns(SyncPromise.resolve({$kind : "Property"}));
|
|
1000
|
+
oHelperMock.expects("clone").never();
|
|
1001
|
+
oBindingMock.expects("selectKeyProperties").never();
|
|
993
1002
|
oBindingMock.expects("getBaseForPathReduction")
|
|
994
1003
|
.withExactArgs().returns("/base/path");
|
|
995
|
-
|
|
1004
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
996
1005
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
997
1006
|
.returns("/reduced/child/path");
|
|
998
1007
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
@@ -1017,11 +1026,13 @@ sap.ui.define([
|
|
|
1017
1026
|
oPromise = oBinding.fetchIfChildCanUseCache(oContext, "childPath",
|
|
1018
1027
|
SyncPromise.resolve(mChildLocalQueryOptions), "~bIsProperty~");
|
|
1019
1028
|
|
|
1029
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1030
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath.childPath, oPromise);
|
|
1031
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), ["childPath"]);
|
|
1020
1032
|
return Promise.all([oPromise, !bRejected && oCachePromise]).then(function (aResults) {
|
|
1021
1033
|
var sReducedPath = aResults[0];
|
|
1022
1034
|
|
|
1023
1035
|
assert.strictEqual(sReducedPath, undefined);
|
|
1024
|
-
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1025
1036
|
if (!bRejected) {
|
|
1026
1037
|
assert.strictEqual(oBinding.oCachePromise.getResult(),
|
|
1027
1038
|
oCachePromise.getResult());
|
|
@@ -1087,8 +1098,6 @@ sap.ui.define([
|
|
|
1087
1098
|
}].forEach(function (oFixture) {
|
|
1088
1099
|
QUnit.test("fetchIfChildCanUseCache: late query options, " + oFixture.title, function (assert) {
|
|
1089
1100
|
var oMetaModel = {
|
|
1090
|
-
fetchObject : function () {},
|
|
1091
|
-
getMetaPath : function () {},
|
|
1092
1101
|
getReducedPath : function () {}
|
|
1093
1102
|
},
|
|
1094
1103
|
oCachePromise = SyncPromise.resolve(oFixture.cache),
|
|
@@ -1101,7 +1110,7 @@ sap.ui.define([
|
|
|
1101
1110
|
oContext : {
|
|
1102
1111
|
getBinding : function () {}
|
|
1103
1112
|
},
|
|
1104
|
-
|
|
1113
|
+
doFetchOrGetQueryOptions : function () {},
|
|
1105
1114
|
isFirstCreateAtEnd : function () {},
|
|
1106
1115
|
oModel : {
|
|
1107
1116
|
getMetaModel : function () { return oMetaModel; },
|
|
@@ -1122,7 +1131,6 @@ sap.ui.define([
|
|
|
1122
1131
|
oFixture.index),
|
|
1123
1132
|
oHelperMock = this.mock(_Helper),
|
|
1124
1133
|
mLateQueryOptions = {},
|
|
1125
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
1126
1134
|
oModelMock = this.mock(oBinding.oModel),
|
|
1127
1135
|
oParentBinding = new ODataParentBinding(),
|
|
1128
1136
|
oPromise;
|
|
@@ -1140,14 +1148,15 @@ sap.ui.define([
|
|
|
1140
1148
|
.returns("/Set/navigation");
|
|
1141
1149
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
1142
1150
|
.returns("/resolved/child/metaPath");
|
|
1143
|
-
oBindingMock.expects("
|
|
1144
|
-
|
|
1145
|
-
this.mock(_Helper).expects("fetchPropertyAndType")
|
|
1151
|
+
oBindingMock.expects("doFetchOrGetQueryOptions").returns({});
|
|
1152
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
1146
1153
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/metaPath")
|
|
1147
1154
|
.returns(SyncPromise.resolve(Promise.resolve({$kind : "Property"})));
|
|
1155
|
+
oHelperMock.expects("clone").never();
|
|
1156
|
+
oBindingMock.expects("selectKeyProperties").never();
|
|
1148
1157
|
oBindingMock.expects("getBaseForPathReduction")
|
|
1149
1158
|
.withExactArgs().returns("/base/path");
|
|
1150
|
-
|
|
1159
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
1151
1160
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
1152
1161
|
.returns("/reduced/child/path");
|
|
1153
1162
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
@@ -1176,10 +1185,7 @@ sap.ui.define([
|
|
|
1176
1185
|
this.mock(oParentBinding).expects("fetchIfChildCanUseCache")
|
|
1177
1186
|
.exactly(oFixture.fetchIfChildCanUseCacheOnParentCount)
|
|
1178
1187
|
.withExactArgs(sinon.match.same(oBinding.oContext), "navigation",
|
|
1179
|
-
sinon.match(
|
|
1180
|
-
return p.getResult() === mLateQueryOptions;
|
|
1181
|
-
})
|
|
1182
|
-
)
|
|
1188
|
+
sinon.match.same(mLateQueryOptions))
|
|
1183
1189
|
.returns(SyncPromise.resolve(oFixture.rejected ? undefined : "/some/path"));
|
|
1184
1190
|
|
|
1185
1191
|
// code under test
|
|
@@ -1188,10 +1194,11 @@ sap.ui.define([
|
|
|
1188
1194
|
|
|
1189
1195
|
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1190
1196
|
assert.notStrictEqual(oBinding.oCachePromise, oCachePromise);
|
|
1197
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath.childPath, oPromise);
|
|
1198
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), ["childPath"]);
|
|
1191
1199
|
return oBinding.oCachePromise.then(function (oCache0) {
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
assert.strictEqual(bUseCache, oFixture.rejected ? undefined : "/reduced/child/path");
|
|
1200
|
+
assert.strictEqual(oPromise.getResult(),
|
|
1201
|
+
oFixture.rejected ? undefined : "/reduced/child/path");
|
|
1195
1202
|
assert.strictEqual(oCache0, oFixture.cache);
|
|
1196
1203
|
});
|
|
1197
1204
|
});
|
|
@@ -1207,8 +1214,6 @@ sap.ui.define([
|
|
|
1207
1214
|
|
|
1208
1215
|
QUnit.test(sTitle, function (assert) {
|
|
1209
1216
|
var oMetaModel = {
|
|
1210
|
-
fetchObject : function () {},
|
|
1211
|
-
getMetaPath : function () {},
|
|
1212
1217
|
getReducedPath : function () {}
|
|
1213
1218
|
},
|
|
1214
1219
|
oCache0 = {
|
|
@@ -1226,7 +1231,7 @@ sap.ui.define([
|
|
|
1226
1231
|
bAggregatedQueryOptionsInitial : false,
|
|
1227
1232
|
oCache : oCache0,
|
|
1228
1233
|
oCachePromise : oCachePromise,
|
|
1229
|
-
|
|
1234
|
+
doFetchOrGetQueryOptions : function () {},
|
|
1230
1235
|
oModel : {
|
|
1231
1236
|
getMetaModel : function () { return oMetaModel; },
|
|
1232
1237
|
oInterface : {
|
|
@@ -1243,7 +1248,6 @@ sap.ui.define([
|
|
|
1243
1248
|
mChildLocalQueryOptions = {},
|
|
1244
1249
|
oContext = Context.create(this.oModel, oBinding, "/Set('2')"),
|
|
1245
1250
|
oHelperMock = this.mock(_Helper),
|
|
1246
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
1247
1251
|
oModelMock = this.mock(oBinding.oModel),
|
|
1248
1252
|
mNewQueryOptions = {},
|
|
1249
1253
|
oPromise;
|
|
@@ -1257,14 +1261,15 @@ sap.ui.define([
|
|
|
1257
1261
|
oHelperMock.expects("getMetaPath").withExactArgs("/Set('2')").returns("/Set");
|
|
1258
1262
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path@foo.bar")
|
|
1259
1263
|
.returns("/resolved/child/metaPath@foo.bar");
|
|
1260
|
-
oBindingMock.expects("
|
|
1261
|
-
|
|
1262
|
-
this.mock(_Helper).expects("fetchPropertyAndType") // no @foo.bar here
|
|
1264
|
+
oBindingMock.expects("doFetchOrGetQueryOptions").returns(undefined);
|
|
1265
|
+
oHelperMock.expects("fetchPropertyAndType") // no @foo.bar here
|
|
1263
1266
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/metaPath")
|
|
1264
1267
|
.returns(SyncPromise.resolve(Promise.resolve({$kind : "Property"})));
|
|
1268
|
+
oHelperMock.expects("clone").never();
|
|
1269
|
+
oBindingMock.expects("selectKeyProperties").never();
|
|
1265
1270
|
oBindingMock.expects("getBaseForPathReduction")
|
|
1266
1271
|
.withExactArgs().returns("/base/path");
|
|
1267
|
-
|
|
1272
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
1268
1273
|
.withExactArgs("/resolved/child/path@foo.bar", "/base/path")
|
|
1269
1274
|
.returns("/reduced/child/path@foo.bar");
|
|
1270
1275
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path@foo.bar")
|
|
@@ -1303,10 +1308,11 @@ sap.ui.define([
|
|
|
1303
1308
|
|
|
1304
1309
|
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1305
1310
|
assert.notStrictEqual(oBinding.oCachePromise, oCachePromise);
|
|
1311
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath["childPath@foo.bar"], oPromise);
|
|
1312
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath),
|
|
1313
|
+
["childPath@foo.bar"]);
|
|
1306
1314
|
return oBinding.oCachePromise.then(function (oResultingCache) {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
assert.strictEqual(bUseCache, undefined);
|
|
1315
|
+
assert.strictEqual(oPromise.getResult(), undefined);
|
|
1310
1316
|
assert.strictEqual(oResultingCache, oFixture.shared ? oCache1 : oCache0);
|
|
1311
1317
|
});
|
|
1312
1318
|
});
|
|
@@ -1315,8 +1321,6 @@ sap.ui.define([
|
|
|
1315
1321
|
//*********************************************************************************************
|
|
1316
1322
|
QUnit.test("fetchIfChildCanUseCache: empty child path", function (assert) {
|
|
1317
1323
|
var oMetaModel = {
|
|
1318
|
-
fetchObject : function () {},
|
|
1319
|
-
getMetaPath : function () {},
|
|
1320
1324
|
getReducedPath : function () {}
|
|
1321
1325
|
},
|
|
1322
1326
|
fnFetchMetadata = function () {},
|
|
@@ -1325,7 +1329,7 @@ sap.ui.define([
|
|
|
1325
1329
|
oCachePromise : SyncPromise.resolve(Promise.resolve(null)),
|
|
1326
1330
|
oContext : {},
|
|
1327
1331
|
wrapChildQueryOptions : function () {},
|
|
1328
|
-
|
|
1332
|
+
doFetchOrGetQueryOptions : function () {},
|
|
1329
1333
|
isFirstCreateAtEnd : function () {},
|
|
1330
1334
|
aggregateQueryOptions : function () {},
|
|
1331
1335
|
oModel : {
|
|
@@ -1340,31 +1344,35 @@ sap.ui.define([
|
|
|
1340
1344
|
}),
|
|
1341
1345
|
oBindingMock = this.mock(oBinding),
|
|
1342
1346
|
mChildQueryOptions = {},
|
|
1343
|
-
|
|
1347
|
+
mClonedQueryOptions = {},
|
|
1344
1348
|
oContext = Context.create(this.oModel, oBinding, "/Set/~", Context.VIRTUAL),
|
|
1345
1349
|
oHelperMock = this.mock(_Helper),
|
|
1346
1350
|
mLocalQueryOptions = {},
|
|
1347
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
1348
1351
|
oModelMock = this.mock(oBinding.oModel),
|
|
1349
|
-
oPromise
|
|
1352
|
+
oPromise,
|
|
1353
|
+
mWrappedChildQueryOptions = {};
|
|
1350
1354
|
|
|
1355
|
+
oBinding.mCanUseCachePromiseByChildPath[""] = "~n/a~";
|
|
1351
1356
|
oModelMock.expects("resolve")
|
|
1352
1357
|
.withExactArgs("", sinon.match.same(oContext))
|
|
1353
1358
|
.returns("/resolved/child/path");
|
|
1354
1359
|
oHelperMock.expects("getMetaPath").withExactArgs("/Set/~").returns("/Set");
|
|
1355
1360
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
1356
1361
|
.returns("/resolved/child/metaPath");
|
|
1357
|
-
oBindingMock.expects("
|
|
1362
|
+
oBindingMock.expects("doFetchOrGetQueryOptions")
|
|
1358
1363
|
.withExactArgs(sinon.match.same(oBinding.oContext))
|
|
1359
1364
|
.returns(SyncPromise.resolve(mLocalQueryOptions));
|
|
1360
|
-
|
|
1365
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
1361
1366
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/metaPath")
|
|
1362
1367
|
.returns(SyncPromise.resolve({$kind : "EntitySet"}));
|
|
1368
|
+
oHelperMock.expects("clone")
|
|
1369
|
+
.withExactArgs(sinon.match.same(mLocalQueryOptions))
|
|
1370
|
+
.returns(mClonedQueryOptions);
|
|
1363
1371
|
oBindingMock.expects("selectKeyProperties")
|
|
1364
|
-
.withExactArgs(
|
|
1372
|
+
.withExactArgs(mClonedQueryOptions, "/Set");
|
|
1365
1373
|
oBindingMock.expects("getBaseForPathReduction")
|
|
1366
1374
|
.withExactArgs().returns("/base/path");
|
|
1367
|
-
|
|
1375
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
1368
1376
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
1369
1377
|
.returns("/reduced/child/path");
|
|
1370
1378
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
@@ -1384,9 +1392,10 @@ sap.ui.define([
|
|
|
1384
1392
|
oPromise = oBinding.fetchIfChildCanUseCache(oContext, "",
|
|
1385
1393
|
SyncPromise.resolve(mChildQueryOptions), false);
|
|
1386
1394
|
|
|
1395
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1396
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {"" : "~n/a~"}, "unchanged");
|
|
1387
1397
|
return oPromise.then(function (sReducedPath) {
|
|
1388
1398
|
assert.strictEqual(sReducedPath, "/reduced/child/path");
|
|
1389
|
-
assert.deepEqual(oBinding.aChildCanUseCachePromises, [oPromise]);
|
|
1390
1399
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1391
1400
|
});
|
|
1392
1401
|
});
|
|
@@ -1401,8 +1410,6 @@ sap.ui.define([
|
|
|
1401
1410
|
}].forEach(function (oFixture, i) {
|
|
1402
1411
|
QUnit.test("fetchIfChildCanUseCache, error handling, " + i, function (assert) {
|
|
1403
1412
|
var oMetaModel = {
|
|
1404
|
-
fetchObject : function () {},
|
|
1405
|
-
getMetaPath : function () {},
|
|
1406
1413
|
getReducedPath : function () {}
|
|
1407
1414
|
},
|
|
1408
1415
|
fnFetchMetadata = function () {},
|
|
@@ -1414,7 +1421,7 @@ sap.ui.define([
|
|
|
1414
1421
|
oCache : undefined,
|
|
1415
1422
|
oCachePromise : SyncPromise.resolve(Promise.resolve(null)),
|
|
1416
1423
|
oContext : {},
|
|
1417
|
-
|
|
1424
|
+
doFetchOrGetQueryOptions : function () {
|
|
1418
1425
|
return SyncPromise.resolve({});
|
|
1419
1426
|
},
|
|
1420
1427
|
oModel : {
|
|
@@ -1430,23 +1437,25 @@ sap.ui.define([
|
|
|
1430
1437
|
}),
|
|
1431
1438
|
oContext = Context.create(this.oModel, oBinding, "/Set('2')"),
|
|
1432
1439
|
oHelperMock = this.mock(_Helper),
|
|
1433
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
1434
1440
|
oModelMock = this.mock(oBinding.oModel),
|
|
1435
1441
|
sPath = oFixture.sPath,
|
|
1436
1442
|
oPromise;
|
|
1437
1443
|
|
|
1444
|
+
oBinding.mCanUseCachePromiseByChildPath[""] = "~n/a~";
|
|
1438
1445
|
oModelMock.expects("resolve")
|
|
1439
1446
|
.withExactArgs(sPath, sinon.match.same(oContext))
|
|
1440
1447
|
.returns("/resolved/child/path");
|
|
1441
1448
|
oHelperMock.expects("getMetaPath").withExactArgs("/Set('2')").returns("/Set");
|
|
1442
1449
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
1443
1450
|
.returns("/resolved/child/metaPath");
|
|
1444
|
-
|
|
1451
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
1445
1452
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/metaPath")
|
|
1446
1453
|
.returns(SyncPromise.resolve(oFixture.oProperty));
|
|
1454
|
+
oHelperMock.expects("clone").never();
|
|
1455
|
+
this.mock(oBinding).expects("selectKeyProperties").never();
|
|
1447
1456
|
this.mock(oBinding).expects("getBaseForPathReduction")
|
|
1448
1457
|
.withExactArgs().returns("/base/path");
|
|
1449
|
-
|
|
1458
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
1450
1459
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
1451
1460
|
.returns("/reduced/child/path");
|
|
1452
1461
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
@@ -1462,8 +1471,10 @@ sap.ui.define([
|
|
|
1462
1471
|
// code under test
|
|
1463
1472
|
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sPath);
|
|
1464
1473
|
|
|
1465
|
-
|
|
1466
|
-
|
|
1474
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1475
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {"" : "~n/a~"}, "unchanged");
|
|
1476
|
+
return oPromise.then(function (sReducedPath) {
|
|
1477
|
+
assert.strictEqual(sReducedPath, undefined);
|
|
1467
1478
|
assert.deepEqual(oBinding.mAggregatedQueryOptions, mOriginalAggregatedQueryOptions);
|
|
1468
1479
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1469
1480
|
});
|
|
@@ -1475,7 +1486,6 @@ sap.ui.define([
|
|
|
1475
1486
|
QUnit.test("fetchIfChildCanUseCache, advertised action #" + i, function (assert) {
|
|
1476
1487
|
var oMetaModel = {
|
|
1477
1488
|
fetchObject : function () {},
|
|
1478
|
-
getMetaPath : function () {},
|
|
1479
1489
|
getReducedPath : function () {}
|
|
1480
1490
|
},
|
|
1481
1491
|
oModel = {
|
|
@@ -1492,7 +1502,7 @@ sap.ui.define([
|
|
|
1492
1502
|
oCache : bImmutable ? oCache : undefined,
|
|
1493
1503
|
oCachePromise : SyncPromise.resolve(bImmutable ? oCache : Promise.resolve(oCache)),
|
|
1494
1504
|
oContext : {},
|
|
1495
|
-
|
|
1505
|
+
doFetchOrGetQueryOptions : function () {
|
|
1496
1506
|
return SyncPromise.resolve({});
|
|
1497
1507
|
},
|
|
1498
1508
|
oModel : oModel,
|
|
@@ -1502,7 +1512,8 @@ sap.ui.define([
|
|
|
1502
1512
|
}),
|
|
1503
1513
|
oContext = Context.create(oModel, oBinding, "/Set('2')"),
|
|
1504
1514
|
oHelperMock = this.mock(_Helper),
|
|
1505
|
-
sPath = "#foo.bar.AcFoo"
|
|
1515
|
+
sPath = "#foo.bar.AcFoo",
|
|
1516
|
+
oPromise;
|
|
1506
1517
|
|
|
1507
1518
|
this.mock(oBinding).expects("getBaseForPathReduction")
|
|
1508
1519
|
.withExactArgs().returns("/base/path");
|
|
@@ -1525,12 +1536,16 @@ sap.ui.define([
|
|
|
1525
1536
|
.returns(SyncPromise.resolve());
|
|
1526
1537
|
|
|
1527
1538
|
// code under test
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1539
|
+
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sPath, null, "~bIsProperty~");
|
|
1540
|
+
|
|
1541
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1542
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath[sPath], oPromise);
|
|
1543
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), [sPath]);
|
|
1544
|
+
return oPromise.then(function (sReducedPath) {
|
|
1545
|
+
assert.strictEqual(sReducedPath,
|
|
1546
|
+
bImmutable ? undefined : "/reduced/child/path/" + sPath);
|
|
1547
|
+
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1548
|
+
});
|
|
1534
1549
|
});
|
|
1535
1550
|
});
|
|
1536
1551
|
|
|
@@ -1538,13 +1553,11 @@ sap.ui.define([
|
|
|
1538
1553
|
["$count", "EMPLOYEE_2_EQUIPMENTS/$count"].forEach(function (sChildPath) {
|
|
1539
1554
|
QUnit.test("fetchIfChildCanUseCache: " + sChildPath, function (assert) {
|
|
1540
1555
|
var oMetaModel = {
|
|
1541
|
-
fetchObject : function () {},
|
|
1542
|
-
getMetaPath : function () {},
|
|
1543
1556
|
getReducedPath : function () {}
|
|
1544
1557
|
},
|
|
1545
1558
|
fnFetchMetadata = function () {},
|
|
1546
1559
|
oBinding = new ODataParentBinding({
|
|
1547
|
-
|
|
1560
|
+
doFetchOrGetQueryOptions : function () {
|
|
1548
1561
|
return SyncPromise.resolve({});
|
|
1549
1562
|
},
|
|
1550
1563
|
oModel : {
|
|
@@ -1557,34 +1570,41 @@ sap.ui.define([
|
|
|
1557
1570
|
mParameters : {},
|
|
1558
1571
|
sPath : "/Set"
|
|
1559
1572
|
}),
|
|
1560
|
-
oContext = Context.create(oBinding.oModel, oBinding, "/Set(
|
|
1561
|
-
oHelperMock = this.mock(_Helper)
|
|
1573
|
+
oContext = Context.create(oBinding.oModel, oBinding, "/Set($uid=id-1-23)/ToMany"),
|
|
1574
|
+
oHelperMock = this.mock(_Helper),
|
|
1575
|
+
oPromise;
|
|
1562
1576
|
|
|
1563
1577
|
this.mock(oBinding).expects("getBaseForPathReduction").withExactArgs()
|
|
1564
1578
|
.returns("/base/path");
|
|
1565
1579
|
this.mock(oBinding.oModel).expects("resolve")
|
|
1566
1580
|
.withExactArgs(sChildPath, sinon.match.same(oContext))
|
|
1567
1581
|
.returns("/resolved/child/path");
|
|
1568
|
-
oHelperMock.expects("getMetaPath").withExactArgs("/Set(
|
|
1582
|
+
oHelperMock.expects("getMetaPath").withExactArgs("/Set($uid=id-1-23)/ToMany")
|
|
1583
|
+
.returns("/Set/ToMany");
|
|
1569
1584
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
1570
1585
|
.returns("/resolved/child/metaPath");
|
|
1571
|
-
|
|
1586
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
1572
1587
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/metaPath")
|
|
1573
1588
|
.returns(SyncPromise.resolve());
|
|
1589
|
+
oHelperMock.expects("clone").never();
|
|
1590
|
+
this.mock(oBinding).expects("selectKeyProperties").never();
|
|
1574
1591
|
this.mock(oMetaModel).expects("getReducedPath")
|
|
1575
1592
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
1576
1593
|
.returns("/reduced/child/path");
|
|
1577
1594
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
1578
1595
|
.returns("/reduced/child/metaPath");
|
|
1579
|
-
oHelperMock.expects("getRelativePath")
|
|
1580
|
-
.returns(sChildPath);
|
|
1596
|
+
oHelperMock.expects("getRelativePath")
|
|
1597
|
+
.withExactArgs("/reduced/child/metaPath", "/Set/ToMany").returns(sChildPath);
|
|
1581
1598
|
|
|
1582
1599
|
// code under test
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1600
|
+
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sChildPath, null, "~bIsProperty~");
|
|
1601
|
+
|
|
1602
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1603
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {}, "unchanged due to $uid");
|
|
1604
|
+
return oPromise.then(function (sReducedPath) {
|
|
1605
|
+
assert.strictEqual(sReducedPath, "/reduced/child/path");
|
|
1606
|
+
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1607
|
+
});
|
|
1588
1608
|
});
|
|
1589
1609
|
});
|
|
1590
1610
|
|
|
@@ -1618,6 +1638,8 @@ sap.ui.define([
|
|
|
1618
1638
|
.getResult(),
|
|
1619
1639
|
"/resolved/child/path");
|
|
1620
1640
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1641
|
+
assert.deepEqual(oBinding.aChildCanUseCachePromises, [], "unchanged");
|
|
1642
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {}, "unchanged");
|
|
1621
1643
|
});
|
|
1622
1644
|
|
|
1623
1645
|
//*********************************************************************************************
|
|
@@ -1647,14 +1669,14 @@ sap.ui.define([
|
|
|
1647
1669
|
.getResult(),
|
|
1648
1670
|
"/resolved/child/path");
|
|
1649
1671
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1672
|
+
assert.deepEqual(oBinding.aChildCanUseCachePromises, [], "unchanged");
|
|
1673
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {}, "unchanged");
|
|
1650
1674
|
});
|
|
1651
1675
|
|
|
1652
1676
|
//*********************************************************************************************
|
|
1653
1677
|
[false, true].forEach(function (bReduced, i) {
|
|
1654
1678
|
QUnit.test("fetchIfChildCanUseCache, operation parameter #" + i, function (assert) {
|
|
1655
1679
|
var oMetaModel = {
|
|
1656
|
-
fetchObject : function () {},
|
|
1657
|
-
getMetaPath : function () {},
|
|
1658
1680
|
getReducedPath : function () {}
|
|
1659
1681
|
},
|
|
1660
1682
|
fnFetchMetadata = function () {},
|
|
@@ -1673,17 +1695,17 @@ sap.ui.define([
|
|
|
1673
1695
|
getBinding : function () { return oParentBinding; },
|
|
1674
1696
|
getPath : function () { return "/Set('2')"; }
|
|
1675
1697
|
},
|
|
1676
|
-
|
|
1698
|
+
doFetchOrGetQueryOptions : function () {
|
|
1677
1699
|
return SyncPromise.resolve({});
|
|
1678
1700
|
},
|
|
1679
1701
|
oModel : oModel,
|
|
1680
1702
|
mParameters : {},
|
|
1681
1703
|
sPath : "operation(...)"
|
|
1682
1704
|
}),
|
|
1683
|
-
|
|
1705
|
+
mChildQueryOptions = {},
|
|
1706
|
+
oChildQueryOptionsPromise = SyncPromise.resolve(Promise.resolve(mChildQueryOptions)),
|
|
1684
1707
|
oContext = Context.create(oModel, oBinding, "/Set('2')/operation(...)/$Parameter"),
|
|
1685
1708
|
oHelperMock = this.mock(_Helper),
|
|
1686
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
1687
1709
|
oModelMock = this.mock(oBinding.oModel),
|
|
1688
1710
|
sPath = "foo/bar",
|
|
1689
1711
|
oPromise;
|
|
@@ -1698,10 +1720,12 @@ sap.ui.define([
|
|
|
1698
1720
|
oHelperMock.expects("getMetaPath")
|
|
1699
1721
|
.withExactArgs("/Set('2')/operation(...)/$Parameter/foo/bar")
|
|
1700
1722
|
.returns("/Set/operation/$Parameter/foo/bar");
|
|
1701
|
-
|
|
1723
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
1702
1724
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/Set/operation/$Parameter/foo/bar")
|
|
1703
1725
|
.returns(SyncPromise.resolve());
|
|
1704
|
-
|
|
1726
|
+
oHelperMock.expects("clone").never();
|
|
1727
|
+
this.mock(oBinding).expects("selectKeyProperties").never();
|
|
1728
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
1705
1729
|
.withExactArgs("/Set('2')/operation(...)/$Parameter/foo/bar", "/base/path")
|
|
1706
1730
|
.returns("/reduced/child/path");
|
|
1707
1731
|
oHelperMock.expects("getMetaPath").withExactArgs("/reduced/child/path")
|
|
@@ -1714,7 +1738,7 @@ sap.ui.define([
|
|
|
1714
1738
|
.returns("operation(...)/$Parameter/foo/bar");
|
|
1715
1739
|
this.mock(oParentBinding).expects("fetchIfChildCanUseCache").exactly(bReduced ? 1 : 0)
|
|
1716
1740
|
.withExactArgs(sinon.match.same(oBinding.oContext), "operation(...)/$Parameter/foo/bar",
|
|
1717
|
-
sinon.match.same(
|
|
1741
|
+
sinon.match.same(mChildQueryOptions), "~bIsProperty~")
|
|
1718
1742
|
.returns("/reduced/child/path");
|
|
1719
1743
|
this.mock(oBinding).expects("aggregateQueryOptions").never();
|
|
1720
1744
|
|
|
@@ -1722,6 +1746,9 @@ sap.ui.define([
|
|
|
1722
1746
|
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sPath, oChildQueryOptionsPromise,
|
|
1723
1747
|
"~bIsProperty~");
|
|
1724
1748
|
|
|
1749
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1750
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath[sPath], oPromise);
|
|
1751
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), [sPath]);
|
|
1725
1752
|
return oPromise.then(function (sReducedPath) {
|
|
1726
1753
|
assert.strictEqual(sReducedPath, "/reduced/child/path");
|
|
1727
1754
|
assert.strictEqual(oBinding.bHasPathReductionToParent, bReduced);
|
|
@@ -1731,16 +1758,11 @@ sap.ui.define([
|
|
|
1731
1758
|
|
|
1732
1759
|
//*********************************************************************************************
|
|
1733
1760
|
QUnit.test("fetchIfChildCanUseCache: non-deferred function", function (assert) {
|
|
1734
|
-
var
|
|
1735
|
-
getMetaPath : function (sPath) {
|
|
1736
|
-
return _Helper.getMetaPath(sPath);
|
|
1737
|
-
}
|
|
1738
|
-
},
|
|
1739
|
-
fnFetchMetadata = function () {},
|
|
1761
|
+
var fnFetchMetadata = function () {},
|
|
1740
1762
|
oBinding = new ODataParentBinding({
|
|
1741
|
-
|
|
1763
|
+
doFetchOrGetQueryOptions : function () {},
|
|
1742
1764
|
oModel : {
|
|
1743
|
-
getMetaModel : function () { return
|
|
1765
|
+
getMetaModel : function () { return null; },
|
|
1744
1766
|
oInterface : {
|
|
1745
1767
|
fetchMetadata : fnFetchMetadata
|
|
1746
1768
|
},
|
|
@@ -1754,6 +1776,7 @@ sap.ui.define([
|
|
|
1754
1776
|
oModelMock = this.mock(oBinding.oModel),
|
|
1755
1777
|
oPromise;
|
|
1756
1778
|
|
|
1779
|
+
oBinding.mCanUseCachePromiseByChildPath[""] = "~n/a~";
|
|
1757
1780
|
this.mock(oBinding).expects("getBaseForPathReduction")
|
|
1758
1781
|
.withExactArgs().returns("/base/path");
|
|
1759
1782
|
oModelMock.expects("resolve")
|
|
@@ -1762,12 +1785,16 @@ sap.ui.define([
|
|
|
1762
1785
|
this.mock(_Helper).expects("fetchPropertyAndType")
|
|
1763
1786
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/path")
|
|
1764
1787
|
.returns(SyncPromise.resolve([{$isBound : true, $kind : "Function"}]));
|
|
1765
|
-
this.mock(
|
|
1788
|
+
this.mock(_Helper).expects("clone").never();
|
|
1789
|
+
this.mock(oBinding).expects("selectKeyProperties").never();
|
|
1790
|
+
this.mock(oBinding).expects("doFetchOrGetQueryOptions").withExactArgs(undefined)
|
|
1766
1791
|
.returns(SyncPromise.resolve());
|
|
1767
1792
|
|
|
1768
1793
|
// code under test
|
|
1769
1794
|
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sChildPath, SyncPromise.resolve());
|
|
1770
1795
|
|
|
1796
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1797
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {"" : "~n/a~"}, "unchanged");
|
|
1771
1798
|
return oPromise.then(function (sReducedPath) {
|
|
1772
1799
|
assert.strictEqual(sReducedPath, undefined);
|
|
1773
1800
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
@@ -1785,17 +1812,13 @@ sap.ui.define([
|
|
|
1785
1812
|
setQueryOptions : function () {}
|
|
1786
1813
|
},
|
|
1787
1814
|
oMetaModel = {
|
|
1788
|
-
fetchObject : function () {},
|
|
1789
|
-
getMetaPath : function (sPath) {
|
|
1790
|
-
return _Helper.getMetaPath(sPath);
|
|
1791
|
-
},
|
|
1792
1815
|
getReducedPath : function () {}
|
|
1793
1816
|
},
|
|
1794
1817
|
fnFetchMetadata = function () {},
|
|
1795
1818
|
oBinding = new ODataParentBinding({
|
|
1796
1819
|
oCache : bImmutable ? oCache : undefined,
|
|
1797
1820
|
oCachePromise : SyncPromise.resolve(bImmutable ? oCache : Promise.resolve(oCache)),
|
|
1798
|
-
|
|
1821
|
+
doFetchOrGetQueryOptions : function () {},
|
|
1799
1822
|
oModel : {
|
|
1800
1823
|
getMetaModel : function () { return oMetaModel; },
|
|
1801
1824
|
oInterface : {
|
|
@@ -1809,9 +1832,7 @@ sap.ui.define([
|
|
|
1809
1832
|
}),
|
|
1810
1833
|
oBindingMock = this.mock(oBinding),
|
|
1811
1834
|
sChildPath = "value",
|
|
1812
|
-
mChildQueryOptions = {},
|
|
1813
1835
|
oContext = Context.create(this.oModel, oBinding, "/Function(foo=42)"),
|
|
1814
|
-
oHelperMock = this.mock(_Helper),
|
|
1815
1836
|
mLocalQueryOptions = {},
|
|
1816
1837
|
oModelMock = this.mock(oBinding.oModel),
|
|
1817
1838
|
oPromise;
|
|
@@ -1822,27 +1843,30 @@ sap.ui.define([
|
|
|
1822
1843
|
this.mock(_Helper).expects("fetchPropertyAndType")
|
|
1823
1844
|
.withExactArgs(sinon.match.same(fnFetchMetadata), "/resolved/child/path")
|
|
1824
1845
|
.returns(SyncPromise.resolve({$isCollection : true, $Type : "some.EntityType"}));
|
|
1825
|
-
oBindingMock.expects("
|
|
1846
|
+
oBindingMock.expects("doFetchOrGetQueryOptions").withExactArgs(undefined)
|
|
1826
1847
|
.returns(SyncPromise.resolve(mLocalQueryOptions));
|
|
1848
|
+
this.mock(_Helper).expects("clone").withExactArgs(sinon.match.object).returns("~clone~");
|
|
1827
1849
|
oBindingMock.expects("selectKeyProperties")
|
|
1828
|
-
.withExactArgs(
|
|
1850
|
+
.withExactArgs("~clone~", "/Function"); // Note: w/o $Key nothing happens
|
|
1829
1851
|
oBindingMock.expects("getBaseForPathReduction")
|
|
1830
1852
|
.withExactArgs().returns("/base/path");
|
|
1831
1853
|
this.mock(oMetaModel).expects("getReducedPath")
|
|
1832
1854
|
.withExactArgs("/resolved/child/path", "/base/path")
|
|
1833
1855
|
.returns("/reduced/child/path");
|
|
1834
|
-
|
|
1856
|
+
this.mock(_Helper).expects("getRelativePath")
|
|
1835
1857
|
.withExactArgs("/reduced/child/path", "/Function")
|
|
1836
1858
|
.returns("value");
|
|
1837
1859
|
oBindingMock.expects("aggregateQueryOptions")
|
|
1838
|
-
.withExactArgs(
|
|
1839
|
-
"~bIsProperty~")
|
|
1860
|
+
.withExactArgs({}, "/Function", bImmutable, "~bIsProperty~")
|
|
1840
1861
|
.returns(!bImmutable);
|
|
1841
1862
|
|
|
1842
1863
|
// code under test
|
|
1843
|
-
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sChildPath,
|
|
1844
|
-
|
|
1864
|
+
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sChildPath, undefined,
|
|
1865
|
+
"~bIsProperty~");
|
|
1845
1866
|
|
|
1867
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1868
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath[sChildPath], oPromise);
|
|
1869
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), [sChildPath]);
|
|
1846
1870
|
return oPromise.then(function (sReducedPath) {
|
|
1847
1871
|
assert.strictEqual(sReducedPath, bImmutable ? undefined : "/reduced/child/path");
|
|
1848
1872
|
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
@@ -1864,38 +1888,27 @@ sap.ui.define([
|
|
|
1864
1888
|
getIndex : function () {},
|
|
1865
1889
|
getPath : function () { return "/TEAMS"; }
|
|
1866
1890
|
},
|
|
1867
|
-
oModelMock = this.mock(oBinding.oModel)
|
|
1868
|
-
oPromise,
|
|
1869
|
-
oRootBinding = {
|
|
1870
|
-
isSuspended : function () {}
|
|
1871
|
-
};
|
|
1891
|
+
oModelMock = this.mock(oBinding.oModel);
|
|
1872
1892
|
|
|
1873
1893
|
this.mock(oBinding).expects("getBaseForPathReduction").withExactArgs().returns("anything");
|
|
1874
1894
|
oModelMock.expects("resolve")
|
|
1875
1895
|
.withExactArgs("childPath", sinon.match.same(oContext))
|
|
1876
1896
|
.returns("/resolved/child/path");
|
|
1897
|
+
this.mock(oBinding).expects("isRootBindingSuspended").withExactArgs().returns(true);
|
|
1877
1898
|
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
"~bIsProperty~");
|
|
1887
|
-
|
|
1888
|
-
return oPromise.then(function (bUseCache) {
|
|
1889
|
-
assert.strictEqual(bUseCache, "/resolved/child/path");
|
|
1890
|
-
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1891
|
-
});
|
|
1899
|
+
assert.strictEqual(
|
|
1900
|
+
// code under test
|
|
1901
|
+
oBinding.fetchIfChildCanUseCache(oContext, "childPath", {}, "~bIsProperty~")
|
|
1902
|
+
.getResult(),
|
|
1903
|
+
"/resolved/child/path");
|
|
1904
|
+
assert.strictEqual(oBinding.bHasPathReductionToParent, false);
|
|
1905
|
+
assert.deepEqual(oBinding.aChildCanUseCachePromises, [], "unchanged");
|
|
1906
|
+
assert.deepEqual(oBinding.mCanUseCachePromiseByChildPath, {}, "unchanged");
|
|
1892
1907
|
});
|
|
1893
1908
|
|
|
1894
1909
|
//*********************************************************************************************
|
|
1895
1910
|
QUnit.test("fetchIfChildCanUseCache: delegate to parent binding", function (assert) {
|
|
1896
1911
|
var oMetaModel = {
|
|
1897
|
-
fetchObject : function () {},
|
|
1898
|
-
getMetaPath : function () {},
|
|
1899
1912
|
getReducedPath : function () {}
|
|
1900
1913
|
},
|
|
1901
1914
|
fnFetchMetadata = function () {},
|
|
@@ -1907,7 +1920,7 @@ sap.ui.define([
|
|
|
1907
1920
|
getBinding : function () { return oParentBinding; },
|
|
1908
1921
|
getPath : function () { return "/SalesOrderList('42')"; }
|
|
1909
1922
|
},
|
|
1910
|
-
|
|
1923
|
+
doFetchOrGetQueryOptions : function () {},
|
|
1911
1924
|
isFirstCreateAtEnd : function () {},
|
|
1912
1925
|
oModel : {
|
|
1913
1926
|
getMetaModel : function () { return oMetaModel; },
|
|
@@ -1919,13 +1932,13 @@ sap.ui.define([
|
|
|
1919
1932
|
sPath : "SO_2_SOITEMS"
|
|
1920
1933
|
}),
|
|
1921
1934
|
oBindingMock = this.mock(oBinding),
|
|
1935
|
+
sChildPath = "SOITEMS_2_SO/Note",
|
|
1922
1936
|
mChildQueryOptions = {},
|
|
1923
1937
|
oChildQueryOptionsPromise = SyncPromise.resolve(Promise.resolve(mChildQueryOptions)),
|
|
1924
1938
|
oContext = Context.create(this.oModel, oBinding,
|
|
1925
1939
|
"/SalesOrderList('42')/SO_2_SOITEMS('23')", 23),
|
|
1926
1940
|
oHelperMock = this.mock(_Helper),
|
|
1927
1941
|
mLocalQueryOptions = {},
|
|
1928
|
-
oMetaModelMock = this.mock(oMetaModel),
|
|
1929
1942
|
oModelMock = this.mock(oBinding.oModel),
|
|
1930
1943
|
oPromise;
|
|
1931
1944
|
|
|
@@ -1941,16 +1954,18 @@ sap.ui.define([
|
|
|
1941
1954
|
oHelperMock.expects("getMetaPath")
|
|
1942
1955
|
.withExactArgs("/SalesOrderList('42')/SO_2_SOITEMS('23')/SOITEMS_2_SO/Note")
|
|
1943
1956
|
.returns("/SalesOrderList/SO_2_SOITEMS/SOITEMS_2_SO/Note");
|
|
1944
|
-
oBindingMock.expects("
|
|
1957
|
+
oBindingMock.expects("doFetchOrGetQueryOptions")
|
|
1945
1958
|
.withExactArgs(sinon.match.same(oBinding.oContext))
|
|
1946
1959
|
.returns(SyncPromise.resolve(mLocalQueryOptions));
|
|
1947
|
-
|
|
1960
|
+
oHelperMock.expects("fetchPropertyAndType")
|
|
1948
1961
|
.withExactArgs(sinon.match.same(fnFetchMetadata),
|
|
1949
1962
|
"/SalesOrderList/SO_2_SOITEMS/SOITEMS_2_SO/Note")
|
|
1950
1963
|
.returns(SyncPromise.resolve({$kind : "Property"}));
|
|
1964
|
+
this.mock(_Helper).expects("clone").never();
|
|
1965
|
+
this.mock(oBinding).expects("selectKeyProperties").never();
|
|
1951
1966
|
oBindingMock.expects("getBaseForPathReduction")
|
|
1952
1967
|
.withExactArgs().returns("/SalesOrderList");
|
|
1953
|
-
|
|
1968
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
1954
1969
|
.withExactArgs("/SalesOrderList('42')/SO_2_SOITEMS('23')/SOITEMS_2_SO/Note",
|
|
1955
1970
|
"/SalesOrderList")
|
|
1956
1971
|
.returns("/SalesOrderList('42')/Note");
|
|
@@ -1965,19 +1980,101 @@ sap.ui.define([
|
|
|
1965
1980
|
.returns("SO_2_SOITEMS('23')/SOITEMS_2_SO/Note");
|
|
1966
1981
|
this.mock(oParentBinding).expects("fetchIfChildCanUseCache")
|
|
1967
1982
|
.withExactArgs(sinon.match.same(oBinding.oContext),
|
|
1968
|
-
"SO_2_SOITEMS('23')/SOITEMS_2_SO/Note", sinon.match.same(
|
|
1983
|
+
"SO_2_SOITEMS('23')/SOITEMS_2_SO/Note", sinon.match.same(mChildQueryOptions),
|
|
1984
|
+
"~bIsProperty~")
|
|
1969
1985
|
.returns(Promise.resolve("/SalesOrderList('42')/Note"));
|
|
1970
1986
|
|
|
1971
1987
|
// code under test
|
|
1972
|
-
oPromise = oBinding.fetchIfChildCanUseCache(oContext,
|
|
1973
|
-
|
|
1988
|
+
oPromise = oBinding.fetchIfChildCanUseCache(oContext, sChildPath, oChildQueryOptionsPromise,
|
|
1989
|
+
"~bIsProperty~");
|
|
1974
1990
|
|
|
1991
|
+
assert.strictEqual(oBinding.aChildCanUseCachePromises[0], oPromise);
|
|
1992
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath[sChildPath], oPromise);
|
|
1993
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), [sChildPath]);
|
|
1975
1994
|
return oPromise.then(function (sReducedPath) {
|
|
1976
1995
|
assert.strictEqual(sReducedPath, "/SalesOrderList('42')/Note");
|
|
1977
1996
|
assert.strictEqual(oBinding.bHasPathReductionToParent, true);
|
|
1978
1997
|
});
|
|
1979
1998
|
});
|
|
1980
1999
|
|
|
2000
|
+
//*********************************************************************************************
|
|
2001
|
+
[{
|
|
2002
|
+
sOldReducedPath : undefined,
|
|
2003
|
+
sChildPath : "childPath",
|
|
2004
|
+
bSameMetaPath : true
|
|
2005
|
+
}, {
|
|
2006
|
+
sOldReducedPath : "ignore/me",
|
|
2007
|
+
sChildPath : "childPath",
|
|
2008
|
+
bSameMetaPath : true
|
|
2009
|
+
}, {
|
|
2010
|
+
sOldReducedPath : "ignore/me",
|
|
2011
|
+
sChildPath : "child/path",
|
|
2012
|
+
bSameMetaPath : true
|
|
2013
|
+
}, {
|
|
2014
|
+
sOldReducedPath : "ignore/me",
|
|
2015
|
+
sChildPath : "child/path",
|
|
2016
|
+
bSameMetaPath : false
|
|
2017
|
+
}].forEach(function (o, i) {
|
|
2018
|
+
QUnit.test("fetchIfChildCanUseCache: mCanUseCachePromiseByChildPath, #" + i, function (assert) {
|
|
2019
|
+
var oCanUseCachePromise = SyncPromise.resolve(Promise.resolve(o.sOldReducedPath)),
|
|
2020
|
+
oMetaModel = {
|
|
2021
|
+
getReducedPath : function () {}
|
|
2022
|
+
},
|
|
2023
|
+
oBinding = new ODataParentBinding({
|
|
2024
|
+
oContext : "do not use",
|
|
2025
|
+
oModel : {
|
|
2026
|
+
getMetaModel : function () { return oMetaModel; },
|
|
2027
|
+
resolve : function () {}
|
|
2028
|
+
}
|
|
2029
|
+
}),
|
|
2030
|
+
oContext = {
|
|
2031
|
+
getIndex : function () {},
|
|
2032
|
+
getPath : function () { return "/TEAMS"; }
|
|
2033
|
+
},
|
|
2034
|
+
sExpectedReducedPath = o.sOldReducedPath ? "/resolved/child/path" : undefined,
|
|
2035
|
+
oHelperMock = this.mock(_Helper),
|
|
2036
|
+
oPromise;
|
|
2037
|
+
|
|
2038
|
+
oBinding.mCanUseCachePromiseByChildPath[o.sChildPath] = oCanUseCachePromise;
|
|
2039
|
+
oBinding.bHasPathReductionToParent = "~bHasPathReductionToParent~";
|
|
2040
|
+
this.mock(oBinding).expects("getBaseForPathReduction").withExactArgs()
|
|
2041
|
+
.returns("/base/path");
|
|
2042
|
+
this.mock(oBinding.oModel).expects("resolve")
|
|
2043
|
+
.withExactArgs(o.sChildPath, sinon.match.same(oContext))
|
|
2044
|
+
.returns("/resolved/child/path");
|
|
2045
|
+
this.mock(oBinding).expects("isRootBindingSuspended").withExactArgs().returns(false);
|
|
2046
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(undefined).returns(false);
|
|
2047
|
+
oHelperMock.expects("getMetaPath").never();
|
|
2048
|
+
if (o.sChildPath === "child/path") {
|
|
2049
|
+
oHelperMock.expects("getMetaPath").withExactArgs(o.sOldReducedPath).returns("A");
|
|
2050
|
+
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/child/path")
|
|
2051
|
+
.returns(o.bSameMetaPath ? "A" : "B");
|
|
2052
|
+
}
|
|
2053
|
+
if (o.bSameMetaPath) {
|
|
2054
|
+
this.mock(oMetaModel).expects("getReducedPath").never();
|
|
2055
|
+
} else {
|
|
2056
|
+
this.mock(oMetaModel).expects("getReducedPath")
|
|
2057
|
+
.withExactArgs("/resolved/child/path", "/base/path").returns("/reduced/path");
|
|
2058
|
+
sExpectedReducedPath = "/reduced/path";
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
// code under test
|
|
2062
|
+
oPromise = oBinding.fetchIfChildCanUseCache(oContext, o.sChildPath, undefined, true);
|
|
2063
|
+
|
|
2064
|
+
return oPromise.then(function (sReducedPath) {
|
|
2065
|
+
assert.strictEqual(sReducedPath, sExpectedReducedPath);
|
|
2066
|
+
|
|
2067
|
+
// Note: we wait as long as possible to check that s.th. is unchanged
|
|
2068
|
+
assert.strictEqual(oBinding.bHasPathReductionToParent, "~bHasPathReductionToParent~",
|
|
2069
|
+
"unchanged");
|
|
2070
|
+
assert.deepEqual(oBinding.aChildCanUseCachePromises, [], "unchanged");
|
|
2071
|
+
assert.strictEqual(oBinding.mCanUseCachePromiseByChildPath[o.sChildPath],
|
|
2072
|
+
oCanUseCachePromise, "unchanged");
|
|
2073
|
+
assert.deepEqual(Object.keys(oBinding.mCanUseCachePromiseByChildPath), [o.sChildPath]);
|
|
2074
|
+
});
|
|
2075
|
+
});
|
|
2076
|
+
});
|
|
2077
|
+
|
|
1981
2078
|
//*********************************************************************************************
|
|
1982
2079
|
[{
|
|
1983
2080
|
aggregatedQueryOptions : {$select : ["Name", "AGE"]},
|
|
@@ -2069,11 +2166,10 @@ sap.ui.define([
|
|
|
2069
2166
|
getMetaModel : function () { return oMetaModel; }
|
|
2070
2167
|
}
|
|
2071
2168
|
}),
|
|
2072
|
-
oHelperMock = this.mock(_Helper),
|
|
2073
2169
|
oMetaModelMock = this.mock(oMetaModel);
|
|
2074
2170
|
|
|
2075
|
-
|
|
2076
|
-
.withExactArgs(
|
|
2171
|
+
this.mock(_Helper).expects("clone")
|
|
2172
|
+
.withExactArgs(sinon.match.same(oBinding.mLateQueryOptions))
|
|
2077
2173
|
.returns(oFixture.aggregatedQueryOptions);
|
|
2078
2174
|
if (oFixture.metadata) {
|
|
2079
2175
|
Object.keys(oFixture.metadata).forEach(function (sMetaPath) {
|
|
@@ -3614,6 +3710,12 @@ sap.ui.define([
|
|
|
3614
3710
|
getPath : function () { return "baz(3)"; },
|
|
3615
3711
|
requestSideEffects : function () {}
|
|
3616
3712
|
},
|
|
3713
|
+
oChild4 = {
|
|
3714
|
+
oCache : {},
|
|
3715
|
+
oOperation : "~truthy~",
|
|
3716
|
+
// getPath must not be called
|
|
3717
|
+
requestSideEffects : function () {}
|
|
3718
|
+
},
|
|
3617
3719
|
sGroupId = "group",
|
|
3618
3720
|
oHelperMock = this.mock(_Helper),
|
|
3619
3721
|
oModel = {
|
|
@@ -3622,19 +3724,21 @@ sap.ui.define([
|
|
|
3622
3724
|
aPaths = [],
|
|
3623
3725
|
aPaths0 = ["A"],
|
|
3624
3726
|
aPaths1 = [/*empty!*/],
|
|
3625
|
-
aPaths3 = ["
|
|
3727
|
+
aPaths3 = ["B"],
|
|
3728
|
+
aPaths4 = ["C"],
|
|
3626
3729
|
oPromise0 = {index : 0}, // give deepEqual a chance
|
|
3627
3730
|
oPromise3 = {index : 3},
|
|
3731
|
+
oPromise4 = {index : 4},
|
|
3628
3732
|
aPromises = [];
|
|
3629
3733
|
|
|
3630
3734
|
if (oFixture.oContext) {
|
|
3631
3735
|
oBinding.oModel = oModel;
|
|
3632
3736
|
this.mock(oModel).expects("getDependentBindings")
|
|
3633
3737
|
.withExactArgs(sinon.match.same(oFixture.oContext))
|
|
3634
|
-
.returns([oChild0, oChild1, oChild2, oChild3]);
|
|
3738
|
+
.returns([oChild0, oChild1, oChild2, oChild3, oChild4]);
|
|
3635
3739
|
} else {
|
|
3636
3740
|
this.mock(oBinding).expects("getDependentBindings").withExactArgs()
|
|
3637
|
-
.returns([oChild0, oChild1, oChild2, oChild3]);
|
|
3741
|
+
.returns([oChild0, oChild1, oChild2, oChild3, oChild4]);
|
|
3638
3742
|
}
|
|
3639
3743
|
oHelperMock.expects("stripPathPrefix")
|
|
3640
3744
|
.withExactArgs(oFixture.bPrefix ? "~/foo" : "foo", sinon.match.same(aPaths))
|
|
@@ -3655,12 +3759,18 @@ sap.ui.define([
|
|
|
3655
3759
|
this.mock(oChild3).expects("requestSideEffects")
|
|
3656
3760
|
.withExactArgs(sGroupId, sinon.match.same(aPaths3))
|
|
3657
3761
|
.returns(oPromise3);
|
|
3762
|
+
oHelperMock.expects("stripPathPrefix")
|
|
3763
|
+
.withExactArgs(oFixture.bPrefix ? "~" : "", sinon.match.same(aPaths))
|
|
3764
|
+
.returns(aPaths4);
|
|
3765
|
+
this.mock(oChild4).expects("requestSideEffects")
|
|
3766
|
+
.withExactArgs(sGroupId, sinon.match.same(aPaths4))
|
|
3767
|
+
.returns(oPromise4);
|
|
3658
3768
|
|
|
3659
3769
|
// code under test
|
|
3660
3770
|
oBinding.visitSideEffects(sGroupId, aPaths, oFixture.oContext, aPromises,
|
|
3661
3771
|
oFixture.bPrefix ? "~" : undefined);
|
|
3662
3772
|
|
|
3663
|
-
assert.deepEqual(aPromises, [oPromise0, oPromise3]);
|
|
3773
|
+
assert.deepEqual(aPromises, [oPromise0, oPromise3, oPromise4]);
|
|
3664
3774
|
});
|
|
3665
3775
|
});
|
|
3666
3776
|
|
|
@@ -3784,6 +3894,7 @@ sap.ui.define([
|
|
|
3784
3894
|
|
|
3785
3895
|
this.mock(oBinding).expects("getQueryOptionsFromParameters").withExactArgs()
|
|
3786
3896
|
.returns(mQueryOptions);
|
|
3897
|
+
this.mock(_Helper).expects("clone").never();
|
|
3787
3898
|
|
|
3788
3899
|
// code under test
|
|
3789
3900
|
oPromise = oBinding.fetchResolvedQueryOptions();
|
|
@@ -3804,6 +3915,7 @@ sap.ui.define([
|
|
|
3804
3915
|
|
|
3805
3916
|
this.mock(oBinding).expects("getQueryOptionsFromParameters").withExactArgs()
|
|
3806
3917
|
.returns(mQueryOptions);
|
|
3918
|
+
this.mock(_Helper).expects("clone").never();
|
|
3807
3919
|
|
|
3808
3920
|
// code under test
|
|
3809
3921
|
oPromise = oBinding.fetchResolvedQueryOptions();
|
|
@@ -3846,8 +3958,9 @@ sap.ui.define([
|
|
|
3846
3958
|
.returns("/resolved/path");
|
|
3847
3959
|
oHelperMock.expects("getMetaPath").withExactArgs("/resolved/path")
|
|
3848
3960
|
.returns("/meta/path");
|
|
3849
|
-
|
|
3850
|
-
.withExactArgs(
|
|
3961
|
+
oHelperMock.expects("clone")
|
|
3962
|
+
.withExactArgs(sinon.match.same(mQueryOptionsFromParameters)).returns("~clone~");
|
|
3963
|
+
this.mock(Object).expects("assign").withExactArgs({}, "~clone~", {$select : []})
|
|
3851
3964
|
.returns(mResolvedQueryOptions);
|
|
3852
3965
|
oHelperMock.expects("fetchPropertyAndType")
|
|
3853
3966
|
.withExactArgs("fnFetchMetadata", "/meta/path/foo")
|