@openui5/sap.ui.core 1.120.9 → 1.120.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +11 -5
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +5 -3
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +31 -3
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/Control.js +19 -3
- package/src/sap/ui/core/Core.js +1 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +28 -3
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +1 -1
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +4 -4
- 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/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/mvc/Controller.js +42 -7
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +59 -65
- package/src/sap/ui/core/util/_LocalizationHelper.js +2 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +2 -2
- package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +36 -24
- 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/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/_enforceNoReturnValue.js +27 -0
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/qunit/EventProvider.qunit.js +30 -2
- package/test/sap/ui/core/qunit/ManagedObject.qunit.js +45 -3
- package/test/sap/ui/core/qunit/app/DesignMode_suppressedDeactivation.qunit.js +8 -4
- package/test/sap/ui/core/qunit/app/_createDesignModeTests_legacyAPIs.qunit.js +8 -4
- package/test/sap/ui/core/qunit/app/fixture/designmode/test01.controller.js +4 -4
- package/test/sap/ui/core/qunit/component/Component_keepAlive.qunit.js +33 -2
- package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/App.view.xml +3 -0
- package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/Component.js +20 -0
- package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/Home.view.xml +5 -0
- package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/Other.view.xml +5 -0
- package/test/sap/ui/core/qunit/component/testdata/keepAlive/child3/manifest.json +54 -0
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +104 -49
- package/test/sap/ui/core/qunit/mvc/testdata/asyncHooks.view.xml +7 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +34 -19
- package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +137 -26
- package/test/sap/ui/core/relnotes/changes-1.120.json +27 -0
|
@@ -6,8 +6,9 @@ sap.ui.define([
|
|
|
6
6
|
'sap/ui/core/ElementRegistry',
|
|
7
7
|
'sap/ui/core/mvc/XMLView',
|
|
8
8
|
'sap/ui/core/mvc/Controller',
|
|
9
|
-
'sap/base/Log'
|
|
10
|
-
|
|
9
|
+
'sap/base/Log',
|
|
10
|
+
'sap/ui/qunit/utils/nextUIUpdate'
|
|
11
|
+
], function(Component, Fragment, Element, ElementRegistry, XMLView, Controller, Log, nextUIUpdate) {
|
|
11
12
|
"use strict";
|
|
12
13
|
|
|
13
14
|
QUnit.module("Controller.create API");
|
|
@@ -15,13 +16,13 @@ sap.ui.define([
|
|
|
15
16
|
/**
|
|
16
17
|
* See @evo-todo in Controller.js
|
|
17
18
|
*/
|
|
18
|
-
QUnit.test("Controller Loading", function
|
|
19
|
+
QUnit.test("Controller Loading", function(assert) {
|
|
19
20
|
var done = assert.async();
|
|
20
|
-
sap.ui.require(["sap/ui/core/mvc/Controller"], function
|
|
21
|
+
sap.ui.require(["sap/ui/core/mvc/Controller"], function(Controller) {
|
|
21
22
|
Controller.create({
|
|
22
23
|
name: "testdata.mvc.ControllerCreateTest"
|
|
23
24
|
})
|
|
24
|
-
.then(function
|
|
25
|
+
.then(function(oController) {
|
|
25
26
|
assert.equal(oController.double(8), 16, "Controller implementation was correctly returned");
|
|
26
27
|
done();
|
|
27
28
|
});
|
|
@@ -78,7 +79,7 @@ sap.ui.define([
|
|
|
78
79
|
assert.equal(aDangling.length, 0, "No dangling controls found for '" + oView.getId() + "'.");
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
QUnit.test("Multiple asynchronous Fragment.create - duplicate ID issue expected", function(assert){
|
|
82
|
+
QUnit.test("Multiple asynchronous Fragment.create - duplicate ID issue expected", function(assert) {
|
|
82
83
|
assert.expect(4);
|
|
83
84
|
var aFragmentPromises = [];
|
|
84
85
|
var aViews = [];
|
|
@@ -91,7 +92,7 @@ sap.ui.define([
|
|
|
91
92
|
|
|
92
93
|
sap.ui.define("my/Controller01.controller", function() {
|
|
93
94
|
return Controller.extend("my.Controller01", {
|
|
94
|
-
onInit: function(){
|
|
95
|
+
onInit: function() {
|
|
95
96
|
this._pFragment = Fragment.load({
|
|
96
97
|
name: "testdata.fragments.XMLView",
|
|
97
98
|
type: "XML"
|
|
@@ -102,24 +103,24 @@ sap.ui.define([
|
|
|
102
103
|
|
|
103
104
|
var pView1 = XMLView.create({
|
|
104
105
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller01'>" +
|
|
105
|
-
|
|
106
|
-
}).then(function(oView){
|
|
106
|
+
"</mvc:View>"
|
|
107
|
+
}).then(function(oView) {
|
|
107
108
|
aFragmentPromises.push(oView.getController()._pFragment.catch(assertCatch));
|
|
108
109
|
return oView;
|
|
109
110
|
});
|
|
110
111
|
|
|
111
112
|
var pView2 = XMLView.create({
|
|
112
113
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller01'>" +
|
|
113
|
-
|
|
114
|
-
}).then(function(oView){
|
|
114
|
+
"</mvc:View>"
|
|
115
|
+
}).then(function(oView) {
|
|
115
116
|
aFragmentPromises.push(oView.getController()._pFragment.catch(assertCatch));
|
|
116
117
|
return oView;
|
|
117
118
|
});
|
|
118
119
|
|
|
119
|
-
return Promise.all([pView1, pView2]).then(function
|
|
120
|
+
return Promise.all([pView1, pView2]).then(function(oArguments) {
|
|
120
121
|
aViews = oArguments;
|
|
121
122
|
|
|
122
|
-
return Promise.allSettled(aFragmentPromises).then(function(){
|
|
123
|
+
return Promise.allSettled(aFragmentPromises).then(function() {
|
|
123
124
|
// Clean-Up
|
|
124
125
|
aViews[0].destroy();
|
|
125
126
|
aViews[1].destroy();
|
|
@@ -132,7 +133,7 @@ sap.ui.define([
|
|
|
132
133
|
});
|
|
133
134
|
});
|
|
134
135
|
|
|
135
|
-
QUnit.test("Multiple asynchronous Controller.loadFragment - no duplicate ID issue expectecd", function(assert){
|
|
136
|
+
QUnit.test("Multiple asynchronous Controller.loadFragment - no duplicate ID issue expectecd", function(assert) {
|
|
136
137
|
assert.expect(2);
|
|
137
138
|
|
|
138
139
|
var aViews = [], aFragmentPromises = [];
|
|
@@ -144,7 +145,7 @@ sap.ui.define([
|
|
|
144
145
|
|
|
145
146
|
sap.ui.define("my/Controller02.controller", function() {
|
|
146
147
|
return Controller.extend("my.Controller02", {
|
|
147
|
-
onInit: function(){
|
|
148
|
+
onInit: function() {
|
|
148
149
|
this._pFragment = this.loadFragment({
|
|
149
150
|
name: "testdata.fragments.XMLView",
|
|
150
151
|
type: "XML"
|
|
@@ -155,21 +156,21 @@ sap.ui.define([
|
|
|
155
156
|
|
|
156
157
|
var pView1 = XMLView.create({
|
|
157
158
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller02'>" +
|
|
158
|
-
|
|
159
|
-
}).then(function(oView){
|
|
159
|
+
"</mvc:View>"
|
|
160
|
+
}).then(function(oView) {
|
|
160
161
|
aFragmentPromises.push(oView.getController()._pFragment.catch(assertCatch));
|
|
161
162
|
return oView;
|
|
162
163
|
});
|
|
163
164
|
|
|
164
165
|
var pView2 = XMLView.create({
|
|
165
166
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller02'>" +
|
|
166
|
-
|
|
167
|
-
}).then(function(oView){
|
|
167
|
+
"</mvc:View>"
|
|
168
|
+
}).then(function(oView) {
|
|
168
169
|
aFragmentPromises.push(oView.getController()._pFragment.catch(assertCatch));
|
|
169
170
|
return oView;
|
|
170
171
|
});
|
|
171
172
|
|
|
172
|
-
return Promise.all([pView1, pView2]).then(function
|
|
173
|
+
return Promise.all([pView1, pView2]).then(function(aResult) {
|
|
173
174
|
aViews = aResult;
|
|
174
175
|
|
|
175
176
|
// get controller first, the reference is otherwise lost after calling destroy()
|
|
@@ -186,19 +187,19 @@ sap.ui.define([
|
|
|
186
187
|
// capture all concurrent promises, the catch handler above and the implicit destroy of the controller
|
|
187
188
|
return Promise.allSettled(
|
|
188
189
|
aFragmentPromises.concat(oCtr1._getDestroyables())
|
|
189
|
-
|
|
190
|
+
.concat(oCtr2._getDestroyables()));
|
|
190
191
|
}).then(function() {
|
|
191
192
|
checkForDanglingControls(assert, aViews[0]);
|
|
192
193
|
checkForDanglingControls(assert, aViews[1]);
|
|
193
194
|
});
|
|
194
195
|
});
|
|
195
196
|
|
|
196
|
-
QUnit.test("Fragment.create - add to dependents after destruction of view", function(assert){
|
|
197
|
+
QUnit.test("Fragment.create - add to dependents after destruction of view", function(assert) {
|
|
197
198
|
assert.expect(3);
|
|
198
199
|
|
|
199
200
|
sap.ui.define("my/Controller03.controller", function() {
|
|
200
201
|
return Controller.extend("my.Controller03", {
|
|
201
|
-
onInit: function(){
|
|
202
|
+
onInit: function() {
|
|
202
203
|
this._pFragment = Fragment.load({
|
|
203
204
|
name: "testdata.fragments.XMLView",
|
|
204
205
|
type: "XML"
|
|
@@ -211,8 +212,8 @@ sap.ui.define([
|
|
|
211
212
|
|
|
212
213
|
return XMLView.create({
|
|
213
214
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller03'>" +
|
|
214
|
-
|
|
215
|
-
}).then(function(oView){
|
|
215
|
+
"</mvc:View>"
|
|
216
|
+
}).then(function(oView) {
|
|
216
217
|
var pFragmentPromise = oView.getController()._pFragment;
|
|
217
218
|
oView.destroy();
|
|
218
219
|
return pFragmentPromise.then(function() {
|
|
@@ -225,12 +226,12 @@ sap.ui.define([
|
|
|
225
226
|
});
|
|
226
227
|
});
|
|
227
228
|
|
|
228
|
-
QUnit.test("Controller.loadFragment - dependents cleaned up correctly", function(assert){
|
|
229
|
+
QUnit.test("Controller.loadFragment - dependents cleaned up correctly", function(assert) {
|
|
229
230
|
assert.expect(5);
|
|
230
231
|
|
|
231
232
|
sap.ui.define("my/Controller04.controller", function() {
|
|
232
233
|
return Controller.extend("my.Controller04", {
|
|
233
|
-
onInit: function(){
|
|
234
|
+
onInit: function() {
|
|
234
235
|
this._pFragment = this.loadFragment({
|
|
235
236
|
name: "testdata.fragments.XMLView",
|
|
236
237
|
type: "XML"
|
|
@@ -241,8 +242,8 @@ sap.ui.define([
|
|
|
241
242
|
|
|
242
243
|
var pView1 = XMLView.create({
|
|
243
244
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller04'>" +
|
|
244
|
-
|
|
245
|
-
}).then(function(oView){
|
|
245
|
+
"</mvc:View>"
|
|
246
|
+
}).then(function(oView) {
|
|
246
247
|
var pResult = oView.getController()._pFragment.then(function() {
|
|
247
248
|
// return so we can use it for a clean up check later!
|
|
248
249
|
return oView;
|
|
@@ -256,8 +257,8 @@ sap.ui.define([
|
|
|
256
257
|
|
|
257
258
|
var pView2 = XMLView.create({
|
|
258
259
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller04'>" +
|
|
259
|
-
|
|
260
|
-
}).then(function(oView){
|
|
260
|
+
"</mvc:View>"
|
|
261
|
+
}).then(function(oView) {
|
|
261
262
|
return oView.getController()._pFragment.then(function() {
|
|
262
263
|
assert.ok(oView.byId("xmlViewInsideFragment"), "Nested view added to dependents");
|
|
263
264
|
assert.ok(oView.getDependents().length === 1, "View has 1 dependent");
|
|
@@ -279,15 +280,15 @@ sap.ui.define([
|
|
|
279
280
|
});
|
|
280
281
|
});
|
|
281
282
|
|
|
282
|
-
QUnit.test("Controller.loadFragment - owner component set correctly", function(assert){
|
|
283
|
+
QUnit.test("Controller.loadFragment - owner component set correctly", function(assert) {
|
|
283
284
|
assert.expect(1);
|
|
284
285
|
|
|
285
|
-
var oComponent = new Component({id: "myComponent"});
|
|
286
|
+
var oComponent = new Component({ id: "myComponent" });
|
|
286
287
|
var pFragmentReady;
|
|
287
288
|
|
|
288
289
|
sap.ui.define("my/Controller05.controller", function() {
|
|
289
290
|
return Controller.extend("my.Controller05", {
|
|
290
|
-
onInit: function(){
|
|
291
|
+
onInit: function() {
|
|
291
292
|
pFragmentReady = new Promise(function(res, rej) {
|
|
292
293
|
this.loadFragment({
|
|
293
294
|
name: "testdata.fragments.XMLView",
|
|
@@ -304,8 +305,8 @@ sap.ui.define([
|
|
|
304
305
|
return oComponent.runAsOwner(function() {
|
|
305
306
|
return XMLView.create({
|
|
306
307
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller05'>" +
|
|
307
|
-
|
|
308
|
-
}).then(function(oView){
|
|
308
|
+
"</mvc:View>"
|
|
309
|
+
}).then(function(oView) {
|
|
309
310
|
return pFragmentReady.then(function() {
|
|
310
311
|
assert.equal(oComponent, Component.getOwnerComponentFor(oView.getDependents()[0]), "Owner component set cortrectly for fragment");
|
|
311
312
|
oComponent.destroy();
|
|
@@ -314,14 +315,14 @@ sap.ui.define([
|
|
|
314
315
|
});
|
|
315
316
|
});
|
|
316
317
|
|
|
317
|
-
QUnit.test("Controller.loadFragment - add not to dependents", function(assert){
|
|
318
|
+
QUnit.test("Controller.loadFragment - add not to dependents", function(assert) {
|
|
318
319
|
assert.expect(1);
|
|
319
320
|
|
|
320
321
|
var pFragmentReady;
|
|
321
322
|
|
|
322
323
|
sap.ui.define("my/Controller06.controller", function() {
|
|
323
324
|
return Controller.extend("my.Controller06", {
|
|
324
|
-
onInit: function(){
|
|
325
|
+
onInit: function() {
|
|
325
326
|
pFragmentReady = new Promise(function(res, rej) {
|
|
326
327
|
this.loadFragment({
|
|
327
328
|
name: "testdata.fragments.XMLView",
|
|
@@ -337,8 +338,8 @@ sap.ui.define([
|
|
|
337
338
|
|
|
338
339
|
return XMLView.create({
|
|
339
340
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller06'>" +
|
|
340
|
-
|
|
341
|
-
}).then(function(oView){
|
|
341
|
+
"</mvc:View>"
|
|
342
|
+
}).then(function(oView) {
|
|
342
343
|
return pFragmentReady.then(function() {
|
|
343
344
|
assert.equal(oView.getDependents().length, 0, "Fragment is not added to the dependents aggregation of the view");
|
|
344
345
|
oView.destroy();
|
|
@@ -346,14 +347,14 @@ sap.ui.define([
|
|
|
346
347
|
});
|
|
347
348
|
});
|
|
348
349
|
|
|
349
|
-
QUnit.test("Controller.loadFragment - no fragment ID and no autoPrefixId", function(assert){
|
|
350
|
+
QUnit.test("Controller.loadFragment - no fragment ID and no autoPrefixId", function(assert) {
|
|
350
351
|
assert.expect(2);
|
|
351
352
|
|
|
352
353
|
var pFragmentReady;
|
|
353
354
|
|
|
354
355
|
sap.ui.define("my/Controller07.controller", function() {
|
|
355
356
|
return Controller.extend("my.Controller07", {
|
|
356
|
-
onInit: function(){
|
|
357
|
+
onInit: function() {
|
|
357
358
|
pFragmentReady = new Promise(function(res, rej) {
|
|
358
359
|
this.loadFragment({
|
|
359
360
|
name: "testdata.fragments.XMLView",
|
|
@@ -369,8 +370,8 @@ sap.ui.define([
|
|
|
369
370
|
|
|
370
371
|
return XMLView.create({
|
|
371
372
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller07'>" +
|
|
372
|
-
|
|
373
|
-
}).then(function(oView){
|
|
373
|
+
"</mvc:View>"
|
|
374
|
+
}).then(function(oView) {
|
|
374
375
|
return pFragmentReady.then(function() {
|
|
375
376
|
assert.ok(Element.getElementById("xmlViewInsideFragment"), "Fragment content is not prefixed by any ID.");
|
|
376
377
|
assert.notOk(oView.byId("xmlViewInsideFragment"), "Fragment content is not prefixed by the view ID.");
|
|
@@ -379,14 +380,14 @@ sap.ui.define([
|
|
|
379
380
|
});
|
|
380
381
|
});
|
|
381
382
|
|
|
382
|
-
QUnit.test("Controller.loadFragment - fragment ID but no autoPrefixId", function(assert){
|
|
383
|
+
QUnit.test("Controller.loadFragment - fragment ID but no autoPrefixId", function(assert) {
|
|
383
384
|
assert.expect(2);
|
|
384
385
|
|
|
385
386
|
var pFragmentReady;
|
|
386
387
|
|
|
387
388
|
sap.ui.define("my/Controller08.controller", function() {
|
|
388
389
|
return Controller.extend("my.Controller08", {
|
|
389
|
-
onInit: function(){
|
|
390
|
+
onInit: function() {
|
|
390
391
|
pFragmentReady = new Promise(function(res, rej) {
|
|
391
392
|
this.loadFragment({
|
|
392
393
|
name: "testdata.fragments.XMLView",
|
|
@@ -403,8 +404,8 @@ sap.ui.define([
|
|
|
403
404
|
|
|
404
405
|
return XMLView.create({
|
|
405
406
|
definition: "<mvc:View xmlns:mvc='sap.ui.core.mvc' controllerName='my.Controller08'>" +
|
|
406
|
-
|
|
407
|
-
}).then(function(oView){
|
|
407
|
+
"</mvc:View>"
|
|
408
|
+
}).then(function(oView) {
|
|
408
409
|
return pFragmentReady.then(function() {
|
|
409
410
|
assert.ok(Element.getElementById("myFragment--xmlViewInsideFragment"), "Fragment content is prefixed by the given ID.");
|
|
410
411
|
assert.notOk(oView.byId("myFragment--xmlViewInsideFragment"), "Fragment content is not prefixed by the view ID.");
|
|
@@ -412,4 +413,58 @@ sap.ui.define([
|
|
|
412
413
|
});
|
|
413
414
|
});
|
|
414
415
|
});
|
|
415
|
-
|
|
416
|
+
|
|
417
|
+
QUnit.module("Controller Lifecycle-Hooks");
|
|
418
|
+
|
|
419
|
+
QUnit.test("Shouldn't return any values", async (assert) => {
|
|
420
|
+
const aPromises = [];
|
|
421
|
+
sap.ui.define("my/Controller09.controller", ["sap/ui/core/mvc/Controller"], function(Controller) {
|
|
422
|
+
return Controller.extend("my.Controller09", {
|
|
423
|
+
onInit: function() {
|
|
424
|
+
return "onInit returns a String value";
|
|
425
|
+
},
|
|
426
|
+
onExit: function() {
|
|
427
|
+
const oPromise = Promise.reject(new Error("onExit returns rejected Promise."));
|
|
428
|
+
aPromises.push(oPromise);
|
|
429
|
+
return oPromise;
|
|
430
|
+
},
|
|
431
|
+
onBeforeRendering: async function() {
|
|
432
|
+
const oPromise = Promise.resolve("async onBeforeRendering returns resolved Promise.");
|
|
433
|
+
aPromises.push(oPromise);
|
|
434
|
+
await oPromise;
|
|
435
|
+
},
|
|
436
|
+
onAfterRendering: async function() {
|
|
437
|
+
const oPromise = Promise.reject(new Error("async onAfterRendering returns rejected Promise."));
|
|
438
|
+
aPromises.push(oPromise);
|
|
439
|
+
await oPromise;
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
const oErrorLogSpy = sinon.spy(Log, "error");
|
|
444
|
+
const oView = await XMLView.create({
|
|
445
|
+
viewName: "example.mvc.asyncHooks"
|
|
446
|
+
});
|
|
447
|
+
assert.ok(oView, "View is created");
|
|
448
|
+
assert.ok(oErrorLogSpy.getCall(0).calledWith("[FUTURE FATAL] The registered Event Listener 'onInit' must not have a return value."), "Correct Fatal Log displayed");
|
|
449
|
+
|
|
450
|
+
// render view to enforce lifecycle-Hooks to be triggered
|
|
451
|
+
oView.placeAt("qunit-fixture");
|
|
452
|
+
await nextUIUpdate();
|
|
453
|
+
assert.ok(oView.getDomRef(), "View is rendered");
|
|
454
|
+
assert.ok(oErrorLogSpy.getCall(1).calledWith("[FUTURE FATAL] The registered Event Listener 'onBeforeRendering' must not have a return value."), "Correct Fatal Log displayed");
|
|
455
|
+
assert.ok(oErrorLogSpy.getCall(2).calledWith("[FUTURE FATAL] The registered Event Listener 'onAfterRendering' must not have a return value."), "Correct Fatal Log displayed");
|
|
456
|
+
|
|
457
|
+
oView.destroy();
|
|
458
|
+
assert.ok(oErrorLogSpy.getCall(3).calledWith("[FUTURE FATAL] The registered Event Listener 'onExit' must not have a return value."), "Correct Fatal Log displayed");
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @deprecated
|
|
462
|
+
*/
|
|
463
|
+
await (async () => {
|
|
464
|
+
await Promise.allSettled(aPromises);
|
|
465
|
+
assert.ok(oErrorLogSpy.getCall(4).calledWith("The registered Event Listener 'onAfterRendering' of 'my.Controller09' failed."), "Rejected Promise of 'onAfterRendering' hook should be handled and the correct error logged.");
|
|
466
|
+
assert.ok(oErrorLogSpy.getCall(5).calledWith("The registered Event Listener 'onExit' of 'my.Controller09' failed."), "Rejected Promise of 'onExit' hook should be handled and the correct error logged.");
|
|
467
|
+
})();
|
|
468
|
+
oErrorLogSpy.restore();
|
|
469
|
+
});
|
|
470
|
+
});
|
|
@@ -1386,19 +1386,29 @@ sap.ui.define([
|
|
|
1386
1386
|
});
|
|
1387
1387
|
|
|
1388
1388
|
//*********************************************************************************************
|
|
1389
|
+
[false, true].forEach(function (bWithCredentials) {
|
|
1389
1390
|
[false, true].forEach(function (bSuccess) {
|
|
1390
|
-
|
|
1391
|
+
const sTitle = "refreshSecurityToken, success=" + bSuccess + ", withCredentials="
|
|
1392
|
+
+ bWithCredentials;
|
|
1393
|
+
QUnit.test(sTitle, function (assert) {
|
|
1391
1394
|
var oError = {},
|
|
1392
1395
|
oPromise,
|
|
1393
1396
|
mHeaders = {},
|
|
1394
|
-
|
|
1397
|
+
oAjaxSettings = {
|
|
1398
|
+
headers : "~requestHeaders~",
|
|
1399
|
+
method : "HEAD"
|
|
1400
|
+
},
|
|
1395
1401
|
oRequestor = _Requestor.create("/Service/", oModelInterface, mHeaders,
|
|
1396
|
-
{"sap-client" : "123"}),
|
|
1402
|
+
{"sap-client" : "123"}, /*sODataVersion*/undefined, bWithCredentials),
|
|
1397
1403
|
oTokenRequiredResponse = {};
|
|
1398
1404
|
|
|
1405
|
+
if (bWithCredentials) {
|
|
1406
|
+
oAjaxSettings.xhrFields = {withCredentials : true};
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1399
1409
|
this.mock(Object).expects("assign").twice()
|
|
1400
1410
|
.withExactArgs({}, sinon.match.same(mHeaders), {"X-CSRF-Token" : "Fetch"})
|
|
1401
|
-
.returns(
|
|
1411
|
+
.returns("~requestHeaders~");
|
|
1402
1412
|
this.mock(_Helper).expects("createError")
|
|
1403
1413
|
.exactly(bSuccess ? 0 : 2)
|
|
1404
1414
|
.withExactArgs(sinon.match.same(oTokenRequiredResponse),
|
|
@@ -1406,10 +1416,7 @@ sap.ui.define([
|
|
|
1406
1416
|
.returns(oError);
|
|
1407
1417
|
|
|
1408
1418
|
this.mock(jQuery).expects("ajax").twice()
|
|
1409
|
-
.withExactArgs("/Service/?sap-client=123",
|
|
1410
|
-
headers : sinon.match.same(mRequestHeaders),
|
|
1411
|
-
method : "HEAD"
|
|
1412
|
-
}))
|
|
1419
|
+
.withExactArgs("/Service/?sap-client=123", oAjaxSettings)
|
|
1413
1420
|
.callsFake(function () {
|
|
1414
1421
|
var jqXHR;
|
|
1415
1422
|
|
|
@@ -1462,6 +1469,7 @@ sap.ui.define([
|
|
|
1462
1469
|
});
|
|
1463
1470
|
});
|
|
1464
1471
|
});
|
|
1472
|
+
});
|
|
1465
1473
|
|
|
1466
1474
|
//*********************************************************************************************
|
|
1467
1475
|
QUnit.test("refreshSecurityToken: keep fetching even if none is sent", function (assert) {
|
|
@@ -4383,28 +4391,35 @@ sap.ui.define([
|
|
|
4383
4391
|
});
|
|
4384
4392
|
|
|
4385
4393
|
//*****************************************************************************************
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4394
|
+
[false, true].forEach(function (bWithCredentials) {
|
|
4395
|
+
const sTitle = "setSessionContext: successful ping, bWithCredentials: " + bWithCredentials;
|
|
4396
|
+
QUnit.test(sTitle, function (assert) {
|
|
4397
|
+
var oAjaxSettings = {
|
|
4398
|
+
headers : {
|
|
4399
|
+
"SAP-ContextId" : "context"
|
|
4400
|
+
},
|
|
4401
|
+
method : "HEAD"
|
|
4402
|
+
},
|
|
4403
|
+
oExpectation,
|
|
4404
|
+
oRequestor = _Requestor.create(sServiceUrl, oModelInterface, {}, {"sap-client" : "120"},
|
|
4405
|
+
/*sODataVersion*/undefined, bWithCredentials);
|
|
4391
4406
|
|
|
4407
|
+
if (bWithCredentials) {
|
|
4408
|
+
oAjaxSettings.xhrFields = {withCredentials : true};
|
|
4409
|
+
}
|
|
4392
4410
|
oExpectation = this.mock(window).expects("setInterval")
|
|
4393
4411
|
.withExactArgs(sinon.match.func, 115000);
|
|
4394
4412
|
|
|
4395
4413
|
oRequestor.setSessionContext("context", "120");
|
|
4396
4414
|
|
|
4397
|
-
this.mock(jQuery).expects("ajax")
|
|
4398
|
-
|
|
4399
|
-
"SAP-ContextId" : "context"
|
|
4400
|
-
}),
|
|
4401
|
-
method : "HEAD"
|
|
4402
|
-
})
|
|
4415
|
+
this.mock(jQuery).expects("ajax")
|
|
4416
|
+
.withExactArgs(sServiceUrl + "?sap-client=120", oAjaxSettings)
|
|
4403
4417
|
.returns(createMock(assert, undefined, "OK", {}));
|
|
4404
4418
|
|
|
4405
4419
|
// code under test - call setInterval function
|
|
4406
4420
|
oExpectation.callArg(0);
|
|
4407
4421
|
});
|
|
4422
|
+
});
|
|
4408
4423
|
|
|
4409
4424
|
//*****************************************************************************************
|
|
4410
4425
|
[false, true].forEach(function (bErrorId) {
|