@openui5/sap.ui.core 1.116.0 → 1.117.1
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/.eslintrc.json +1 -22
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/Event.js +4 -4
- package/src/sap/base/Eventing.js +5 -6
- package/src/sap/base/config/MemoryConfigurationProvider.js +10 -1
- package/src/sap/base/config.js +3 -2
- package/src/sap/base/i18n/Formatting.js +30 -32
- package/src/sap/base/i18n/LanguageTag.js +2 -2
- package/src/sap/base/i18n/Localization.js +19 -20
- package/src/sap/base/i18n/date/CalendarType.js +1 -1
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- 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 +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +2 -4
- package/src/sap/ui/base/ManagedObjectMetadata.js +4 -6
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +2 -2
- package/src/sap/ui/core/AnimationMode.js +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/ConfigTest.js +17 -0
- package/src/sap/ui/core/Configuration.js +2 -14
- package/src/sap/ui/core/Control.js +4 -1
- package/src/sap/ui/core/ControlBehavior.js +2 -2
- package/src/sap/ui/core/Core.js +3 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +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 +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +17 -16
- 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 +5 -2
- package/src/sap/ui/core/LocaleData.js +12 -4
- 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 +1 -1
- package/src/sap/ui/core/Theming.js +16 -9
- 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 +27 -5
- package/src/sap/ui/core/_IconRegistry.js +82 -11
- 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/UI5Date.js +9 -3
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +13 -12
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- 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 +43 -41
- package/src/sap/ui/core/messagebundle_cy.properties +58 -56
- package/src/sap/ui/core/messagebundle_da.properties +56 -54
- package/src/sap/ui/core/messagebundle_de.properties +58 -56
- package/src/sap/ui/core/messagebundle_el.properties +47 -45
- package/src/sap/ui/core/messagebundle_en.properties +58 -56
- package/src/sap/ui/core/messagebundle_en_GB.properties +58 -56
- 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 +47 -45
- package/src/sap/ui/core/messagebundle_es_MX.properties +57 -55
- package/src/sap/ui/core/messagebundle_et.properties +54 -52
- 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 +58 -56
- package/src/sap/ui/core/messagebundle_it.properties +59 -57
- package/src/sap/ui/core/messagebundle_iw.properties +58 -56
- package/src/sap/ui/core/messagebundle_ja.properties +50 -48
- package/src/sap/ui/core/messagebundle_kk.properties +43 -41
- package/src/sap/ui/core/messagebundle_ko.properties +19 -17
- package/src/sap/ui/core/messagebundle_lt.properties +58 -56
- package/src/sap/ui/core/messagebundle_lv.properties +58 -56
- package/src/sap/ui/core/messagebundle_ms.properties +58 -56
- package/src/sap/ui/core/messagebundle_nl.properties +57 -55
- package/src/sap/ui/core/messagebundle_no.properties +55 -53
- package/src/sap/ui/core/messagebundle_pl.properties +55 -53
- package/src/sap/ui/core/messagebundle_pt.properties +57 -55
- package/src/sap/ui/core/messagebundle_pt_PT.properties +57 -55
- package/src/sap/ui/core/messagebundle_ro.properties +58 -56
- package/src/sap/ui/core/messagebundle_ru.properties +57 -55
- package/src/sap/ui/core/messagebundle_sh.properties +58 -56
- 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 +17 -15
- package/src/sap/ui/core/messagebundle_tr.properties +58 -56
- package/src/sap/ui/core/messagebundle_uk.properties +58 -56
- package/src/sap/ui/core/messagebundle_vi.properties +58 -56
- 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 +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/rules/Misc.support.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +7 -4
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/Icon.less +2 -2
- package/src/sap/ui/core/theming/Parameters.js +0 -5
- package/src/sap/ui/core/theming/ThemeManager.js +3 -4
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +4 -5
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/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 +2 -1
- 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 +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +2 -2
- 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 +33 -30
- package/src/sap/ui/model/odata/v4/ODataBinding.js +18 -14
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +12 -12
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +110 -43
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +20 -28
- package/src/sap/ui/model/odata/v4/ODataModel.js +40 -31
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +8 -6
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +14 -14
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +93 -9
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +25 -27
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +58 -195
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +157 -0
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +14 -5
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +27 -15
- 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/TestUtils.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/matchers/_Visitor.js +6 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +2 -5
- package/src/sap/ui/thirdparty/qunit-2.js +9 -3
- package/src/sap/ui/util/Mobile.js +10 -6
- 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 +147 -75
- package/src/ui5loader.js +320 -360
- package/test/sap/ui/core/Device.js +1 -1
- package/test/sap/ui/core/demokit/sample/OpaAction/applicationUnderTest/view/Main.view.xml +1 -0
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +2 -2
- 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/DeepCreate/Opa.qunit.js +2 -1
- 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/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_V4/Opa.qunit.js +2 -1
- 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/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/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/qunit/IconPool.qunit.js +53 -4
- package/test/sap/ui/core/qunit/ManagedObjectModel.qunit.js +43 -5
- package/test/sap/ui/core/qunit/Theming.qunit.js +19 -1
- package/test/sap/ui/core/qunit/analytics/AnalyticalBinding.qunit.js +510 -185
- package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +80 -10
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +20 -29
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +18 -1
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +15 -13
- package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +35 -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 +71 -35
- package/test/sap/ui/core/qunit/bootstrap/_checkCoreAndLibraryBooted.qunit.js +1 -1
- package/test/sap/ui/core/qunit/component/Models.qunit.js +5 -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/SettersContextReturn.qunit.js +2 -2
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +48 -13
- package/test/sap/ui/core/qunit/i18n/UI5Date.qunit.js +16 -4
- package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +73 -103
- package/test/sap/ui/core/qunit/i18n/UniversalDateUtils.qunit.js +34 -39
- 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/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/testsuite.loader.qunit.js +0 -3
- package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata.xml +2 -0
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +51 -0
- 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/ODataMetadataNoFakeService.qunit.js +68 -4
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +232 -37
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModel.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +10 -5
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +33 -1
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +5 -3
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +186 -65
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +17 -66
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +528 -60
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +48 -8
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.realOData.qunit.js +0 -3
- 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 +148 -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 +196 -404
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +201 -2
- 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 +21 -4
- 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/routing/fixture/Async1.view.xml +1 -1
- 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.theming.qunit.js +2 -2
- package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +1222 -1201
- package/test/sap/ui/core/qunit/util/Popup.qunit.js +7 -11
- 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/reflection/BaseTreeModifier.qunit.js +1 -1
- package/test/sap/ui/core/relnotes/changes-1.116.json +1 -12
- package/test/sap/ui/core/relnotes/changes-1.117.json +127 -0
- package/test/sap/ui/core/visual/images/HyphenationPlayground/windows/1600x1200/chrome/horizon/ltr/cozy/19_thirdParty_language_sl.ref.lnk +1 -1
- package/ui5.yaml +165 -0
- 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
|
@@ -81,6 +81,8 @@ sap.ui.define([
|
|
|
81
81
|
return bDrillDown ? oData.value : oData;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
function mustBeMocked() { throw new Error("Must be mocked"); }
|
|
85
|
+
|
|
84
86
|
//*********************************************************************************************
|
|
85
87
|
QUnit.module("sap.ui.model.odata.v4.ODataListBinding", {
|
|
86
88
|
beforeEach : function () {
|
|
@@ -1251,10 +1253,6 @@ sap.ui.define([
|
|
|
1251
1253
|
this.bindList("/EMPLOYEES", undefined, new Sorter("ID"), undefined,
|
|
1252
1254
|
{$$operationMode : OperationMode.Client});
|
|
1253
1255
|
}, new Error("Unsupported operation mode: Client"));
|
|
1254
|
-
assert.throws(function () {
|
|
1255
|
-
this.bindList("/EMPLOYEES", undefined, new Sorter("ID"), undefined,
|
|
1256
|
-
{$$operationMode : OperationMode.Auto});
|
|
1257
|
-
}, new Error("Unsupported operation mode: Auto"));
|
|
1258
1256
|
assert.throws(function () {
|
|
1259
1257
|
this.bindList("/EMPLOYEES", undefined, new Sorter("ID"));
|
|
1260
1258
|
}, new Error("Unsupported operation mode: undefined"));
|
|
@@ -1289,10 +1287,6 @@ sap.ui.define([
|
|
|
1289
1287
|
this.bindList("/EMPLOYEES", undefined, undefined, new Filter("ID", "eq", 42),
|
|
1290
1288
|
{$$operationMode : OperationMode.Client});
|
|
1291
1289
|
}, new Error("Unsupported operation mode: Client"));
|
|
1292
|
-
assert.throws(function () {
|
|
1293
|
-
this.bindList("/EMPLOYEES", undefined, undefined, new Filter("ID", "eq", 42),
|
|
1294
|
-
{$$operationMode : OperationMode.Auto});
|
|
1295
|
-
}, new Error("Unsupported operation mode: Auto"));
|
|
1296
1290
|
assert.throws(function () {
|
|
1297
1291
|
this.bindList("/EMPLOYEES", undefined, undefined, new Filter("ID", "eq", 42));
|
|
1298
1292
|
}, new Error("Unsupported operation mode: undefined"));
|
|
@@ -4628,8 +4622,6 @@ sap.ui.define([
|
|
|
4628
4622
|
oCreateInCachePromise1 = Promise.resolve({}),
|
|
4629
4623
|
oCreatePathPromise = SyncPromise.resolve("~"),
|
|
4630
4624
|
oError = {},
|
|
4631
|
-
oInitialData0 = {},
|
|
4632
|
-
oInitialData1 = {},
|
|
4633
4625
|
oGroupLock0 = {},
|
|
4634
4626
|
oGroupLock1 = {},
|
|
4635
4627
|
oLockGroupExpectation,
|
|
@@ -4645,8 +4637,8 @@ sap.ui.define([
|
|
|
4645
4637
|
oBindingMock.expects("fetchResourcePath").withExactArgs().returns(oCreatePathPromise);
|
|
4646
4638
|
oCreateInCacheExpectation = oBindingMock.expects("createInCache")
|
|
4647
4639
|
.withExactArgs(sinon.match.same(oGroupLock0), sinon.match.same(oCreatePathPromise),
|
|
4648
|
-
"/EMPLOYEES", sinon.match(rTransientPredicate), sinon.match.
|
|
4649
|
-
|
|
4640
|
+
"/EMPLOYEES", sinon.match(rTransientPredicate), {}, false, sinon.match.func,
|
|
4641
|
+
sinon.match.func)
|
|
4650
4642
|
.returns(SyncPromise.resolve(oCreateInCachePromise0));
|
|
4651
4643
|
oCreateInCachePromise0.then(function () {
|
|
4652
4644
|
that.mock(oContext0).expects("updateAfterCreate").withExactArgs(true, "$auto");
|
|
@@ -4654,7 +4646,7 @@ sap.ui.define([
|
|
|
4654
4646
|
this.mock(oContextPrototype).expects("fetchValue").twice().withExactArgs().resolves({});
|
|
4655
4647
|
|
|
4656
4648
|
// code under test (create first entity, skip refresh)
|
|
4657
|
-
oContext0 = oBinding.create(
|
|
4649
|
+
oContext0 = oBinding.create(null, true);
|
|
4658
4650
|
|
|
4659
4651
|
assert.strictEqual(oBinding.iCreatedContexts, 1);
|
|
4660
4652
|
assert.strictEqual(oBinding.iActiveContexts, 1);
|
|
@@ -4669,15 +4661,15 @@ sap.ui.define([
|
|
|
4669
4661
|
oBindingMock.expects("fetchResourcePath").withExactArgs().returns(oCreatePathPromise);
|
|
4670
4662
|
oBindingMock.expects("createInCache")
|
|
4671
4663
|
.withExactArgs(sinon.match.same(oGroupLock1), sinon.match.same(oCreatePathPromise),
|
|
4672
|
-
"/EMPLOYEES", sinon.match(rTransientPredicate), sinon.match.
|
|
4673
|
-
|
|
4664
|
+
"/EMPLOYEES", sinon.match(rTransientPredicate), {}, false, sinon.match.func,
|
|
4665
|
+
sinon.match.func)
|
|
4674
4666
|
.returns(SyncPromise.resolve(oCreateInCachePromise1));
|
|
4675
4667
|
oCreateInCachePromise1.then(function () {
|
|
4676
4668
|
that.mock(oContext1).expects("updateAfterCreate").withExactArgs(true, "$auto");
|
|
4677
4669
|
});
|
|
4678
4670
|
|
|
4679
4671
|
// code under test (create second entity, skip refresh)
|
|
4680
|
-
oContext1 = oBinding.create(
|
|
4672
|
+
oContext1 = oBinding.create(null, true);
|
|
4681
4673
|
|
|
4682
4674
|
assert.strictEqual(oBinding.iCreatedContexts, 2);
|
|
4683
4675
|
assert.strictEqual(oBinding.iActiveContexts, 2);
|
|
@@ -4747,7 +4739,6 @@ sap.ui.define([
|
|
|
4747
4739
|
sTitle : "create: absolute"
|
|
4748
4740
|
}, {
|
|
4749
4741
|
sGroupId : "$auto",
|
|
4750
|
-
oInitialData : {},
|
|
4751
4742
|
sTitle : "create: absolute, with initial data"
|
|
4752
4743
|
}, {
|
|
4753
4744
|
sGroupId : "deferred",
|
|
@@ -4813,6 +4804,8 @@ sap.ui.define([
|
|
|
4813
4804
|
iCurrentCreateNo = iCreateNo;
|
|
4814
4805
|
|
|
4815
4806
|
oBindingMock.expects("checkSuspended").withExactArgs();
|
|
4807
|
+
oHelperMock.expects("isDataAggregation")
|
|
4808
|
+
.withExactArgs(sinon.match.same(oBinding.mParameters)).returns(false);
|
|
4816
4809
|
oBindingMock.expects("getGroupId")
|
|
4817
4810
|
.returns(oFixture.sGroupId || "$auto");
|
|
4818
4811
|
oModelMock.expects("isApiGroup")
|
|
@@ -4830,8 +4823,8 @@ sap.ui.define([
|
|
|
4830
4823
|
oBindingMock.expects("createInCache")
|
|
4831
4824
|
.withExactArgs(sinon.match.same(oGroupLock),
|
|
4832
4825
|
sinon.match.same(oCreatePathPromise), "/EMPLOYEES",
|
|
4833
|
-
sinon.match(rTransientPredicate), sinon.match.
|
|
4834
|
-
|
|
4826
|
+
sinon.match(rTransientPredicate), {}, false, sinon.match.func,
|
|
4827
|
+
sinon.match.func)
|
|
4835
4828
|
.returns(aCreatePromises[iCurrentCreateNo]);
|
|
4836
4829
|
oContextMock.expects("fetchValue").withExactArgs().resolves({});
|
|
4837
4830
|
|
|
@@ -4882,8 +4875,8 @@ sap.ui.define([
|
|
|
4882
4875
|
oBindingMock.expects("refreshSingle").never();
|
|
4883
4876
|
|
|
4884
4877
|
// code under test
|
|
4885
|
-
aContexts.push(
|
|
4886
|
-
oFixture.bInactive, oFixture.bTransient));
|
|
4878
|
+
aContexts.push(
|
|
4879
|
+
oBinding.create(null, false, false, oFixture.bInactive, oFixture.bTransient));
|
|
4887
4880
|
|
|
4888
4881
|
checkCreatedContext();
|
|
4889
4882
|
|
|
@@ -4894,8 +4887,8 @@ sap.ui.define([
|
|
|
4894
4887
|
expect();
|
|
4895
4888
|
|
|
4896
4889
|
// code under test: 2nd create
|
|
4897
|
-
aContexts.push(
|
|
4898
|
-
oFixture.bInactive, oFixture.bTransient));
|
|
4890
|
+
aContexts.push(
|
|
4891
|
+
oBinding.create(null, false, false, oFixture.bInactive, oFixture.bTransient));
|
|
4899
4892
|
|
|
4900
4893
|
checkCreatedContext();
|
|
4901
4894
|
assert.strictEqual(aContexts[0].getIndex(), 1);
|
|
@@ -4929,20 +4922,21 @@ sap.ui.define([
|
|
|
4929
4922
|
oGroupLock0 = {},
|
|
4930
4923
|
oGroupLock1 = {},
|
|
4931
4924
|
oHelperMock = this.mock(_Helper),
|
|
4932
|
-
oInitialData = {},
|
|
4933
4925
|
sPredicate = "(ID=42)",
|
|
4934
4926
|
oRefreshedEntity = {},
|
|
4935
4927
|
that = this;
|
|
4936
4928
|
|
|
4937
4929
|
oBindingMock.expects("getUpdateGroupId").withExactArgs().returns("~update~");
|
|
4930
|
+
oHelperMock.expects("publicClone").withExactArgs("~oInitialData~", true)
|
|
4931
|
+
.returns("~publicClone~");
|
|
4938
4932
|
oBindingMock.expects("lockGroup")
|
|
4939
4933
|
.withExactArgs("~update~", true, true, sinon.match.func)
|
|
4940
4934
|
.returns(oGroupLock0);
|
|
4941
4935
|
oBindingMock.expects("fetchResourcePath").withExactArgs().returns(oCreatePathPromise);
|
|
4942
4936
|
oBindingMock.expects("createInCache")
|
|
4943
4937
|
.withExactArgs(sinon.match.same(oGroupLock0), sinon.match.same(oCreatePathPromise),
|
|
4944
|
-
"/EMPLOYEES", sinon.match(rTransientPredicate),
|
|
4945
|
-
|
|
4938
|
+
"/EMPLOYEES", sinon.match(rTransientPredicate), "~publicClone~", false,
|
|
4939
|
+
sinon.match.func, sinon.match.func)
|
|
4946
4940
|
.returns(oCreatePromise);
|
|
4947
4941
|
this.mock(oContextPrototype).expects("fetchValue").withExactArgs().resolves({});
|
|
4948
4942
|
oCreatePromise.then(function () {
|
|
@@ -4975,23 +4969,15 @@ sap.ui.define([
|
|
|
4975
4969
|
});
|
|
4976
4970
|
|
|
4977
4971
|
// code under test
|
|
4978
|
-
oContext = oBinding.create(oInitialData, oFixture.bSkipRefresh);
|
|
4972
|
+
oContext = oBinding.create("~oInitialData~", oFixture.bSkipRefresh);
|
|
4979
4973
|
|
|
4980
4974
|
return oContext.created();
|
|
4981
4975
|
});
|
|
4982
4976
|
});
|
|
4983
4977
|
|
|
4984
4978
|
//*********************************************************************************************
|
|
4985
|
-
[{
|
|
4986
|
-
|
|
4987
|
-
}, {
|
|
4988
|
-
oInitialData : {},
|
|
4989
|
-
sPredicate : "('bar')"
|
|
4990
|
-
}, {
|
|
4991
|
-
oInitialData : {}
|
|
4992
|
-
}].forEach(function (oFixture) {
|
|
4993
|
-
var sTitle = "create: relative binding, initial data: "
|
|
4994
|
-
+ JSON.stringify(oFixture.oInitialData) + ", predicate: " + oFixture.sPredicate;
|
|
4979
|
+
[undefined, "('bar')"].forEach(function (sPredicate) {
|
|
4980
|
+
var sTitle = "create: relative binding, predicate: " + sPredicate;
|
|
4995
4981
|
|
|
4996
4982
|
QUnit.test(sTitle, function (assert) {
|
|
4997
4983
|
var oBinding = this.bindList("TEAM_2_EMPLOYEES",
|
|
@@ -5019,6 +5005,8 @@ sap.ui.define([
|
|
|
5019
5005
|
.withExactArgs()
|
|
5020
5006
|
.returns(oCreatePathPromise);
|
|
5021
5007
|
oBindingMock.expects("checkSuspended").withExactArgs().twice();
|
|
5008
|
+
oHelperMock.expects("isDataAggregation")
|
|
5009
|
+
.withExactArgs(sinon.match.same(oBinding.mParameters)).returns(false);
|
|
5022
5010
|
oBindingMock.expects("getUpdateGroupId").withExactArgs().returns("~update~");
|
|
5023
5011
|
oBindingMock.expects("lockGroup")
|
|
5024
5012
|
.withExactArgs("~update~", true, true, sinon.match.func)
|
|
@@ -5026,17 +5014,17 @@ sap.ui.define([
|
|
|
5026
5014
|
oBindingMock.expects("createInCache")
|
|
5027
5015
|
.withExactArgs(sinon.match.same(oCreateGroupLock),
|
|
5028
5016
|
sinon.match.same(oCreatePathPromise), "/TEAMS/1/TEAM_2_EMPLOYEES",
|
|
5029
|
-
sinon.match(rTransientPredicate), sinon.match.
|
|
5030
|
-
|
|
5017
|
+
sinon.match(rTransientPredicate), {}, false, sinon.match.func,
|
|
5018
|
+
sinon.match.func)
|
|
5031
5019
|
.returns(oCreateInCachePromise);
|
|
5032
5020
|
oCreateInCachePromise.then(function () {
|
|
5033
5021
|
oHelperMock.expects("getPrivateAnnotation")
|
|
5034
5022
|
.withExactArgs(sinon.match.same(oCreatedEntity), "predicate")
|
|
5035
|
-
.returns(
|
|
5036
|
-
oBindingMock.expects("adjustPredicate").exactly(
|
|
5037
|
-
.withExactArgs(sinon.match(rTransientPredicate),
|
|
5023
|
+
.returns(sPredicate);
|
|
5024
|
+
oBindingMock.expects("adjustPredicate").exactly(sPredicate ? 1 : 0)
|
|
5025
|
+
.withExactArgs(sinon.match(rTransientPredicate), sPredicate,
|
|
5038
5026
|
sinon.match.same(oContext));
|
|
5039
|
-
that.mock(that.oModel).expects("checkMessages").exactly(
|
|
5027
|
+
that.mock(that.oModel).expects("checkMessages").exactly(sPredicate ? 1 : 0)
|
|
5040
5028
|
.withExactArgs();
|
|
5041
5029
|
oHelperMock.expects("getPrivateAnnotation")
|
|
5042
5030
|
.withExactArgs(sinon.match.same(oCreatedEntity), "deepCreate")
|
|
@@ -5050,7 +5038,7 @@ sap.ui.define([
|
|
|
5050
5038
|
oContextMock.expects("fetchValue").withExactArgs().resolves({});
|
|
5051
5039
|
|
|
5052
5040
|
// code under test
|
|
5053
|
-
oContext = oBinding.create(
|
|
5041
|
+
oContext = oBinding.create();
|
|
5054
5042
|
|
|
5055
5043
|
aCacheResult.unshift({/*transient element*/});
|
|
5056
5044
|
oBindingMock.expects("lockGroup").withExactArgs().returns(oFetchDataGroupLock);
|
|
@@ -5102,6 +5090,7 @@ sap.ui.define([
|
|
|
5102
5090
|
oError = new Error("suspended");
|
|
5103
5091
|
|
|
5104
5092
|
this.mock(oBinding).expects("checkSuspended").withExactArgs().throws(oError);
|
|
5093
|
+
this.mock(_Helper).expects("isDataAggregation").never();
|
|
5105
5094
|
|
|
5106
5095
|
// code under test
|
|
5107
5096
|
assert.throws(function () {
|
|
@@ -5147,7 +5136,8 @@ sap.ui.define([
|
|
|
5147
5136
|
QUnit.test("create: $$aggregation", function (assert) {
|
|
5148
5137
|
var oBinding = this.bindList("/EMPLOYEES");
|
|
5149
5138
|
|
|
5150
|
-
|
|
5139
|
+
this.mock(_Helper).expects("isDataAggregation")
|
|
5140
|
+
.withExactArgs(sinon.match.same(oBinding.mParameters)).returns(true);
|
|
5151
5141
|
|
|
5152
5142
|
assert.throws(function () {
|
|
5153
5143
|
// code under test
|
|
@@ -5163,8 +5153,7 @@ sap.ui.define([
|
|
|
5163
5153
|
oCreatePathPromise = {},
|
|
5164
5154
|
oError = new Error(),
|
|
5165
5155
|
oCreatePromise = SyncPromise.resolve(Promise.reject(oError)),
|
|
5166
|
-
oGroupLock = {unlock : function () {}}
|
|
5167
|
-
oInitialData = {};
|
|
5156
|
+
oGroupLock = {unlock : function () {}};
|
|
5168
5157
|
|
|
5169
5158
|
oBindingMock.expects("getUpdateGroupId").withExactArgs().returns("~update~");
|
|
5170
5159
|
oBindingMock.expects("lockGroup").withExactArgs("~update~", true, true, sinon.match.func)
|
|
@@ -5172,8 +5161,8 @@ sap.ui.define([
|
|
|
5172
5161
|
oBindingMock.expects("fetchResourcePath").withExactArgs().returns(oCreatePathPromise);
|
|
5173
5162
|
oBindingMock.expects("createInCache")
|
|
5174
5163
|
.withExactArgs(sinon.match.same(oGroupLock), sinon.match.same(oCreatePathPromise),
|
|
5175
|
-
"/EMPLOYEES", sinon.match(rTransientPredicate), sinon.match.
|
|
5176
|
-
|
|
5164
|
+
"/EMPLOYEES", sinon.match(rTransientPredicate), {}, false, sinon.match.func,
|
|
5165
|
+
sinon.match.func)
|
|
5177
5166
|
.returns(oCreatePromise);
|
|
5178
5167
|
this.mock(oContextPrototype).expects("fetchValue").withExactArgs().resolves({});
|
|
5179
5168
|
|
|
@@ -5181,7 +5170,7 @@ sap.ui.define([
|
|
|
5181
5170
|
this.mock(oGroupLock).expects("unlock").withExactArgs(true);
|
|
5182
5171
|
|
|
5183
5172
|
// code under test
|
|
5184
|
-
oContext = oBinding.create(
|
|
5173
|
+
oContext = oBinding.create();
|
|
5185
5174
|
|
|
5186
5175
|
return oContext.created().then(function () {
|
|
5187
5176
|
assert.ok(false);
|
|
@@ -5253,7 +5242,7 @@ sap.ui.define([
|
|
|
5253
5242
|
.returns(oGroupLock);
|
|
5254
5243
|
oBindingMock.expects("createInCache")
|
|
5255
5244
|
.withExactArgs(sinon.match.same(oGroupLock), oCreatePathMatcher, "/EMPLOYEES",
|
|
5256
|
-
sinon.match(rTransientPredicate),
|
|
5245
|
+
sinon.match(rTransientPredicate), {},
|
|
5257
5246
|
sinon.match(function (bAtEndOfCreated) {
|
|
5258
5247
|
return bAtEndOfCreated === (oBinding.bFirstCreateAtEnd !== !!aAtEnd[0]);
|
|
5259
5248
|
}), sinon.match.func, sinon.match.func)
|
|
@@ -5303,7 +5292,7 @@ sap.ui.define([
|
|
|
5303
5292
|
oBindingMock.expects("createInCache")
|
|
5304
5293
|
.withExactArgs(sinon.match.same(oGroupLock),
|
|
5305
5294
|
oCreatePathMatcher, "/EMPLOYEES",
|
|
5306
|
-
sinon.match(rTransientPredicate),
|
|
5295
|
+
sinon.match(rTransientPredicate), {},
|
|
5307
5296
|
sinon.match(function (bAtEndOfCreated) {
|
|
5308
5297
|
return bAtEndOfCreated
|
|
5309
5298
|
=== (oBinding.bFirstCreateAtEnd !== !!aAtEnd[1]);
|
|
@@ -5395,8 +5384,7 @@ sap.ui.define([
|
|
|
5395
5384
|
.returns(oGroupLock);
|
|
5396
5385
|
oBindingMock.expects("createInCache")
|
|
5397
5386
|
.withExactArgs(sinon.match.same(oGroupLock), oCreatePathMatcher, "/EMPLOYEES",
|
|
5398
|
-
sinon.match(rTransientPredicate),
|
|
5399
|
-
false, sinon.match.func, sinon.match.func)
|
|
5387
|
+
sinon.match(rTransientPredicate), {}, false, sinon.match.func, sinon.match.func)
|
|
5400
5388
|
.returns(SyncPromise.resolve(Promise.resolve({})));
|
|
5401
5389
|
this.mock(Context).expects("create")
|
|
5402
5390
|
.withExactArgs(sinon.match.same(oBinding.oModel),
|
|
@@ -5489,6 +5477,119 @@ sap.ui.define([
|
|
|
5489
5477
|
]);
|
|
5490
5478
|
});
|
|
5491
5479
|
|
|
5480
|
+
//*********************************************************************************************
|
|
5481
|
+
QUnit.test("create: recursive hierarchy, restrictions not met", function (assert) {
|
|
5482
|
+
var oBinding = this.bindList("/EMPLOYEES");
|
|
5483
|
+
|
|
5484
|
+
// Note: autoExpandSelect at model would be required for hierarchyQualifier, but that leads
|
|
5485
|
+
// too far :-(
|
|
5486
|
+
oBinding.mParameters.$$aggregation = {hierarchyQualifier : "X"};
|
|
5487
|
+
|
|
5488
|
+
assert.throws(function () {
|
|
5489
|
+
// code under test
|
|
5490
|
+
oBinding.create();
|
|
5491
|
+
}, new Error("Missing bSkipRefresh"));
|
|
5492
|
+
|
|
5493
|
+
assert.throws(function () {
|
|
5494
|
+
// code under test
|
|
5495
|
+
oBinding.create(null, true, false);
|
|
5496
|
+
}, new Error("Only the parameters oInitialData and bSkipRefresh are supported"));
|
|
5497
|
+
|
|
5498
|
+
assert.throws(function () {
|
|
5499
|
+
// code under test
|
|
5500
|
+
oBinding.create(null, true, undefined, undefined);
|
|
5501
|
+
}, new Error("Only the parameters oInitialData and bSkipRefresh are supported"));
|
|
5502
|
+
|
|
5503
|
+
assert.throws(function () {
|
|
5504
|
+
// code under test
|
|
5505
|
+
oBinding.create({"@$ui5.node.parent" : oBinding.getHeaderContext()}, true);
|
|
5506
|
+
}, new Error("Invalid parent context: /EMPLOYEES"));
|
|
5507
|
+
|
|
5508
|
+
const oParentContext = {
|
|
5509
|
+
isExpanded : mustBeMocked,
|
|
5510
|
+
toString : function () { return "~toString~"; } // cannot be mocked?
|
|
5511
|
+
};
|
|
5512
|
+
this.mock(oParentContext).expects("isExpanded").withExactArgs().returns(false);
|
|
5513
|
+
oBinding.aContexts.push(oParentContext);
|
|
5514
|
+
|
|
5515
|
+
assert.throws(function () {
|
|
5516
|
+
// code under test
|
|
5517
|
+
oBinding.create({"@$ui5.node.parent" : oParentContext}, true);
|
|
5518
|
+
}, new Error("Unsupported collapsed parent: ~toString~"));
|
|
5519
|
+
|
|
5520
|
+
oBinding.mParameters.$$aggregation = {expandTo : 2, hierarchyQualifier : "X"};
|
|
5521
|
+
|
|
5522
|
+
assert.throws(function () {
|
|
5523
|
+
// code under test
|
|
5524
|
+
oBinding.create();
|
|
5525
|
+
}, new Error("Unsupported $$aggregation.expandTo: 2"));
|
|
5526
|
+
});
|
|
5527
|
+
|
|
5528
|
+
//*********************************************************************************************
|
|
5529
|
+
[undefined, true].forEach(function (bExpanded) {
|
|
5530
|
+
QUnit.test("create: recursive hierarchy, parent expanded : " + bExpanded, function (assert) {
|
|
5531
|
+
const oBinding = this.bindList("/EMPLOYEES");
|
|
5532
|
+
// Note: autoExpandSelect at model would be required for hierarchyQualifier, but that leads
|
|
5533
|
+
// too far :-(
|
|
5534
|
+
oBinding.mParameters.$$aggregation = {hierarchyQualifier : "X"};
|
|
5535
|
+
oBinding.iMaxLength = 42;
|
|
5536
|
+
this.mock(oBinding).expects("fetchResourcePath").withExactArgs()
|
|
5537
|
+
.returns("~oCreatePathPromise~");
|
|
5538
|
+
this.mock(oBinding).expects("getUpdateGroupId").withExactArgs()
|
|
5539
|
+
.returns("~sGroupId~");
|
|
5540
|
+
this.mock(oBinding).expects("getResolvedPath").withExactArgs()
|
|
5541
|
+
.returns("~sResolvedPath~");
|
|
5542
|
+
this.mock(_Helper).expects("uid").withExactArgs().returns("id-1-23");
|
|
5543
|
+
this.mock(oBinding).expects("checkSuspended").withExactArgs();
|
|
5544
|
+
this.mock(_Helper).expects("isDataAggregation")
|
|
5545
|
+
.withExactArgs(sinon.match.same(oBinding.mParameters)).returns(false);
|
|
5546
|
+
this.mock(oBinding).expects("isTransient").twice().withExactArgs().returns(false);
|
|
5547
|
+
this.mock(oBinding).expects("checkDeepCreate").never();
|
|
5548
|
+
this.mock(oBinding).expects("isRelative").never();
|
|
5549
|
+
const oParentContext = {
|
|
5550
|
+
getCanonicalPath : mustBeMocked,
|
|
5551
|
+
isExpanded : mustBeMocked
|
|
5552
|
+
};
|
|
5553
|
+
oBinding.aContexts.push("0", "1", oParentContext, {iIndex : 3}, undefined, {iIndex : 5});
|
|
5554
|
+
const oInitialData = {"@$ui5.node.parent" : oParentContext};
|
|
5555
|
+
const oEntityData = {};
|
|
5556
|
+
this.mock(_Helper).expects("publicClone")
|
|
5557
|
+
.withExactArgs(sinon.match.same(oInitialData), true).returns(oEntityData);
|
|
5558
|
+
this.mock(oParentContext).expects("getCanonicalPath").withExactArgs()
|
|
5559
|
+
.returns("/canonical/path");
|
|
5560
|
+
this.mock(oParentContext).expects("isExpanded").withExactArgs().returns(bExpanded);
|
|
5561
|
+
this.mock(oBinding).expects("lockGroup")
|
|
5562
|
+
.withExactArgs("~sGroupId~", true, true, sinon.match.func).returns("~oGroupLock~");
|
|
5563
|
+
this.mock(oBinding).expects("createInCache")
|
|
5564
|
+
.withExactArgs("~oGroupLock~", "~oCreatePathPromise~", "~sResolvedPath~",
|
|
5565
|
+
sinon.match(rTransientPredicate),
|
|
5566
|
+
sinon.match.same(oEntityData)
|
|
5567
|
+
.and(sinon.match({"@$ui5.node.parent" : "canonical/path"})),
|
|
5568
|
+
false, sinon.match.func, sinon.match.func)
|
|
5569
|
+
.returns(SyncPromise.resolve(Promise.resolve("~oCreatedEntity~")));
|
|
5570
|
+
const oContext = {fetchValue : mustBeMocked};
|
|
5571
|
+
this.mock(Context).expects("create")
|
|
5572
|
+
.withExactArgs(sinon.match.same(this.oModel), sinon.match.same(oBinding),
|
|
5573
|
+
"~sResolvedPath~($uid=id-1-23)", /*iChildIndex*/3,
|
|
5574
|
+
sinon.match.instanceOf(SyncPromise), undefined)
|
|
5575
|
+
.returns(oContext);
|
|
5576
|
+
this.mock(oContext).expects("fetchValue").withExactArgs()
|
|
5577
|
+
.returns(SyncPromise.resolve()); //TODO
|
|
5578
|
+
this.mock(oBinding).expects("_fireChange")
|
|
5579
|
+
.withExactArgs({reason : ChangeReason.Add});
|
|
5580
|
+
|
|
5581
|
+
// code under test
|
|
5582
|
+
assert.strictEqual(oBinding.create(oInitialData, true), oContext);
|
|
5583
|
+
|
|
5584
|
+
assert.strictEqual(oBinding.iActiveContexts, 0, "unchanged");
|
|
5585
|
+
assert.strictEqual(oBinding.iCreatedContexts, 0, "unchanged");
|
|
5586
|
+
assert.strictEqual(oBinding.bFirstCreateAtEnd, false);
|
|
5587
|
+
assert.strictEqual(oBinding.iMaxLength, 43);
|
|
5588
|
+
assert.deepEqual(oBinding.aContexts,
|
|
5589
|
+
["0", "1", oParentContext, oContext, {iIndex : 4}, undefined, {iIndex : 6}]);
|
|
5590
|
+
});
|
|
5591
|
+
});
|
|
5592
|
+
|
|
5492
5593
|
//*********************************************************************************************
|
|
5493
5594
|
QUnit.test("create and delete with bAtEnd varying", function () {
|
|
5494
5595
|
var oBinding = this.bindList("/EMPLOYEES"),
|
|
@@ -6514,15 +6615,15 @@ sap.ui.define([
|
|
|
6514
6615
|
|
|
6515
6616
|
QUnit.test(sTitle, function (assert) {
|
|
6516
6617
|
var oAggregationCache = {
|
|
6517
|
-
addKeptElement :
|
|
6618
|
+
addKeptElement : mustBeMocked
|
|
6518
6619
|
},
|
|
6519
6620
|
oAggregationCacheMock = this.mock(oAggregationCache),
|
|
6520
6621
|
oBinding = this.bindList("/EMPLOYEES"),
|
|
6521
6622
|
oBindingMock = this.mock(oBinding),
|
|
6522
6623
|
oCache = { // #setLateQueryOptions must not be called
|
|
6523
|
-
getValue :
|
|
6624
|
+
getValue : mustBeMocked,
|
|
6524
6625
|
registerChangeListener : function () {},
|
|
6525
|
-
setActive :
|
|
6626
|
+
setActive : mustBeMocked
|
|
6526
6627
|
},
|
|
6527
6628
|
oCacheMock = this.mock(oCache),
|
|
6528
6629
|
oGetExpectation,
|
|
@@ -7784,6 +7885,9 @@ sap.ui.define([
|
|
|
7784
7885
|
sGroupId = "group";
|
|
7785
7886
|
|
|
7786
7887
|
oBinding.iCurrentEnd = 42;
|
|
7888
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
7889
|
+
.returns(false);
|
|
7890
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
7787
7891
|
oCacheMock.expects("isDeletingInOtherGroup").withExactArgs(sGroupId).returns(false);
|
|
7788
7892
|
oCacheMock.expects("getPendingRequestsPromise").withExactArgs().returns(null);
|
|
7789
7893
|
|
|
@@ -7810,6 +7914,9 @@ sap.ui.define([
|
|
|
7810
7914
|
sGroupId = "group",
|
|
7811
7915
|
oGroupLock = {};
|
|
7812
7916
|
|
|
7917
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
7918
|
+
.returns(false);
|
|
7919
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
7813
7920
|
oCacheMock.expects("isDeletingInOtherGroup").never();
|
|
7814
7921
|
oCacheMock.expects("getPendingRequestsPromise").withExactArgs().returns(null);
|
|
7815
7922
|
this.mock(oBinding).expects("lockGroup").withExactArgs(sGroupId).returns(oGroupLock);
|
|
@@ -7834,6 +7941,9 @@ sap.ui.define([
|
|
|
7834
7941
|
oBinding = bindList(this, "/Set"),
|
|
7835
7942
|
oContext = bHeader ? oBinding.getHeaderContext() : undefined;
|
|
7836
7943
|
|
|
7944
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
7945
|
+
.returns(false);
|
|
7946
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
7837
7947
|
oCacheMock.expects("isDeletingInOtherGroup").withExactArgs("group").returns(true);
|
|
7838
7948
|
oCacheMock.expects("getPendingRequestsPromise").never();
|
|
7839
7949
|
oCacheMock.expects("requestSideEffects").never();
|
|
@@ -7857,6 +7967,9 @@ sap.ui.define([
|
|
|
7857
7967
|
}),
|
|
7858
7968
|
oPromise;
|
|
7859
7969
|
|
|
7970
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
7971
|
+
.returns(false);
|
|
7972
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
7860
7973
|
oCacheMock.expects("isDeletingInOtherGroup").never();
|
|
7861
7974
|
oCacheMock.expects("getPendingRequestsPromise").twice().withExactArgs()
|
|
7862
7975
|
.returns(oPendingRequestsPromise);
|
|
@@ -7952,6 +8065,9 @@ sap.ui.define([
|
|
|
7952
8065
|
oCanceledError.canceled = true;
|
|
7953
8066
|
oBinding.iCurrentEnd = 6;
|
|
7954
8067
|
|
|
8068
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
8069
|
+
.returns(false);
|
|
8070
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
7955
8071
|
oCacheMock.expects("isDeletingInOtherGroup").exactly(bHeader && bHasCache ? 1 : 0)
|
|
7956
8072
|
.withExactArgs(sGroupId).returns(false);
|
|
7957
8073
|
oCacheMock.expects("getPendingRequestsPromise").exactly(bHasCache ? 1 : 0).withExactArgs()
|
|
@@ -8007,6 +8123,9 @@ sap.ui.define([
|
|
|
8007
8123
|
sGroupId = "group";
|
|
8008
8124
|
|
|
8009
8125
|
oBinding.iCurrentEnd = 8;
|
|
8126
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
8127
|
+
.returns(false);
|
|
8128
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
8010
8129
|
oCacheMock.expects("isDeletingInOtherGroup").withExactArgs(sGroupId).returns(false);
|
|
8011
8130
|
oCacheMock.expects("getPendingRequestsPromise").withExactArgs().returns(null);
|
|
8012
8131
|
this.mock(oBinding).expects("keepOnlyVisibleContexts").withExactArgs()
|
|
@@ -8034,6 +8153,9 @@ sap.ui.define([
|
|
|
8034
8153
|
var oCacheMock = this.getCacheMock(), // must be called before creating the binding
|
|
8035
8154
|
oBinding = bindList(this, "/Set");
|
|
8036
8155
|
|
|
8156
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
8157
|
+
.returns(false);
|
|
8158
|
+
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
8037
8159
|
oCacheMock.expects("isDeletingInOtherGroup").withExactArgs("group").returns(false);
|
|
8038
8160
|
oCacheMock.expects("getPendingRequestsPromise").withExactArgs().returns(null);
|
|
8039
8161
|
this.mock(oBinding).expects("lockGroup").never();
|
|
@@ -8055,15 +8177,15 @@ sap.ui.define([
|
|
|
8055
8177
|
+ bHeaderContext;
|
|
8056
8178
|
|
|
8057
8179
|
QUnit.test(sTitle, function (assert) {
|
|
8058
|
-
var oBinding = this.bindList("/Set",
|
|
8059
|
-
$$aggregation : {} // Note: no hierarchyQualifier!
|
|
8060
|
-
}),
|
|
8180
|
+
var oBinding = this.bindList("/Set"),
|
|
8061
8181
|
oContext = bHeaderContext ? oBinding.getHeaderContext() : undefined,
|
|
8062
8182
|
aFilters = [],
|
|
8063
8183
|
aPaths = [],
|
|
8064
8184
|
oPromise,
|
|
8065
8185
|
oRefreshPromise = {};
|
|
8066
8186
|
|
|
8187
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
8188
|
+
.returns(true);
|
|
8067
8189
|
this.mock(oBinding.oCache).expects("requestSideEffects").never();
|
|
8068
8190
|
this.mock(oBinding.aFilters).expects("concat").withExactArgs(oBinding.aApplicationFilters)
|
|
8069
8191
|
.returns(aFilters);
|
|
@@ -8089,10 +8211,10 @@ sap.ui.define([
|
|
|
8089
8211
|
|
|
8090
8212
|
//*********************************************************************************************
|
|
8091
8213
|
QUnit.test("requestSideEffects with $$aggregation and row context", function (assert) {
|
|
8092
|
-
var oBinding = this.bindList("/Set"
|
|
8093
|
-
$$aggregation : {} // Note: no hierarchyQualifier!
|
|
8094
|
-
});
|
|
8214
|
+
var oBinding = this.bindList("/Set");
|
|
8095
8215
|
|
|
8216
|
+
this.mock(_Helper).expects("isDataAggregation").withExactArgs(oBinding.mParameters)
|
|
8217
|
+
.returns(true);
|
|
8096
8218
|
this.mock(oBinding.oCache).expects("requestSideEffects").never();
|
|
8097
8219
|
this.mock(oBinding).expects("refreshInternal").never();
|
|
8098
8220
|
this.mock(_AggregationHelper).expects("isAffected").never();
|
|
@@ -8100,8 +8222,7 @@ sap.ui.define([
|
|
|
8100
8222
|
assert.throws(function () {
|
|
8101
8223
|
// code under test
|
|
8102
8224
|
oBinding.requestSideEffects("group", [/*aPaths*/], {/*oContext*/});
|
|
8103
|
-
}, new Error(
|
|
8104
|
-
"Must not request side effects for a context of a binding with $$aggregation"));
|
|
8225
|
+
}, new Error("Must not request side effects when using data aggregation"));
|
|
8105
8226
|
});
|
|
8106
8227
|
|
|
8107
8228
|
//*********************************************************************************************
|
|
@@ -3264,15 +3264,6 @@ sap.ui.define([
|
|
|
3264
3264
|
entityType : "tea_busi.TEAM",
|
|
3265
3265
|
predicate : "(~1)"
|
|
3266
3266
|
}]
|
|
3267
|
-
}, { // simple entity in transient context
|
|
3268
|
-
dataPath : "/TEAMS($uid=id-1-23)",
|
|
3269
|
-
canonicalUrl : "/TEAMS(~1)",
|
|
3270
|
-
requests : [{
|
|
3271
|
-
entityType : "tea_busi.TEAM",
|
|
3272
|
-
// TODO a transient entity does not necessarily have all key properties, but this is
|
|
3273
|
-
// required to create a dependent cache
|
|
3274
|
-
predicate : "(~1)"
|
|
3275
|
-
}]
|
|
3276
3267
|
}, { // simple entity by key predicate
|
|
3277
3268
|
dataPath : "/TEAMS('4%3D2')",
|
|
3278
3269
|
canonicalUrl : "/TEAMS('4%3D2')",
|
|
@@ -3498,40 +3489,15 @@ sap.ui.define([
|
|
|
3498
3489
|
}, { // entity set w/o navigation property bindings
|
|
3499
3490
|
path : "/ServiceGroups('42')/DefaultSystem|SystemAlias",
|
|
3500
3491
|
editUrl : "ServiceGroups('42')/DefaultSystem"
|
|
3501
|
-
}, { // transient predicate
|
|
3502
|
-
path : "/TEAMS($uid=id-1-23)|",
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
editUrl :
|
|
3507
|
-
}, { //
|
|
3508
|
-
path : "/TEAMS($uid=id-1-
|
|
3509
|
-
|
|
3510
|
-
"/TEAMS($uid=id-1-23)" : "tea_busi.TEAM",
|
|
3511
|
-
"/TEAMS($uid=id-1-23)/TEAM_2_CONTAINED_C($uid=id-1-24)"
|
|
3512
|
-
: "tea_busi.ContainedC"
|
|
3513
|
-
},
|
|
3514
|
-
editUrl : "TEAMS(~0)/TEAM_2_CONTAINED_C(~1)"
|
|
3515
|
-
}, { // navigation from contained to root entity, resolved via navigation property binding path
|
|
3516
|
-
// via transient predicate
|
|
3517
|
-
path : "/TEAMS($uid=id-1-23)/TEAM_2_CONTAINED_S/S_2_EMPLOYEE|ID",
|
|
3518
|
-
fetchPredicates : {
|
|
3519
|
-
"/TEAMS($uid=id-1-23)/TEAM_2_CONTAINED_S/S_2_EMPLOYEE" : "tea_busi.Worker"
|
|
3520
|
-
},
|
|
3521
|
-
editUrl : "EMPLOYEES(~0)"
|
|
3522
|
-
}, { // decode entity set initially, with transient predicate
|
|
3523
|
-
path : "/T%E2%82%ACAMS($uid=id-1-23)|Name",
|
|
3524
|
-
fetchPredicates : {
|
|
3525
|
-
"/T%E2%82%ACAMS($uid=id-1-23)" : "tea_busi.TEAM"
|
|
3526
|
-
},
|
|
3527
|
-
editUrl : "T%E2%82%ACAMS(~0)"
|
|
3528
|
-
}, { // multiple navigation to root entity via transient predicates
|
|
3529
|
-
path : "/T%E2%82%ACAMS($uid=id-1-23)/TEAM_2_EMPLOYEES($uid=id-2)/EMPLOYEE_2_TEAM|Name",
|
|
3530
|
-
fetchPredicates : {
|
|
3531
|
-
"/T%E2%82%ACAMS($uid=id-1-23)/TEAM_2_EMPLOYEES($uid=id-2)/EMPLOYEE_2_TEAM"
|
|
3532
|
-
: "tea_busi.TEAM"
|
|
3533
|
-
},
|
|
3534
|
-
editUrl : "T%E2%82%ACAMS(~0)"
|
|
3492
|
+
}, { // transient predicate at entity set
|
|
3493
|
+
path : "/TEAMS($uid=id-1-23)|TEAM_2_MANAGER/ID",
|
|
3494
|
+
editUrl : undefined
|
|
3495
|
+
}, { // transient predicate at navigation property
|
|
3496
|
+
path : "/TEAMS('1')/TEAM_2_EMPLOYEES($uid=id-1-23)|EMPLOYEE_2_CONTAINED_S/Id",
|
|
3497
|
+
editUrl : undefined
|
|
3498
|
+
}, { // transient predicate at transient navigation property
|
|
3499
|
+
path : "/TEAMS($uid=id-1-42)/TEAM_2_EMPLOYEES($uid=id-1-23)|EMPLOYEE_2_CONTAINED_S/Id",
|
|
3500
|
+
editUrl : undefined
|
|
3535
3501
|
}, { // instance annotation
|
|
3536
3502
|
path : "/TEAMS/0|Name@my.annotation",
|
|
3537
3503
|
fetchPredicates : {
|
|
@@ -3597,27 +3563,6 @@ sap.ui.define([
|
|
|
3597
3563
|
// "com.sap.gateway.default.iwbep.tea_busi_product.v0001.Container/Products(...)"?
|
|
3598
3564
|
//TODO type casts, operations?
|
|
3599
3565
|
|
|
3600
|
-
//*********************************************************************************************
|
|
3601
|
-
QUnit.test("fetchUpdateData: transient entity", function (assert) {
|
|
3602
|
-
var oContext = Context.create(this.oModel, undefined, "/TEAMS($uid=id-1-23)");
|
|
3603
|
-
|
|
3604
|
-
this.oMetaModelMock.expects("fetchEntityContainer").twice()
|
|
3605
|
-
.returns(SyncPromise.resolve(mScope));
|
|
3606
|
-
// Note: we try to "calculate key predicate" because context path alone is no indication
|
|
3607
|
-
// that entity is still transient!
|
|
3608
|
-
this.mock(oContext).expects("fetchValue").withExactArgs("/TEAMS($uid=id-1-23)")
|
|
3609
|
-
.returns(SyncPromise.resolve({"@$ui5.context.isTransient" : true}));
|
|
3610
|
-
|
|
3611
|
-
// code under test
|
|
3612
|
-
return this.oMetaModel.fetchUpdateData("Name", oContext).then(function (oResult) {
|
|
3613
|
-
assert.deepEqual(oResult, {
|
|
3614
|
-
editUrl : undefined,
|
|
3615
|
-
entityPath : "/TEAMS($uid=id-1-23)",
|
|
3616
|
-
propertyPath : "Name"
|
|
3617
|
-
});
|
|
3618
|
-
});
|
|
3619
|
-
});
|
|
3620
|
-
|
|
3621
3566
|
//*********************************************************************************************
|
|
3622
3567
|
QUnit.test("fetchUpdateData: bNoEditUrl", function (assert) {
|
|
3623
3568
|
var oContext = Context.create(this.oModel, undefined, "/TEAMS('42')");
|
|
@@ -4488,6 +4433,12 @@ sap.ui.define([
|
|
|
4488
4433
|
assert.throws(function () {
|
|
4489
4434
|
this.oMetaModel.attachRequestSent();
|
|
4490
4435
|
}, new Error("Unsupported event 'requestSent': v4.ODataMetaModel#attachEvent"));
|
|
4436
|
+
|
|
4437
|
+
this.mock(MetaModel.prototype).expects("attachEvent").on(this.oMetaModel)
|
|
4438
|
+
.withExactArgs("messageChange", "~oData~", "~fnFunction~", "~oListener~");
|
|
4439
|
+
|
|
4440
|
+
// code under test
|
|
4441
|
+
this.oMetaModel.attachEvent("messageChange", "~oData~", "~fnFunction~", "~oListener~");
|
|
4491
4442
|
});
|
|
4492
4443
|
|
|
4493
4444
|
//*********************************************************************************************
|
|
@@ -5245,7 +5196,7 @@ sap.ui.define([
|
|
|
5245
5196
|
// Note: "ab-CD" is derived from Configuration#getLanguageTag here, not from mHeaders!
|
|
5246
5197
|
this.mock(_MetadataRequestor).expects("create")
|
|
5247
5198
|
.withExactArgs({"Accept-Language" : "ab-CD"}, "4.0", undefined,
|
|
5248
|
-
{"sap-language" : "~sLanguage~"});
|
|
5199
|
+
{"sap-language" : "~sLanguage~"}, undefined);
|
|
5249
5200
|
|
|
5250
5201
|
// code under test
|
|
5251
5202
|
oSharedModel = oMetaModel.getOrCreateSharedModel("../ValueListService/$metadata",
|
|
@@ -5286,7 +5237,7 @@ sap.ui.define([
|
|
|
5286
5237
|
.withArgs(false + "/Foo1/ValueListService/").callThrough();
|
|
5287
5238
|
// observe metadataUrlParams NOT being passed along
|
|
5288
5239
|
this.mock(_MetadataRequestor).expects("create")
|
|
5289
|
-
.withExactArgs({"Accept-Language" : "ab-CD"}, "4.0", undefined, {});
|
|
5240
|
+
.withExactArgs({"Accept-Language" : "ab-CD"}, "4.0", undefined, {}, undefined);
|
|
5290
5241
|
|
|
5291
5242
|
// code under test
|
|
5292
5243
|
oSharedModel = oMetaModel.getOrCreateSharedModel("../ValueListService/$metadata",
|