@openui5/sap.ui.core 1.120.1 → 1.120.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/BindingParser.js +4 -4
- package/src/sap/ui/base/DataType.js +5 -5
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +9 -9
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/ManagedObjectRegistry.js +186 -169
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +3 -3
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +30 -144
- package/src/sap/ui/core/ComponentContainer.js +3 -3
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentRegistry.js +153 -0
- package/src/sap/ui/core/ComponentSupport.js +3 -3
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/Control.js +6 -4
- package/src/sap/ui/core/Core.js +6 -4
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +25 -141
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/ElementRegistry.js +159 -0
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +5 -5
- package/src/sap/ui/core/FocusHandler.js +3 -2
- package/src/sap/ui/core/Fragment.js +5 -5
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +7 -7
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +55 -11
- package/src/sap/ui/core/Manifest.js +4 -5
- package/src/sap/ui/core/Message.js +2 -1
- package/src/sap/ui/core/Messaging.js +2 -2
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Shortcut.js +15 -9
- package/src/sap/ui/core/StaticArea.js +4 -1
- package/src/sap/ui/core/Theming.js +3 -3
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +51 -13
- package/src/sap/ui/core/UIAreaRegistry.js +150 -0
- package/src/sap/ui/core/UIComponent.js +3 -3
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +95 -76
- package/src/sap/ui/core/cldr/Unicode-Data-Files-LICENSE.txt +1 -1
- package/src/sap/ui/core/cldr/cy.json +12 -3
- package/src/sap/ui/core/cldr/en_AU.json +48 -12
- package/src/sap/ui/core/cldr/en_GB.json +24 -6
- package/src/sap/ui/core/cldr/en_HK.json +24 -6
- package/src/sap/ui/core/cldr/en_IE.json +24 -6
- package/src/sap/ui/core/cldr/en_IN.json +24 -6
- package/src/sap/ui/core/cldr/en_NZ.json +24 -6
- package/src/sap/ui/core/cldr/en_PG.json +24 -6
- package/src/sap/ui/core/cldr/en_SG.json +24 -6
- package/src/sap/ui/core/cldr/en_ZA.json +24 -6
- package/src/sap/ui/core/cldr/es.json +288 -72
- package/src/sap/ui/core/cldr/es_AR.json +288 -72
- package/src/sap/ui/core/cldr/es_BO.json +288 -72
- package/src/sap/ui/core/cldr/es_CL.json +144 -36
- package/src/sap/ui/core/cldr/es_CO.json +144 -36
- package/src/sap/ui/core/cldr/es_MX.json +288 -72
- package/src/sap/ui/core/cldr/fa.json +48 -12
- package/src/sap/ui/core/cldr/id.json +56 -14
- package/src/sap/ui/core/cldr/kk.json +184 -46
- package/src/sap/ui/core/cldr/ms.json +56 -14
- package/src/sap/ui/core/cldr/nb.json +36 -9
- package/src/sap/ui/core/cldr/nl.json +264 -66
- package/src/sap/ui/core/cldr/nl_BE.json +264 -66
- package/src/sap/ui/core/cldr/pt.json +288 -72
- package/src/sap/ui/core/cldr/pt_PT.json +288 -72
- package/src/sap/ui/core/cldr/sr.json +96 -24
- package/src/sap/ui/core/cldr/sr_Latn.json +72 -18
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +25 -13
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +9 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +7 -7
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/message/MessageType.js +1 -1
- package/src/sap/ui/core/mvc/Controller.js +15 -13
- package/src/sap/ui/core/mvc/ControllerExtension.js +7 -5
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +1 -1
- package/src/sap/ui/core/mvc/ControllerMetadata.js +1 -1
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +4 -4
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +20 -9
- package/src/sap/ui/core/mvc/XMLView.js +8 -2
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/History.js +1 -1
- package/src/sap/ui/core/routing/Route.js +6 -6
- package/src/sap/ui/core/routing/Router.js +6 -6
- package/src/sap/ui/core/routing/Targets.js +3 -3
- package/src/sap/ui/core/routing/async/Target.js +2 -2
- package/src/sap/ui/core/routing/async/Targets.js +1 -1
- package/src/sap/ui/core/rules/Misc.support.js +3 -3
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +6 -4
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/theming/Parameters.js +7 -7
- package/src/sap/ui/core/theming/ThemeHelper.js +2 -2
- package/src/sap/ui/core/theming/ThemeManager.js +2 -2
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +34 -3
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/Binding.js +2 -2
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +5 -5
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +10 -10
- package/src/sap/ui/model/FilterProcessor.js +8 -5
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +2 -2
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +6 -6
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +3 -3
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +4 -4
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +32 -27
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +198 -155
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +9 -4
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +9 -6
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +220 -85
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +33 -20
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +70 -18
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +9 -5
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +5 -5
- package/src/sap/ui/test/BranchTracking.js +4 -0
- package/src/sap/ui/test/actions/EnterText.js +1 -5
- package/src/sap/ui/test/generic/GenericTestCollection.js +1 -0
- package/src/sap/ui/test/generic/TestBase.js +4 -4
- package/src/sap/ui/test/generic/Utils.js +3 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +23 -15
- package/src/ui5loader.js +9 -4
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/common/Controller.js +0 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.controller.js +14 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.view.xml +6 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/MIT.MultipleInlineCreationRowsGrid.html +5 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.view.xml +9 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +23 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +58 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.controller.js +75 -30
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +19 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +84 -28
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/data/metadata.xml +3 -3
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/qunit/BindingParser.qunit.js +4 -4
- package/test/sap/ui/core/qunit/CommandExecution.qunit.js +3 -1
- package/test/sap/ui/core/qunit/Core.qunit.js +1 -1
- package/test/sap/ui/core/qunit/DataBinding.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Declarative.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Element_base.qunit.js +8 -7
- package/test/sap/ui/core/qunit/Element_base_legacyAPIs.qunit.js +48 -0
- package/test/sap/ui/core/qunit/Element_closestTo.qunit.js +1 -1
- package/test/sap/ui/core/qunit/Fragment.qunit.js +63 -13
- package/test/sap/ui/core/qunit/HTML.qunit.js +5 -5
- package/test/sap/ui/core/qunit/Lib.qunit.js +19 -2
- package/test/sap/ui/core/qunit/PlaceAt.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Shortcut.qunit.js +9 -1
- package/test/sap/ui/core/qunit/UIArea.qunit.js +7 -6
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +41 -0
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.html +7 -5
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +46 -7
- package/test/sap/ui/core/qunit/base/config/GlobalConfigForCascade.js +24 -21
- package/test/sap/ui/core/qunit/component/Component.qunit.js +9 -8
- package/test/sap/ui/core/qunit/component/ComponentContainer.qunit.js +1 -1
- package/test/sap/ui/core/qunit/component/Models.qunit.js +29 -30
- package/test/sap/ui/core/qunit/component/UIComponent.qunit.js +3 -3
- package/test/sap/ui/core/qunit/generic/ControlMemoryLeaks.qunit.js +4 -3
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +6 -7
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +3 -2
- package/test/sap/ui/core/qunit/generic/legacy/testsuite.generic.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +65 -0
- package/test/sap/ui/core/qunit/jquery.sap.ui.qunit.js +12 -12
- package/test/sap/ui/core/qunit/loader/syncMode_unavoidablySync.qunit.js +54 -1
- package/test/sap/ui/core/qunit/messages/messagesGeneral.qunit.js +3 -1
- package/test/sap/ui/core/qunit/mockserver/testdata/shopping/Products.json +1 -1
- package/test/sap/ui/core/qunit/model/FilterProcessor.qunit.js +22 -8
- package/test/sap/ui/core/qunit/mvc/AnyView.qunit.js +3 -0
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +3 -2
- package/test/sap/ui/core/qunit/mvc/EventHandlerResolver.qunit.js +2 -2
- package/test/sap/ui/core/qunit/mvc/View.qunit.js +38 -35
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessor.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorAsync.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/extensions/ControllerMetadata.qunit.js +6 -2
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/extensions/testdata/AnotherMain.controller.js +3 -1
- package/test/sap/ui/core/qunit/mvc/testdata/XMLViewEmbeddingTypedViews.view.xml +1 -1
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing.qunit.js +26 -7
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLTemplateProcessorRequireXML_legacyAPIs.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLView_legacyAPIs.qunit.js +2 -2
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +36 -34
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +69 -0
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +43 -22
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +318 -217
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +2111 -124
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +43 -35
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +20 -2
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +453 -125
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +70 -33
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +256 -8
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +10 -2
- package/test/sap/ui/core/qunit/opa/actions/EnterText.qunit.js +38 -14
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +102 -52
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -1
- package/test/sap/ui/core/qunit/routing/async/Targets.qunit.js +4 -5
- package/test/sap/ui/core/qunit/routing/async/TitleHistory.qunit.js +1 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/Component.js +1 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/manifest.json +1 -5
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/Component.js +1 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/manifest.json +1 -5
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/Component.js +15 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/manifest.json +8 -0
- package/test/sap/ui/core/qunit/routing/sync/Router.qunit.js +2 -2
- package/test/sap/ui/core/qunit/routing/sync/Targets.qunit.js +2 -3
- package/test/sap/ui/core/qunit/testdata/fragments/XMLTestFragmentWithXMLView.fragment.xml +5 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.base.configuration.qunit.js +1 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.control.framework.qunit.js +4 -0
- package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +190 -0
- package/test/sap/ui/core/qunit/types/DateInterval.qunit.js +2 -2
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry.qunit.js +161 -0
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry_legacyAPIs.qunit.js +150 -0
- package/test/sap/ui/core/qunit/ui5classes/testsuite.ui5classes.qunit.js +84 -0
- package/test/sap/ui/core/qunit/util/ViewSerializer.qunit.js +4 -3
- package/test/sap/ui/core/relnotes/changes-1.120.json +225 -0
|
@@ -1723,6 +1723,47 @@ sap.ui.define([
|
|
|
1723
1723
|
oMeasureMock.verify();
|
|
1724
1724
|
});
|
|
1725
1725
|
|
|
1726
|
+
//*********************************************************************************************
|
|
1727
|
+
// BCP: 985176/2023
|
|
1728
|
+
QUnit.test("renderUI5FilterArray", function (assert) {
|
|
1729
|
+
const aFilterArray = [
|
|
1730
|
+
{sPath: 'Material'},
|
|
1731
|
+
{aFilters: [/*Multi Filter*/]},
|
|
1732
|
+
{sPath: 'MaterialDocument', sOperator: 'EQ', oValue1: '4900005860'},
|
|
1733
|
+
{sPath: 'MaterialDocument', sOperator: 'EQ', oValue1: "4900005859"},
|
|
1734
|
+
{sPath: 'MaterialDocument', sOperator: 'EQ', oValue1: '4900005915'},
|
|
1735
|
+
{sPath: 'MaterialDocument', sOperator: 'EQ', oValue1: '4900005916'},
|
|
1736
|
+
{sPath: 'MaterialGroup'},
|
|
1737
|
+
{sPath: 'MaterialType'},
|
|
1738
|
+
{sPath: 'Plant'},
|
|
1739
|
+
{sPath: 'ReversalMovementIsSelected'},
|
|
1740
|
+
{sPath: 'StockLevelIsValuated'},
|
|
1741
|
+
{sPath: 'StorageLocation'}
|
|
1742
|
+
];
|
|
1743
|
+
const oFilterExpression = new odata4analytics.FilterExpression();
|
|
1744
|
+
const oFilterExpressionMock = this.mock(oFilterExpression);
|
|
1745
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[0]).returns("~Material");
|
|
1746
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[2]).returns("~MaterialDocument0");
|
|
1747
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[3]).returns("~MaterialDocument1");
|
|
1748
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[4]).returns("~MaterialDocument2");
|
|
1749
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[5]).returns("~MaterialDocument3");
|
|
1750
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[6]).returns("~MaterialGroup");
|
|
1751
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[7]).returns("~MaterialType");
|
|
1752
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[8]).returns("~Plant");
|
|
1753
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[9])
|
|
1754
|
+
.returns("~ReversalMovementIsSelected");
|
|
1755
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[10])
|
|
1756
|
+
.returns("~StockLevelIsValuated");
|
|
1757
|
+
oFilterExpressionMock.expects("renderUI5Filter").withExactArgs(aFilterArray[11]).returns("~StorageLocation");
|
|
1758
|
+
oFilterExpressionMock.expects("renderUI5MultiFilter").withExactArgs(aFilterArray[1]).returns("~MultiFilter");
|
|
1759
|
+
|
|
1760
|
+
// code under test
|
|
1761
|
+
assert.strictEqual(oFilterExpression.renderUI5FilterArray(aFilterArray.slice()),
|
|
1762
|
+
"(~Material) and (~MaterialDocument0 or ~MaterialDocument1 or ~MaterialDocument2 or ~MaterialDocument3)"
|
|
1763
|
+
+ " and (~MaterialGroup) and (~MaterialType) and (~Plant) and (~ReversalMovementIsSelected)"
|
|
1764
|
+
+ " and (~StockLevelIsValuated) and (~StorageLocation) and (~MultiFilter)");
|
|
1765
|
+
});
|
|
1766
|
+
|
|
1726
1767
|
//*********************************************************************************************
|
|
1727
1768
|
QUnit.test("deepEqual", function (assert) {
|
|
1728
1769
|
var aColumns = [];
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
|
-
<meta name="sap-ui-
|
|
6
|
-
<meta name="sap-ui-
|
|
5
|
+
<meta name="sap-ui-param-a" content="meta">
|
|
6
|
+
<meta name="sap-ui-param-b" content="meta">
|
|
7
|
+
<meta name="sap-ui-param-merged-object" content='{ "objectKeyMeta": "metaObject" }'>
|
|
7
8
|
|
|
8
9
|
<!-- Initialization -->
|
|
9
10
|
<script src="./config/GlobalConfigForCascade.js"></script>
|
|
10
11
|
<script src="../../../../../../resources/ui5loader.js"></script>
|
|
11
12
|
<script id="sap-ui-bootstrap" src="../../../../../../resources/ui5loader-autoconfig.js"
|
|
12
|
-
data-sap-ui-
|
|
13
|
-
data-sap-ui-
|
|
14
|
-
data-sap-ui-
|
|
13
|
+
data-sap-ui-param-a="bootstrap"
|
|
14
|
+
data-sap-ui-param-b="bootstrap"
|
|
15
|
+
data-sap-ui-param-c="bootstrap"
|
|
16
|
+
data-sap-ui-param-merged-object='{ "objectKeyBootstrap": "bootstrapObject" }'></script>
|
|
15
17
|
|
|
16
18
|
<link href="../../../../../../resources/sap/ui/thirdparty/qunit-2.css" rel="stylesheet" media="screen">
|
|
17
19
|
<script src="../../../../../../resources/sap/ui/thirdparty/qunit-2.js"></script>
|
|
@@ -82,7 +82,7 @@ sap.ui.require([
|
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
QUnit.test("Type Conversion: Convert all types", function(assert) {
|
|
85
|
-
assert.expect(
|
|
85
|
+
assert.expect(20);
|
|
86
86
|
var myEnum = {
|
|
87
87
|
enumKey: "enumValue"
|
|
88
88
|
};
|
|
@@ -144,7 +144,22 @@ sap.ui.require([
|
|
|
144
144
|
type: BaseConfiguration.Type.Object,
|
|
145
145
|
external: true
|
|
146
146
|
}), {objectAsStringKey: "objectAsStringValue"}, "BaseConfiguration.get for param 'sapUiParamObjectAsString' returns correct value '{objectAsStringKey: \"objectAsStringValue\"}'");
|
|
147
|
+
assert.deepEqual(BaseConfiguration.get({
|
|
148
|
+
name: "sapUiParamMergedObject",
|
|
149
|
+
type: BaseConfiguration.Type.Object,
|
|
150
|
+
external: true
|
|
151
|
+
}), {objectKeyUrl: "urlObject"}, "BaseConfiguration.get for param 'sapUiParamMergedObject' returns correct value '{objectKeyUrl: \"urlObject\"}'");
|
|
147
152
|
BaseConfiguration._.invalidate();
|
|
153
|
+
assert.deepEqual(BaseConfiguration.get({
|
|
154
|
+
name: "sapUiParamMergedObject",
|
|
155
|
+
type: BaseConfiguration.Type.MergedObject,
|
|
156
|
+
external: true
|
|
157
|
+
}), {
|
|
158
|
+
objectKeyGlobal: "globalObject",
|
|
159
|
+
objectKeyBootstrap: "bootstrapObject",
|
|
160
|
+
objectKeyMeta: "metaObject",
|
|
161
|
+
objectKeyUrl: "urlObject"
|
|
162
|
+
}, "BaseConfiguration.get for param 'sapUiParamMergedObject' returns correct value '{objectKeyGlobal: \"globalObject\",objectKeyBootstrap: \"bootstrapObject\",objectKeyMeta: \"metaObject\",objectKeyUrl: \"urlObject\"}'");
|
|
148
163
|
assert.strictEqual(BaseConfiguration.get({
|
|
149
164
|
name: "sapUiParamString",
|
|
150
165
|
type: BaseConfiguration.Type.String,
|
|
@@ -173,7 +188,7 @@ sap.ui.require([
|
|
|
173
188
|
});
|
|
174
189
|
|
|
175
190
|
QUnit.test("Type Conversion: Default values", function(assert) {
|
|
176
|
-
assert.expect(
|
|
191
|
+
assert.expect(13);
|
|
177
192
|
|
|
178
193
|
assert.strictEqual(BaseConfiguration.get({
|
|
179
194
|
name: "sapUiParamDoesNotExist",
|
|
@@ -226,10 +241,27 @@ sap.ui.require([
|
|
|
226
241
|
type: BaseConfiguration.Type.Object,
|
|
227
242
|
defaultValue: undefined
|
|
228
243
|
}), undefined, "BaseConfiguration.get for param 'sapUiParamDoesNotExist' returns correct value 'undefined'");
|
|
244
|
+
BaseConfiguration._.invalidate();
|
|
245
|
+
assert.deepEqual(BaseConfiguration.get({
|
|
246
|
+
name: "sapUiParamDoesNotExist",
|
|
247
|
+
type: BaseConfiguration.Type.MergedObject
|
|
248
|
+
}), {}, "BaseConfiguration.get for param 'sapUiParamDoesNotExist' returns correct value '{}'");
|
|
249
|
+
BaseConfiguration._.invalidate();
|
|
250
|
+
assert.deepEqual(BaseConfiguration.get({
|
|
251
|
+
name: "sapUiParamDoesNotExist",
|
|
252
|
+
type: BaseConfiguration.Type.MergedObject,
|
|
253
|
+
defaultValue: true
|
|
254
|
+
}), true, "BaseConfiguration.get for param 'sapUiParamDoesNotExist' returns provided default value 'true'");
|
|
255
|
+
BaseConfiguration._.invalidate();
|
|
256
|
+
assert.deepEqual(BaseConfiguration.get({
|
|
257
|
+
name: "sapUiParamDoesNotExist",
|
|
258
|
+
type: BaseConfiguration.Type.MergedObject,
|
|
259
|
+
defaultValue: undefined
|
|
260
|
+
}), undefined, "BaseConfiguration.get for param 'sapUiParamDoesNotExist' returns correct value 'undefined'");
|
|
229
261
|
});
|
|
230
262
|
|
|
231
263
|
QUnit.test("Type Conversion: Invalid usage of BaseConfiguration.get", function(assert) {
|
|
232
|
-
assert.expect(
|
|
264
|
+
assert.expect(9);
|
|
233
265
|
var myEnum = {
|
|
234
266
|
enumKey: "enumValue"
|
|
235
267
|
};
|
|
@@ -261,6 +293,13 @@ sap.ui.require([
|
|
|
261
293
|
external: true
|
|
262
294
|
});
|
|
263
295
|
}, new TypeError("unsupported value"), "BaseConfiguration.get with type 'object' for param 'sapUiParamInteger' throws error 'unsupported value'");
|
|
296
|
+
assert.throws(function () {
|
|
297
|
+
BaseConfiguration.get({
|
|
298
|
+
name: "sapUiParamInteger",
|
|
299
|
+
type: BaseConfiguration.Type.MergedObject,
|
|
300
|
+
external: true
|
|
301
|
+
});
|
|
302
|
+
}, new TypeError("unsupported value"), "BaseConfiguration.get with type 'mergedObject' for param 'sapUiParamInteger' throws error 'unsupported value'");
|
|
264
303
|
assert.throws(function () {
|
|
265
304
|
BaseConfiguration.get({
|
|
266
305
|
name: "sapUiParamInteger",
|
|
@@ -346,10 +385,10 @@ sap.ui.require([
|
|
|
346
385
|
var oLogSpy = sinon.spy(sap.ui.loader._.logger, "error");
|
|
347
386
|
|
|
348
387
|
// Change some parameter using the globalThis['sap-ui-config'] object
|
|
349
|
-
globalThis["sap-ui-config"]["
|
|
350
|
-
globalThis["sap-ui-config"]["xx-
|
|
351
|
-
globalThis["sap-ui-config"]["
|
|
352
|
-
globalThis["sap-ui-config"]["
|
|
388
|
+
globalThis["sap-ui-config"]["param-d"] = "hubelDubel";
|
|
389
|
+
globalThis["sap-ui-config"]["xx-param-e"] = "hubelDubel";
|
|
390
|
+
globalThis["sap-ui-config"]["not-provided-param-c"] = "hubelDubel";
|
|
391
|
+
globalThis["sap-ui-config"]["not-provided-param-d"] = "hubelDubel";
|
|
353
392
|
|
|
354
393
|
// Change some parameter using WritableBootInstance.set
|
|
355
394
|
oWritableBootInstance.set("sapUiParamG", "HubelDubel");
|
|
@@ -3,38 +3,41 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
|
|
5
5
|
globalThis["sap-ui-config"] = {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"xx-
|
|
6
|
+
"param-a": "global",
|
|
7
|
+
"param-b": "global",
|
|
8
|
+
"param-c": "global",
|
|
9
|
+
"param-d": "global",
|
|
10
|
+
"xx-param-e": "xx-global",
|
|
11
11
|
"xxParamF": "xxGlobal",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
12
|
+
"param-g": "global",
|
|
13
|
+
"param-h": "global",
|
|
14
|
+
"param-boolean": "true",
|
|
15
|
+
"param-boolean-as-string": "X",
|
|
16
|
+
"param-function": function () {
|
|
17
17
|
return "function";
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"param-function-as-array": [function () {
|
|
20
20
|
return "functionAsArray";
|
|
21
21
|
}, function () {
|
|
22
22
|
return "functionAsArray";
|
|
23
23
|
}],
|
|
24
|
-
"
|
|
24
|
+
"param-code": function () {
|
|
25
25
|
return "code";
|
|
26
26
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"param-code-as-string": "codeAsString",
|
|
28
|
+
"param-object": {
|
|
29
29
|
objectKey: "object"
|
|
30
30
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
31
|
+
"param-merged-object": {
|
|
32
|
+
objectKeyGlobal: "globalObject"
|
|
33
|
+
},
|
|
34
|
+
"param-object-as-string": "{\"objectAsStringKey\": \"objectAsStringValue\"}",
|
|
35
|
+
"param-string": "string",
|
|
36
|
+
"param-string-array": ["stringArray"],
|
|
37
|
+
"param-string-array-as-string": "stringArrayAsString,stringArrayAsStr",
|
|
38
|
+
"param-integer": 5,
|
|
39
|
+
"param-null": null,
|
|
40
|
+
"param-enum": "enumValue",
|
|
38
41
|
"paramlowercase": "lowercase"
|
|
39
42
|
};
|
|
40
43
|
})();
|
|
@@ -3,6 +3,7 @@ sap.ui.define([
|
|
|
3
3
|
"sap/ui/qunit/utils/nextUIUpdate",
|
|
4
4
|
'sap/ui/core/Component',
|
|
5
5
|
'sap/ui/core/ComponentContainer',
|
|
6
|
+
'sap/ui/core/ComponentRegistry',
|
|
6
7
|
'sap/ui/core/Messaging',
|
|
7
8
|
'sap/ui/core/UIComponentMetadata',
|
|
8
9
|
'sap/ui/test/routing/Component',
|
|
@@ -12,13 +13,13 @@ sap.ui.define([
|
|
|
12
13
|
'sap/base/util/LoaderExtensions',
|
|
13
14
|
'sap/ui/core/Manifest',
|
|
14
15
|
'sap/base/i18n/ResourceBundle'
|
|
15
|
-
], function (createAndAppendDiv, nextUIUpdate, Component, ComponentContainer, Messaging, UIComponentMetadata, SamplesRoutingComponent, SamplesRouterExtension, Log, deepExtend, LoaderExtensions, Manifest, ResourceBundle) {
|
|
16
|
+
], function (createAndAppendDiv, nextUIUpdate, Component, ComponentContainer, ComponentRegistry, Messaging, UIComponentMetadata, SamplesRoutingComponent, SamplesRouterExtension, Log, deepExtend, LoaderExtensions, Manifest, ResourceBundle) {
|
|
16
17
|
|
|
17
18
|
"use strict";
|
|
18
19
|
/*global sinon, QUnit, foo*/
|
|
19
20
|
|
|
20
21
|
function cleanUpRegistry() {
|
|
21
|
-
|
|
22
|
+
ComponentRegistry.forEach(function(oComponent) {
|
|
22
23
|
oComponent.destroy();
|
|
23
24
|
});
|
|
24
25
|
}
|
|
@@ -146,7 +147,7 @@ sap.ui.define([
|
|
|
146
147
|
var oCompCont1 = this.oCompCont1;
|
|
147
148
|
assert.ok(!!oComp.getComponentData(), "Component has component data");
|
|
148
149
|
assert.equal(oComp.getComponentData().foo, "bar", "Component data is correct");
|
|
149
|
-
var oComponent =
|
|
150
|
+
var oComponent = ComponentRegistry.get(oCompCont1.getComponent());
|
|
150
151
|
assert.ok(!!oComponent.getComponentData(), "Component has component data");
|
|
151
152
|
assert.equal(oComponent.getComponentData().foo, "bar", "Component data is correct");
|
|
152
153
|
});
|
|
@@ -1960,14 +1961,14 @@ sap.ui.define([
|
|
|
1960
1961
|
var aFilteredComponents = [];
|
|
1961
1962
|
|
|
1962
1963
|
assert.ok(Component.hasOwnProperty("registry"), "Component has static method to access registry");
|
|
1963
|
-
assert.equal(
|
|
1964
|
-
assert.deepEqual(Object.keys(
|
|
1965
|
-
assert.ok(
|
|
1964
|
+
assert.equal(ComponentRegistry.size, 3, "Return number of registered component instances");
|
|
1965
|
+
assert.deepEqual(Object.keys(ComponentRegistry.all()).sort(), ["A", "B", "C"], "Return all registered component instances");
|
|
1966
|
+
assert.ok(ComponentRegistry.get("B") === oFooB, "Return reference of component B from registry by ID");
|
|
1966
1967
|
|
|
1967
|
-
|
|
1968
|
+
ComponentRegistry.forEach(fnCallbackSpy);
|
|
1968
1969
|
assert.ok(fnCallbackSpy.calledThrice, "Callback was executed 3 times");
|
|
1969
1970
|
|
|
1970
|
-
aFilteredComponents =
|
|
1971
|
+
aFilteredComponents = ComponentRegistry.filter(function(oComponent) {
|
|
1971
1972
|
return ["B", "C"].indexOf(oComponent.getId()) > -1;
|
|
1972
1973
|
});
|
|
1973
1974
|
|
|
@@ -79,7 +79,7 @@ sap.ui.define([
|
|
|
79
79
|
assert.ok(true, "Was not able to create component, componentFailed fired");
|
|
80
80
|
assert.ok(oReason.message.indexOf("failed to load") === 0, "Error object is passed as reason");
|
|
81
81
|
Promise.resolve().then(function() {
|
|
82
|
-
assert.ok(oLogErrorSpy.calledWith(sinon.match(
|
|
82
|
+
assert.ok(oLogErrorSpy.calledWith(sinon.match(/Failed to load component for container/)));
|
|
83
83
|
assert.strictEqual(oLogErrorSpy.callCount, 1, "One error should have been logged");
|
|
84
84
|
done();
|
|
85
85
|
});
|
|
@@ -356,15 +356,15 @@ sap.ui.define([
|
|
|
356
356
|
|
|
357
357
|
|
|
358
358
|
// Log.error
|
|
359
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
360
|
-
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(
|
|
361
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
362
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
363
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
364
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
365
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
366
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
367
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
359
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Missing \"type\" for model \"no-model-type\"/), "[\"sap.ui5\"][\"models\"][\"no-model-type\"]", this.oComponent.getMetadata().getComponentName());
|
|
360
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Class \"sap.ui.not.defined.Model\" for model \"missing-model-class\" could not be loaded./), "[\"sap.ui5\"][\"models\"][\"missing-model-class\"]", this.oComponent.getMetadata().getComponentName());
|
|
361
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Class \"sap.ui.test.v2models.parent.ModelNotDefined\" for model \"model-not-found\" could not be found/), "[\"sap.ui5\"][\"models\"][\"model-not-found\"]", this.oComponent.getMetadata().getComponentName());
|
|
362
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: ODataAnnotation \"undefined\" for dataSource \"odata-invalid-annotations\" could not be found in manifest/), "[\"sap.app\"][\"dataSources\"][\"undefined\"]", this.oComponent.getMetadata().getComponentName());
|
|
363
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Missing \"uri\" for ODataAnnotation \"annotation-without-uri\"/), "[\"sap.app\"][\"dataSources\"][\"annotation-without-uri\"]", this.oComponent.getMetadata().getComponentName());
|
|
364
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"json\" was expected to have type \"ODataAnnotation\" but was \"JSON\"/), "[\"sap.app\"][\"dataSources\"][\"json\"]", this.oComponent.getMetadata().getComponentName());
|
|
365
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"invalid\" for model \"dataSource-invalid\" not found or invalid/), "[\"sap.app\"][\"dataSources\"][\"invalid\"]", this.oComponent.getMetadata().getComponentName());
|
|
366
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"does-not-exist\" for model \"dataSource-not-found\" not found or invalid/), "[\"sap.app\"][\"dataSources\"][\"does-not-exist\"]", this.oComponent.getMetadata().getComponentName());
|
|
367
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Provided OData version \"3.0\" in dataSource \"unknown-odataVersion\" for model \"v2-ODataModel-unknown-odataVersion\" is unknown. Falling back to default model type \"sap.ui.model.odata.v2.ODataModel\"./), "[\"sap.app\"][\"dataSources\"][\"unknown-odataVersion\"]", this.oComponent.getMetadata().getComponentName());
|
|
368
368
|
|
|
369
369
|
|
|
370
370
|
// check if models are set on component (and save them internally)
|
|
@@ -928,17 +928,16 @@ sap.ui.define([
|
|
|
928
928
|
uri: 'foo'
|
|
929
929
|
});
|
|
930
930
|
|
|
931
|
-
|
|
932
931
|
// Log.error
|
|
933
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
934
|
-
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(
|
|
935
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
936
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
937
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
938
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
939
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
940
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
941
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
932
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Missing \"type\" for model \"no-model-type\"/), "[\"sap.ui5\"][\"models\"][\"no-model-type\"]", this.oComponent.getMetadata().getComponentName());
|
|
933
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Class \"sap.ui.not.defined.Model\" for model \"missing-model-class\" could not be loaded./), "[\"sap.ui5\"][\"models\"][\"missing-model-class\"]", this.oComponent.getMetadata().getComponentName());
|
|
934
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Class \"sap.ui.test.v2models.parent.ModelNotDefined\" for model \"model-not-found\" could not be found/), "[\"sap.ui5\"][\"models\"][\"model-not-found\"]", this.oComponent.getMetadata().getComponentName());
|
|
935
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: ODataAnnotation \"undefined\" for dataSource \"odata-invalid-annotations\" could not be found in manifest/), "[\"sap.app\"][\"dataSources\"][\"undefined\"]", this.oComponent.getMetadata().getComponentName());
|
|
936
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Missing \"uri\" for ODataAnnotation \"annotation-without-uri\"/), "[\"sap.app\"][\"dataSources\"][\"annotation-without-uri\"]", this.oComponent.getMetadata().getComponentName());
|
|
937
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"json\" was expected to have type \"ODataAnnotation\" but was \"JSON\"/), "[\"sap.app\"][\"dataSources\"][\"json\"]", this.oComponent.getMetadata().getComponentName());
|
|
938
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"invalid\" for model \"dataSource-invalid\" not found or invalid/), "[\"sap.app\"][\"dataSources\"][\"invalid\"]", this.oComponent.getMetadata().getComponentName());
|
|
939
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"does-not-exist\" for model \"dataSource-not-found\" not found or invalid/), "[\"sap.app\"][\"dataSources\"][\"does-not-exist\"]", this.oComponent.getMetadata().getComponentName());
|
|
940
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Provided OData version \"3.0\" in dataSource \"unknown-odataVersion\" for model \"v2-ODataModel-unknown-odataVersion\" is unknown. Falling back to default model type \"sap.ui.model.odata.v2.ODataModel\"./), "[\"sap.app\"][\"dataSources\"][\"unknown-odataVersion\"]", this.oComponent.getMetadata().getComponentName());
|
|
942
941
|
|
|
943
942
|
|
|
944
943
|
// check if models are set on component (and save them internally)
|
|
@@ -1445,15 +1444,15 @@ sap.ui.define([
|
|
|
1445
1444
|
|
|
1446
1445
|
|
|
1447
1446
|
// Log.error
|
|
1448
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1449
|
-
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(
|
|
1450
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1451
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1452
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1453
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1454
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1455
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1456
|
-
sinon.assert.calledWithExactly(this.oLogSpy,
|
|
1447
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Missing \"type\" for model \"no-model-type\"/), "[\"sap.ui5\"][\"models\"][\"no-model-type\"]", this.oComponent.getMetadata().getComponentName());
|
|
1448
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Class \"sap.ui.not.defined.Model\" for model \"missing-model-class\" could not be loaded./), "[\"sap.ui5\"][\"models\"][\"missing-model-class\"]", this.oComponent.getMetadata().getComponentName());
|
|
1449
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Class \"sap.ui.test.v2models.parent.ModelNotDefined\" for model \"model-not-found\" could not be found/), "[\"sap.ui5\"][\"models\"][\"model-not-found\"]", this.oComponent.getMetadata().getComponentName());
|
|
1450
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: ODataAnnotation \"undefined\" for dataSource \"odata-invalid-annotations\" could not be found in manifest/), "[\"sap.app\"][\"dataSources\"][\"undefined\"]", this.oComponent.getMetadata().getComponentName());
|
|
1451
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Missing \"uri\" for ODataAnnotation \"annotation-without-uri\"/), "[\"sap.app\"][\"dataSources\"][\"annotation-without-uri\"]", this.oComponent.getMetadata().getComponentName());
|
|
1452
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"json\" was expected to have type \"ODataAnnotation\" but was \"JSON\"/), "[\"sap.app\"][\"dataSources\"][\"json\"]", this.oComponent.getMetadata().getComponentName());
|
|
1453
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"invalid\" for model \"dataSource-invalid\" not found or invalid/), "[\"sap.app\"][\"dataSources\"][\"invalid\"]", this.oComponent.getMetadata().getComponentName());
|
|
1454
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: dataSource \"does-not-exist\" for model \"dataSource-not-found\" not found or invalid/), "[\"sap.app\"][\"dataSources\"][\"does-not-exist\"]", this.oComponent.getMetadata().getComponentName());
|
|
1455
|
+
sinon.assert.calledWithExactly(this.oLogSpy, sinon.match(/Component Manifest: Provided OData version \"3.0\" in dataSource \"unknown-odataVersion\" for model \"v2-ODataModel-unknown-odataVersion\" is unknown. Falling back to default model type \"sap.ui.model.odata.v2.ODataModel\"./), "[\"sap.app\"][\"dataSources\"][\"unknown-odataVersion\"]", this.oComponent.getMetadata().getComponentName());
|
|
1457
1456
|
|
|
1458
1457
|
|
|
1459
1458
|
// check if models are set on component (and save them internally)
|
|
@@ -1717,7 +1716,7 @@ sap.ui.define([
|
|
|
1717
1716
|
|
|
1718
1717
|
// check error log for "class-not-loaded" model
|
|
1719
1718
|
sinon.assert.calledWithExactly(this.oLogErrorSpy,
|
|
1720
|
-
sinon.match(
|
|
1719
|
+
sinon.match(/Component Manifest: Class \"sap.ui.sample.model.MyModel\" for model \"class-not-loaded\" could not be loaded./),
|
|
1721
1720
|
"[\"sap.ui5\"][\"models\"][\"class-not-loaded\"]",
|
|
1722
1721
|
this.oComponent.getMetadata().getComponentName());
|
|
1723
1722
|
|
|
@@ -1837,7 +1836,7 @@ sap.ui.define([
|
|
|
1837
1836
|
|
|
1838
1837
|
// check error log for "class-not-loaded" model
|
|
1839
1838
|
sinon.assert.calledWithExactly(this.oLogErrorSpy,
|
|
1840
|
-
sinon.match(
|
|
1839
|
+
sinon.match(/Component Manifest: Class \"sap.ui.sample.model.MyModel\" for model \"class-not-loaded\" could not be loaded./),
|
|
1841
1840
|
"[\"sap.ui5\"][\"models\"][\"class-not-loaded\"]",
|
|
1842
1841
|
this.oComponent.getMetadata().getComponentName());
|
|
1843
1842
|
|
|
@@ -1049,8 +1049,8 @@ sap.ui.define([
|
|
|
1049
1049
|
manifest: "json"
|
|
1050
1050
|
},
|
|
1051
1051
|
constructor: function() {
|
|
1052
|
-
assert.ok(logWarningSpy.calledWith(
|
|
1053
|
-
assert.ok(logWarningSpy.calledWith(
|
|
1052
|
+
assert.ok(logWarningSpy.calledWith(sinon.match(/Cannot load module 'sap\/ui\/model\/odata\/ODataModelNotExists'. This will most probably cause an error once the module is used later on./)), "Model not found");
|
|
1053
|
+
assert.ok(logWarningSpy.calledWith(sinon.match(/Cannot load module 'someRouterNotExists'. This will most probably cause an error once the module is used later on./)), "Router not found");
|
|
1054
1054
|
UIComponent.apply(this, arguments);
|
|
1055
1055
|
}
|
|
1056
1056
|
});
|
|
@@ -1366,7 +1366,7 @@ sap.ui.define([
|
|
|
1366
1366
|
manifest: true
|
|
1367
1367
|
}).then(function(oComponent){
|
|
1368
1368
|
assert.equal(oErrorLogSpy.callCount, 1, "error logged");
|
|
1369
|
-
assert.
|
|
1369
|
+
assert.ok(oErrorLogSpy.calledWith(sinon.match(/Mandatory init\(\) not called for UIComponent: 'manifestModules.scenario11'. This is likely caused by a missing super call in the component's init implementation./)), "missing init super error logged");
|
|
1370
1370
|
}).catch(function() {
|
|
1371
1371
|
assert.ok(false, "Modules could not be loaded and an error occured.");
|
|
1372
1372
|
});
|
|
@@ -7,8 +7,9 @@ sap.ui.define([
|
|
|
7
7
|
"sap/ui/test/generic/TestBase",
|
|
8
8
|
"sap/ui/test/generic/Utils",
|
|
9
9
|
"sap/ui/core/Element",
|
|
10
|
+
"sap/ui/core/ElementRegistry",
|
|
10
11
|
"sap/ui/qunit/utils/nextUIUpdate"
|
|
11
|
-
], function(TestBase, Utils, Element, nextUIUpdate) {
|
|
12
|
+
], function(TestBase, Utils, Element, ElementRegistry, nextUIUpdate) {
|
|
12
13
|
"use strict";
|
|
13
14
|
|
|
14
15
|
// asserts that both given maps have the same entries
|
|
@@ -110,13 +111,13 @@ sap.ui.define([
|
|
|
110
111
|
await nextUIUpdate();
|
|
111
112
|
|
|
112
113
|
if (bFinalIteration) {
|
|
113
|
-
var mPostElements =
|
|
114
|
+
var mPostElements = ElementRegistry.all();
|
|
114
115
|
|
|
115
116
|
// controls left over by second instance are real leaks that will grow proportionally to instance count => ERROR
|
|
116
117
|
assert.equalElementsInControlList(mPostElements, mPreElements, "Memory leak check in " + sControlName);
|
|
117
118
|
} else {
|
|
118
119
|
// Render Control Instance 2 - any new controls leaked?
|
|
119
|
-
mPreElements =
|
|
120
|
+
mPreElements = ElementRegistry.all();
|
|
120
121
|
}
|
|
121
122
|
}.bind(this);
|
|
122
123
|
|
|
@@ -15,12 +15,12 @@ sap.ui.define([
|
|
|
15
15
|
"sap/base/Log",
|
|
16
16
|
"sap/base/util/ObjectPath",
|
|
17
17
|
"sap/ui/VersionInfo",
|
|
18
|
-
"sap/ui/core/
|
|
18
|
+
"sap/ui/core/ElementRegistry",
|
|
19
19
|
"sap/ui/core/Lib",
|
|
20
20
|
"sap/ui/dom/includeStylesheet",
|
|
21
21
|
"sap/ui/qunit/utils/nextUIUpdate",
|
|
22
22
|
"require"
|
|
23
|
-
], function (Log, ObjectPath, VersionInfo,
|
|
23
|
+
], function (Log, ObjectPath, VersionInfo, ElementRegistry, Library, includeStylesheet, nextUIUpdate, require) {
|
|
24
24
|
"use strict";
|
|
25
25
|
|
|
26
26
|
/*global QUnit */
|
|
@@ -301,8 +301,7 @@ sap.ui.define([
|
|
|
301
301
|
async function checkControl(oControlClass, assert) {
|
|
302
302
|
var sControlName = oControlClass.getMetadata().getName();
|
|
303
303
|
|
|
304
|
-
var
|
|
305
|
-
oControl1 = new oControlClass(),
|
|
304
|
+
var oControl1 = new oControlClass(),
|
|
306
305
|
bCanRender = false;
|
|
307
306
|
|
|
308
307
|
// check whether this control can be rendered
|
|
@@ -334,7 +333,7 @@ sap.ui.define([
|
|
|
334
333
|
|
|
335
334
|
// Render Control Instance 2 - any new controls leaked?
|
|
336
335
|
|
|
337
|
-
var mPreElements =
|
|
336
|
+
var mPreElements = ElementRegistry.all(),
|
|
338
337
|
oControl2 = new oControlClass();
|
|
339
338
|
|
|
340
339
|
fillControlProperties(oControl2);
|
|
@@ -357,7 +356,7 @@ sap.ui.define([
|
|
|
357
356
|
|
|
358
357
|
oControl2.destroy();
|
|
359
358
|
await nextUIUpdate();
|
|
360
|
-
var mPostElements =
|
|
359
|
+
var mPostElements = ElementRegistry.all();
|
|
361
360
|
|
|
362
361
|
// controls left over by second instance are real leaks that will grow proportionally to instance count => ERROR
|
|
363
362
|
assert.equalElementsInControlList(mPostElements, mPreElements, "Memory leak check in " + sControlName);
|
|
@@ -372,7 +371,7 @@ sap.ui.define([
|
|
|
372
371
|
|
|
373
372
|
QUnit.module("Memory.Controls", {
|
|
374
373
|
afterEach: function() {
|
|
375
|
-
|
|
374
|
+
ElementRegistry.forEach(function(oElement, sId) {
|
|
376
375
|
oElement.destroy();
|
|
377
376
|
});
|
|
378
377
|
}
|
|
@@ -11,6 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/VersionInfo",
|
|
12
12
|
"sap/ui/base/DataType",
|
|
13
13
|
"sap/ui/core/Element",
|
|
14
|
+
"sap/ui/core/ElementRegistry",
|
|
14
15
|
"sap/ui/core/Control",
|
|
15
16
|
"sap/ui/core/Item",
|
|
16
17
|
"sap/ui/core/Lib",
|
|
@@ -19,7 +20,7 @@ sap.ui.define([
|
|
|
19
20
|
"sap/ui/dom/includeStylesheet",
|
|
20
21
|
"sap/ui/qunit/utils/nextUIUpdate",
|
|
21
22
|
"require"
|
|
22
|
-
], function (Log, ObjectPath, VersionInfo, DataType, Element, Control, Item, Library, CommonsTextField, MobileText, includeStylesheet, nextUIUpdate, require) {
|
|
23
|
+
], function (Log, ObjectPath, VersionInfo, DataType, Element, ElementRegistry, Control, Item, Library, CommonsTextField, MobileText, includeStylesheet, nextUIUpdate, require) {
|
|
23
24
|
"use strict";
|
|
24
25
|
|
|
25
26
|
var aKnownLibraries = [
|
|
@@ -440,7 +441,7 @@ sap.ui.define([
|
|
|
440
441
|
|
|
441
442
|
QUnit.module("Duplicate ID issues in Controls", {
|
|
442
443
|
afterEach: function() {
|
|
443
|
-
|
|
444
|
+
ElementRegistry.forEach(function(oElement, sId) {
|
|
444
445
|
oElement.destroy();
|
|
445
446
|
});
|
|
446
447
|
}
|
|
@@ -29,6 +29,9 @@ sap.ui.define(function() {
|
|
|
29
29
|
ControlMemoryLeaks: {
|
|
30
30
|
title: "QUnit Page for memory leak detection in UI5 controls"
|
|
31
31
|
},
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated As of version 1.120
|
|
34
|
+
*/
|
|
32
35
|
ControlRenderer: {
|
|
33
36
|
title: "QUnit Page for memory leak detection in UI5 controls"
|
|
34
37
|
},
|
|
@@ -1434,4 +1434,69 @@ sap.ui.define([
|
|
|
1434
1434
|
assert.deepEqual(LocaleData.prototype.getLanguages.call(oLocaleData), oExpectedResult);
|
|
1435
1435
|
});
|
|
1436
1436
|
});
|
|
1437
|
+
|
|
1438
|
+
//*********************************************************************************************
|
|
1439
|
+
["narrow", "abbreviated", "wide"].forEach((sWidth) => {
|
|
1440
|
+
QUnit.test("getMonths: returns first alternative, " + sWidth, function (assert) {
|
|
1441
|
+
const oLocalData = {
|
|
1442
|
+
_get() {}
|
|
1443
|
+
};
|
|
1444
|
+
this.mock(oLocalData).expects("_get")
|
|
1445
|
+
.withExactArgs("ca-~scalendartype", "months", "format", sWidth)
|
|
1446
|
+
.returns([["a", "b"], "c", "d", ["e", "f", "g"], "h"]);
|
|
1447
|
+
|
|
1448
|
+
// code under test
|
|
1449
|
+
assert.deepEqual(LocaleData.prototype.getMonths.call(oLocalData, sWidth, "~sCalendarType"),
|
|
1450
|
+
["a", "c", "d", "e", "h"]);
|
|
1451
|
+
});
|
|
1452
|
+
});
|
|
1453
|
+
|
|
1454
|
+
//*********************************************************************************************
|
|
1455
|
+
["narrow", "abbreviated", "wide"].forEach((sWidth) => {
|
|
1456
|
+
QUnit.test("_getMonthsWithAlternatives: " + sWidth, function (assert) {
|
|
1457
|
+
const oLocalData = {
|
|
1458
|
+
_get() {}
|
|
1459
|
+
};
|
|
1460
|
+
this.mock(oLocalData).expects("_get")
|
|
1461
|
+
.withExactArgs("ca-~scalendartype", "months", "format", sWidth)
|
|
1462
|
+
.returns("~result");
|
|
1463
|
+
|
|
1464
|
+
// code under test
|
|
1465
|
+
assert.deepEqual(LocaleData.prototype._getMonthsWithAlternatives.call(oLocalData, sWidth, "~sCalendarType"),
|
|
1466
|
+
"~result");
|
|
1467
|
+
});
|
|
1468
|
+
});
|
|
1469
|
+
|
|
1470
|
+
//*********************************************************************************************
|
|
1471
|
+
["narrow", "abbreviated", "wide"].forEach((sWidth) => {
|
|
1472
|
+
QUnit.test("getMonthsStandAlone: returns first alternative, " + sWidth, function (assert) {
|
|
1473
|
+
const oLocalData = {
|
|
1474
|
+
_get() {}
|
|
1475
|
+
};
|
|
1476
|
+
this.mock(oLocalData).expects("_get")
|
|
1477
|
+
.withExactArgs("ca-~scalendartype", "months", "stand-alone", sWidth)
|
|
1478
|
+
.returns([["a", "b"], "c", "d", ["e", "f", "g"], "h"]);
|
|
1479
|
+
|
|
1480
|
+
// code under test
|
|
1481
|
+
assert.deepEqual(LocaleData.prototype.getMonthsStandAlone.call(oLocalData, sWidth, "~sCalendarType"),
|
|
1482
|
+
["a", "c", "d", "e", "h"]);
|
|
1483
|
+
});
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
//*********************************************************************************************
|
|
1487
|
+
["narrow", "abbreviated", "wide"].forEach((sWidth) => {
|
|
1488
|
+
QUnit.test("_getMonthsStandAloneWithAlternatives: " + sWidth, function (assert) {
|
|
1489
|
+
const oLocalData = {
|
|
1490
|
+
_get() {}
|
|
1491
|
+
};
|
|
1492
|
+
this.mock(oLocalData).expects("_get")
|
|
1493
|
+
.withExactArgs("ca-~scalendartype", "months", "stand-alone", sWidth)
|
|
1494
|
+
.returns("~result");
|
|
1495
|
+
|
|
1496
|
+
// code under test
|
|
1497
|
+
assert.deepEqual(
|
|
1498
|
+
LocaleData.prototype._getMonthsStandAloneWithAlternatives.call(oLocalData, sWidth, "~sCalendarType"),
|
|
1499
|
+
"~result");
|
|
1500
|
+
});
|
|
1501
|
+
});
|
|
1437
1502
|
});
|