@openui5/sap.ui.core 1.112.2 → 1.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +102 -1
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +10 -4
- 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 +7 -7
- package/src/jquery.sap.trace.js +14 -14
- package/src/sap/base/Log.js +92 -8
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/config/MemoryConfigurationProvider.js +22 -0
- package/src/sap/base/config.js +54 -0
- package/src/sap/base/security/URLWhitelist.js +1 -1
- package/src/sap/base/util/Deferred.js +3 -2
- package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
- 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 +8 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/BindingParser.js +79 -18
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +15 -5
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +16 -13
- package/src/sap/ui/base/ManagedObjectMetadata.js +35 -35
- package/src/sap/ui/base/Metadata.js +23 -12
- 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 +4 -4
- package/src/sap/ui/core/Component.js +10 -7
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +3 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +104 -45
- package/src/sap/ui/core/Control.js +23 -6
- package/src/sap/ui/core/Core.js +36 -15
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomStyleClassSupport.js +5 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +19 -4
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +4 -4
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IconPool.js +17 -2
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +10 -2
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +28 -2
- 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 +2 -2
- package/src/sap/ui/core/LocaleData.js +87 -19
- package/src/sap/ui/core/Manifest.js +5 -5
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +34 -36
- package/src/sap/ui/core/RenderManager.js +8 -2
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/Rendering.js +2 -3
- package/src/sap/ui/core/ResizeHandler.js +2 -2
- 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 +9 -2
- package/src/sap/ui/core/UIComponent.js +16 -13
- 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 +30 -6
- package/src/sap/ui/core/cache/CacheManager.js +1 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
- package/src/sap/ui/core/date/CalendarUtils.js +14 -26
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +32 -0
- package/src/sap/ui/core/date/UI5Date.js +14 -8
- package/src/sap/ui/core/date/UniversalDate.js +15 -53
- package/src/sap/ui/core/date/UniversalDateUtils.js +4 -4
- package/src/sap/ui/core/date/_Calendars.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 +166 -59
- package/src/sap/ui/core/format/NumberFormat.js +40 -5
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +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/messagebundle.properties +2 -0
- package/src/sap/ui/core/messagebundle_ar.properties +2 -1
- package/src/sap/ui/core/messagebundle_bg.properties +1 -0
- package/src/sap/ui/core/messagebundle_ca.properties +1 -0
- package/src/sap/ui/core/messagebundle_cs.properties +2 -1
- package/src/sap/ui/core/messagebundle_cy.properties +2 -1
- package/src/sap/ui/core/messagebundle_da.properties +2 -1
- package/src/sap/ui/core/messagebundle_de.properties +2 -1
- package/src/sap/ui/core/messagebundle_el.properties +2 -1
- package/src/sap/ui/core/messagebundle_en.properties +2 -1
- package/src/sap/ui/core/messagebundle_en_GB.properties +2 -1
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/core/messagebundle_es.properties +5 -4
- package/src/sap/ui/core/messagebundle_es_MX.properties +2 -1
- package/src/sap/ui/core/messagebundle_et.properties +2 -1
- package/src/sap/ui/core/messagebundle_fi.properties +2 -1
- package/src/sap/ui/core/messagebundle_fr.properties +2 -1
- package/src/sap/ui/core/messagebundle_fr_CA.properties +2 -1
- package/src/sap/ui/core/messagebundle_hi.properties +2 -1
- package/src/sap/ui/core/messagebundle_hr.properties +2 -1
- package/src/sap/ui/core/messagebundle_hu.properties +2 -1
- package/src/sap/ui/core/messagebundle_id.properties +2 -1
- package/src/sap/ui/core/messagebundle_it.properties +2 -1
- package/src/sap/ui/core/messagebundle_iw.properties +2 -1
- package/src/sap/ui/core/messagebundle_ja.properties +1 -0
- package/src/sap/ui/core/messagebundle_kk.properties +2 -1
- package/src/sap/ui/core/messagebundle_ko.properties +2 -1
- package/src/sap/ui/core/messagebundle_lt.properties +2 -1
- package/src/sap/ui/core/messagebundle_lv.properties +2 -1
- package/src/sap/ui/core/messagebundle_ms.properties +2 -1
- package/src/sap/ui/core/messagebundle_nl.properties +2 -1
- package/src/sap/ui/core/messagebundle_no.properties +2 -1
- package/src/sap/ui/core/messagebundle_pl.properties +2 -1
- package/src/sap/ui/core/messagebundle_pt.properties +2 -1
- package/src/sap/ui/core/messagebundle_pt_PT.properties +2 -1
- package/src/sap/ui/core/messagebundle_ro.properties +2 -1
- package/src/sap/ui/core/messagebundle_ru.properties +3 -2
- package/src/sap/ui/core/messagebundle_sh.properties +2 -1
- package/src/sap/ui/core/messagebundle_sk.properties +2 -1
- package/src/sap/ui/core/messagebundle_sl.properties +2 -1
- package/src/sap/ui/core/messagebundle_sv.properties +2 -1
- package/src/sap/ui/core/messagebundle_th.properties +2 -1
- package/src/sap/ui/core/messagebundle_tr.properties +2 -1
- package/src/sap/ui/core/messagebundle_uk.properties +2 -1
- package/src/sap/ui/core/messagebundle_vi.properties +2 -1
- package/src/sap/ui/core/messagebundle_zh_CN.properties +2 -1
- package/src/sap/ui/core/messagebundle_zh_TW.properties +2 -1
- package/src/sap/ui/core/mvc/Controller.js +2 -3
- package/src/sap/ui/core/mvc/ControllerExtension.js +1 -1
- 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 +24 -17
- package/src/sap/ui/core/mvc/XMLView.js +2 -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/Route.js +30 -22
- package/src/sap/ui/core/routing/Router.js +5 -3
- package/src/sap/ui/core/routing/Target.js +170 -3
- package/src/sap/ui/core/routing/Targets.js +5 -214
- package/src/sap/ui/core/routing/Views.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/controls/InteractionTree.js +5 -3
- package/src/sap/ui/core/support/plugins/Breakpoint.js +2 -2
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +6 -4
- 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 +4 -3
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +4358 -78
- package/src/sap/ui/core/themes/base/global.less +114 -8
- package/src/sap/ui/core/themes/sap_hcb/global.less +114 -8
- package/src/sap/ui/core/theming/Parameters.js +10 -2
- package/src/sap/ui/core/theming/ThemeManager.js +16 -12
- 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/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/dom/includeScript.js +3 -3
- package/src/sap/ui/dom/includeStylesheet.js +3 -3
- package/src/sap/ui/events/ControlEvents.js +2 -2
- package/src/sap/ui/events/PseudoEvents.js +4 -2
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.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/ManagedObjectBindingSupport.js +19 -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 +7 -3
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/base/ManagedObjectModel.js +12 -4
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +2 -0
- 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/ODataTreeBindingFlat.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 +67 -21
- package/src/sap/ui/model/odata/type/DateTime.js +51 -8
- package/src/sap/ui/model/odata/type/DateTimeBase.js +55 -26
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +42 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +37 -21
- package/src/sap/ui/model/odata/type/Decimal.js +28 -33
- package/src/sap/ui/model/odata/type/Double.js +21 -26
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +15 -20
- 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 +16 -21
- package/src/sap/ui/model/odata/type/ODataType.js +33 -6
- 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 +20 -25
- 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 +91 -21
- package/src/sap/ui/model/odata/type/TimeOfDay.js +70 -24
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +72 -28
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +5 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +29 -10
- package/src/sap/ui/model/odata/v2/ODataModel.js +92 -36
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -1
- package/src/sap/ui/model/odata/v4/Context.js +36 -21
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -21
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +7 -25
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +208 -74
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +4 -3
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +42 -28
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +100 -21
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +99 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +75 -2
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +6 -0
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +3 -0
- 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 +15 -1
- package/src/sap/ui/model/type/DateInterval.js +15 -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/performance/Measurement.js +9 -9
- package/src/sap/ui/performance/trace/Interaction.js +50 -4
- package/src/sap/ui/performance/trace/initTraces.js +20 -14
- package/src/sap/ui/qunit/qunit-coverage-istanbul.js +180 -0
- package/src/sap/ui/qunit/qunit-coverage.js +9 -4
- 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/Opa.js +54 -21
- package/src/sap/ui/test/Opa5.js +181 -131
- package/src/sap/ui/test/OpaBuilder.js +106 -73
- package/src/sap/ui/test/OpaPlugin.js +27 -28
- package/src/sap/ui/test/PageObjectFactory.js +17 -7
- package/src/sap/ui/test/RecordReplay.js +7 -3
- package/src/sap/ui/test/_ParameterValidator.js +3 -3
- package/src/sap/ui/test/_UsageReport.js +3 -3
- package/src/sap/ui/test/_ValidationParameters.js +8 -10
- package/src/sap/ui/test/actions/Action.js +3 -3
- package/src/sap/ui/test/actions/EnterText.js +3 -2
- package/src/sap/ui/test/actions/Press.js +4 -4
- package/src/sap/ui/test/autowaiter/WaiterBase.js +5 -3
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +6 -3
- package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +3 -3
- package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +3 -3
- package/src/sap/ui/test/autowaiter/_fetchWaiter.js +73 -0
- package/src/sap/ui/test/autowaiter/_moduleWaiter.js +2 -2
- package/src/sap/ui/test/autowaiter/_promiseWaiter.js +4 -4
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +2 -2
- package/src/sap/ui/test/autowaiter/_timeoutWaiter.js +4 -4
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +3 -1
- package/src/sap/ui/test/gherkin/GherkinTestGenerator.js +424 -423
- package/src/sap/ui/test/gherkin/StepDefinitions.js +160 -158
- package/src/sap/ui/test/gherkin/dataTableUtils.js +387 -385
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +188 -189
- package/src/sap/ui/test/gherkin/qUnitTestHarness.js +74 -71
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +195 -193
- package/src/sap/ui/test/launchers/componentLauncher.js +11 -9
- package/src/sap/ui/test/launchers/iFrameLauncher.js +34 -20
- package/src/sap/ui/test/matchers/Descendant.js +1 -1
- package/src/sap/ui/test/matchers/Interactable.js +2 -2
- package/src/sap/ui/test/matchers/LabelFor.js +2 -2
- package/src/sap/ui/test/matchers/MatcherFactory.js +10 -9
- package/src/sap/ui/test/matchers/Properties.js +5 -4
- package/src/sap/ui/test/matchers/Sibling.js +1 -1
- package/src/sap/ui/test/matchers/matchers.js +35 -3
- package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -2
- package/src/sap/ui/test/qunitPause.js +3 -2
- package/src/sap/ui/test/starter/_configureLoader.js +7 -5
- package/src/sap/ui/test/starter/_setupAndStart.js +113 -27
- package/src/sap/ui/test/starter/_utils.js +4 -1
- package/src/sap/ui/util/Mobile.js +8 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +661 -49
- package/src/ui5loader.js +18 -5
|
@@ -178,7 +178,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
178
178
|
* @param {string} sId ID of the measurement
|
|
179
179
|
* @param {string} sInfo Info for the measurement
|
|
180
180
|
* @param {string | string[]} [aCategories="javascript"] An optional list of categories for the measure
|
|
181
|
-
* @return {
|
|
181
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean|undefined} current measurement containing id, info and start-timestamp (false if error)
|
|
182
182
|
* @public
|
|
183
183
|
* @name module:sap/ui/performance/Measurement.start
|
|
184
184
|
* @function
|
|
@@ -216,7 +216,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
216
216
|
* Pauses a performance measure.
|
|
217
217
|
*
|
|
218
218
|
* @param {string} sId ID of the measurement
|
|
219
|
-
* @return {
|
|
219
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean|undefined} current measurement containing id, info and start-timestamp, pause-timestamp (false if error)
|
|
220
220
|
* @public
|
|
221
221
|
* @name module:sap/ui/performance/Measurement.pause
|
|
222
222
|
* @function
|
|
@@ -256,7 +256,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
256
256
|
* Resumes a performance measure.
|
|
257
257
|
*
|
|
258
258
|
* @param {string} sId ID of the measurement
|
|
259
|
-
* @return {
|
|
259
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean|undefined} current measurement containing id, info and start-timestamp, resume-timestamp (false if error)
|
|
260
260
|
* @public
|
|
261
261
|
* @name module:sap/ui/performance/Measurement.resume
|
|
262
262
|
* @function
|
|
@@ -287,7 +287,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
287
287
|
* Ends a performance measure.
|
|
288
288
|
*
|
|
289
289
|
* @param {string} sId ID of the measurement
|
|
290
|
-
* @return {
|
|
290
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean|undefined} current measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error)
|
|
291
291
|
* @public
|
|
292
292
|
* @name module:sap/ui/performance/Measurement.end
|
|
293
293
|
* @function
|
|
@@ -372,7 +372,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
372
372
|
* @param {int} iTime time in milliseconds
|
|
373
373
|
* @param {int} iDuration effective time in milliseconds
|
|
374
374
|
* @param {string | string[]} [aCategories="javascript"] An optional list of categories for the measure
|
|
375
|
-
* @return {
|
|
375
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean|undefined} current measurement containing id, info and start-timestamp, end-timestamp, time, duration, categories (false if error)
|
|
376
376
|
* @public
|
|
377
377
|
* @name module:sap/ui/performance/Measurement.add
|
|
378
378
|
* @function
|
|
@@ -406,7 +406,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
406
406
|
* @param {string} sId ID of the measurement
|
|
407
407
|
* @param {string} sInfo Info for the measurement
|
|
408
408
|
* @param {string | string[]} [aCategories="javascript"] An optional list of categories for the measure
|
|
409
|
-
* @return {
|
|
409
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean|undefined} current measurement containing id, info and start-timestamp (false if error)
|
|
410
410
|
* @public
|
|
411
411
|
* @name module:sap/ui/performance/Measurement.average
|
|
412
412
|
* @function
|
|
@@ -441,7 +441,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
441
441
|
* Gets a performance measure.
|
|
442
442
|
*
|
|
443
443
|
* @param {string} sId ID of the measurement
|
|
444
|
-
* @return {module:sap/ui/performance/Measurement.Entry} current measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error)
|
|
444
|
+
* @return {module:sap/ui/performance/Measurement.Entry|boolean} current measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error)
|
|
445
445
|
* @public
|
|
446
446
|
* @name module:sap/ui/performance/Measurement.getMeasurement
|
|
447
447
|
* @function
|
|
@@ -466,7 +466,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
466
466
|
* Gets all performance measurements.
|
|
467
467
|
*
|
|
468
468
|
* @param {boolean} [bCompleted] Whether only completed measurements should be returned, if explicitly set to false only incomplete measurements are returned
|
|
469
|
-
* @return {module:sap/ui/performance/Measurement.Entry} current array with measurements containing id, info and start-timestamp, end-timestamp, time, duration, categories
|
|
469
|
+
* @return {module:sap/ui/performance/Measurement.Entry[]} current array with measurements containing id, info and start-timestamp, end-timestamp, time, duration, categories
|
|
470
470
|
* @public
|
|
471
471
|
* @name module:sap/ui/performance/Measurement.getAllMeasurements
|
|
472
472
|
* @function
|
|
@@ -487,7 +487,7 @@ sap.ui.define(['sap/base/Log', 'sap/ui/thirdparty/URI', 'sap/base/util/now'
|
|
|
487
487
|
* return oMeasurement.duration > 50;
|
|
488
488
|
* }</code>
|
|
489
489
|
*
|
|
490
|
-
* @param {function} [fnFilter] a filter function that returns true if the passed measurement should be added to the result
|
|
490
|
+
* @param {function(module:sap/ui/performance/Measurement.Entry)} [fnFilter] a filter function that returns true if the passed measurement should be added to the result
|
|
491
491
|
* @param {boolean} [bCompleted] Optional parameter to determine if either completed or incomplete measurements should be returned (both if not set or undefined)
|
|
492
492
|
* @param {string[]} [aCategories] The function returns only measurements which match these specified categories
|
|
493
493
|
*
|
|
@@ -50,6 +50,52 @@ sap.ui.define([
|
|
|
50
50
|
return str.trim();
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The SAP Statistics for OData
|
|
55
|
+
*
|
|
56
|
+
* @typedef {object} module:sap/ui/performance/trace/Interaction.SAPStatistics
|
|
57
|
+
* @public
|
|
58
|
+
*
|
|
59
|
+
* @property {string} url The url of the response
|
|
60
|
+
* @property {string} statistics The response header under the key "sap-statistics"
|
|
61
|
+
* @property {PerformanceResourceTiming} timing The last performance resource timing
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Interaction Entry
|
|
66
|
+
*
|
|
67
|
+
* @typedef {object} module:sap/ui/performance/trace/Interaction.Entry
|
|
68
|
+
* @public
|
|
69
|
+
*
|
|
70
|
+
* @property {string} event The event which triggered the interaction. The default value is "startup".
|
|
71
|
+
* @property {string} trigger The control which triggered the interaction.
|
|
72
|
+
* @property {string} component The identifier of the component or app that is associated with the
|
|
73
|
+
* interaction.
|
|
74
|
+
* @property {string} appVersion The application version as from app descriptor
|
|
75
|
+
* @property {float} start The start timestamp of the interaction which is initially set to the
|
|
76
|
+
* <code>fetchStart</code>
|
|
77
|
+
* @property {float} end The end timestamp of the interaction
|
|
78
|
+
* @property {float} navigation The sum over all navigation times
|
|
79
|
+
* @property {float} roundtrip The time from first request sent to last received response end - without
|
|
80
|
+
* gaps and ignored overlap
|
|
81
|
+
* @property {float} processing The client processing time
|
|
82
|
+
* @property {float} duration The interaction duration
|
|
83
|
+
* @property {Array<PerformanceResourceTiming>} requests The Performance API requests during interaction
|
|
84
|
+
* @property {Array<module:sap/ui/performance/Measurement.Entry>} measurements The Performance
|
|
85
|
+
* measurements
|
|
86
|
+
* @property {Array<module:sap/ui/performance/trace/Interaction.SAPStatistics>} sapStatistics The SAP
|
|
87
|
+
* Statistics for OData
|
|
88
|
+
* @property {float} requestTime The sum over all requests in the interaction
|
|
89
|
+
* @property {float} networkTime The request time minus server time from the header
|
|
90
|
+
* @property {int} bytesSent The sum over all requests bytes
|
|
91
|
+
* @property {int} bytesReceived The sum over all responses bytes
|
|
92
|
+
* @property {"X"|""} requestCompression It's set with value "X" by default When compression does not
|
|
93
|
+
* match SAP rules, we report an empty string.
|
|
94
|
+
* @property {float} busyDuration The sum of the global busy indicator duration during the interaction
|
|
95
|
+
* @property {string} id The ID of the interaction
|
|
96
|
+
* @property {string} passportAction The default PassportAction for startup
|
|
97
|
+
*/
|
|
98
|
+
|
|
53
99
|
function createMeasurement(iTime) {
|
|
54
100
|
return {
|
|
55
101
|
event: "startup", // event which triggered interaction - default is startup interaction
|
|
@@ -65,13 +111,13 @@ sap.ui.define([
|
|
|
65
111
|
requests: [], // Performance API requests during interaction
|
|
66
112
|
measurements: [], // Measurements
|
|
67
113
|
sapStatistics: [], // SAP Statistics for OData
|
|
68
|
-
requestTime: 0, //
|
|
114
|
+
requestTime: 0, // sum over all requests in the interaction (oPendingInteraction.requests[0].responseEnd-oPendingInteraction.requests[0].requestStart)
|
|
69
115
|
networkTime: 0, // request time minus server time from the header
|
|
70
116
|
bytesSent: 0, // sum over all requests bytes
|
|
71
117
|
bytesReceived: 0, // sum over all response bytes
|
|
72
118
|
requestCompression: "X", // ok per default, if compression does not match SAP rules we report an empty string
|
|
73
119
|
busyDuration: 0, // summed GlobalBusyIndicator duration during this interaction
|
|
74
|
-
id: uid(), //Interaction
|
|
120
|
+
id: uid(), //Interaction ID
|
|
75
121
|
passportAction: "undetermined_startup_0" //default PassportAction for startup
|
|
76
122
|
};
|
|
77
123
|
}
|
|
@@ -392,7 +438,7 @@ sap.ui.define([
|
|
|
392
438
|
* Gets all interaction measurements.
|
|
393
439
|
*
|
|
394
440
|
* @param {boolean} bFinalize finalize the current pending interaction so that it is contained in the returned array
|
|
395
|
-
* @return {
|
|
441
|
+
* @return {Array<module:sap/ui/performance/trace/Interaction.Entry>} all interaction measurements
|
|
396
442
|
*
|
|
397
443
|
* @static
|
|
398
444
|
* @public
|
|
@@ -415,7 +461,7 @@ sap.ui.define([
|
|
|
415
461
|
* return InteractionMeasurement.duration > 0
|
|
416
462
|
* }</code>
|
|
417
463
|
* @param {function} fnFilter a filter function that returns true if the passed measurement should be added to the result
|
|
418
|
-
* @return {
|
|
464
|
+
* @return {Array<module:sap/ui/performance/trace/Interaction.Entry>} all interaction measurements passing the filter function successfully
|
|
419
465
|
*
|
|
420
466
|
* @static
|
|
421
467
|
* @public
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
sap.ui.define([
|
|
11
11
|
"sap/ui/performance/trace/FESR",
|
|
12
12
|
"sap/base/Log",
|
|
13
|
-
"sap/base/
|
|
14
|
-
], function(FESR, Log,
|
|
13
|
+
"sap/base/config"
|
|
14
|
+
], function(FESR, Log, BaseConfig) {
|
|
15
15
|
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
@@ -25,16 +25,18 @@ sap.ui.define([
|
|
|
25
25
|
* @ui5-restricted sap.ui.core
|
|
26
26
|
*/
|
|
27
27
|
return function() {
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
var sUrl,
|
|
29
|
+
bActive = false,
|
|
30
|
+
sFesr = BaseConfig.get({
|
|
31
|
+
name: "sapUiFesr",
|
|
32
|
+
type: BaseConfig.Type.String,
|
|
33
|
+
external: true,
|
|
34
|
+
freeze: true
|
|
35
|
+
});
|
|
33
36
|
|
|
34
|
-
if (
|
|
35
|
-
bActive =
|
|
36
|
-
|
|
37
|
-
sUrl = ["true", "false", "x", "X", undefined].indexOf(sUriParam) === -1 ? sUriParam : sUrl;
|
|
37
|
+
if (sFesr) {
|
|
38
|
+
bActive = sFesr != "false";
|
|
39
|
+
sUrl = ["true", "false", "x", "X", undefined].indexOf(sFesr) === -1 ? sFesr : undefined;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
if (typeof window.performance.getEntriesByType === "function") {
|
|
@@ -43,10 +45,14 @@ sap.ui.define([
|
|
|
43
45
|
Log.debug("FESR is not supported in clients without support of window.Performance extensions.");
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
// TODO this should be part of a Configuration
|
|
47
48
|
// *********** Include E2E-Trace Scripts *************
|
|
48
|
-
if (
|
|
49
|
+
if (BaseConfig.get({
|
|
50
|
+
name: "sapUiXxE2eTrace",
|
|
51
|
+
type: BaseConfig.Type.Boolean,
|
|
52
|
+
external: true,
|
|
53
|
+
freeze: true
|
|
54
|
+
})) {
|
|
49
55
|
sap.ui.require(["sap/ui/core/support/trace/E2eTraceLib"]);
|
|
50
56
|
}
|
|
51
57
|
};
|
|
52
|
-
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
/* global QUnit */
|
|
7
|
+
(function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
if (typeof QUnit === "undefined") {
|
|
11
|
+
throw new Error("qunit-coverage-istanbul.js: QUnit is not loaded yet!");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Functions taken from blanket.js - v1.1.5 (sap/ui/thirdparty/blanket.js)
|
|
15
|
+
// BEGIN: Copy from blanket.js
|
|
16
|
+
function normalizeBackslashes(str) {
|
|
17
|
+
return str.replace(/\\/g, '/');
|
|
18
|
+
}
|
|
19
|
+
function matchPatternAttribute(filename,pattern){
|
|
20
|
+
if (typeof pattern === 'string'){
|
|
21
|
+
if (pattern.indexOf("[") === 0){
|
|
22
|
+
//treat as array
|
|
23
|
+
var pattenArr = pattern.slice(1,pattern.length - 1).split(",");
|
|
24
|
+
return pattenArr.some(function(elem){
|
|
25
|
+
return matchPatternAttribute(filename,normalizeBackslashes(elem.slice(1,-1)));
|
|
26
|
+
});
|
|
27
|
+
} else if ( pattern.indexOf("//") === 0){
|
|
28
|
+
var ex = pattern.slice(2,pattern.lastIndexOf('/'));
|
|
29
|
+
var mods = pattern.slice(pattern.lastIndexOf('/') + 1);
|
|
30
|
+
var regex = new RegExp(ex,mods);
|
|
31
|
+
return regex.test(filename);
|
|
32
|
+
} else if (pattern.indexOf("#") === 0){
|
|
33
|
+
return window[pattern.slice(1)].call(window,filename);
|
|
34
|
+
} else {
|
|
35
|
+
return filename.indexOf(normalizeBackslashes(pattern)) > -1;
|
|
36
|
+
}
|
|
37
|
+
} else if ( pattern instanceof Array ){
|
|
38
|
+
return pattern.some(function(elem){
|
|
39
|
+
return matchPatternAttribute(filename,elem);
|
|
40
|
+
});
|
|
41
|
+
} else if (pattern instanceof RegExp){
|
|
42
|
+
return pattern.test(filename);
|
|
43
|
+
} else if (typeof pattern === "function"){
|
|
44
|
+
return pattern.call(window,filename);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// END: Copy from blanket.js
|
|
48
|
+
|
|
49
|
+
// set a hook for client-side coverage on window object
|
|
50
|
+
window["sap-ui-qunit-coverage"] = "client";
|
|
51
|
+
|
|
52
|
+
// client-side instrument filter options (data-attributes of qunit-coverage-istanbul script tag)
|
|
53
|
+
var filters;
|
|
54
|
+
var oScript = document.currentScript;
|
|
55
|
+
function getFilters() {
|
|
56
|
+
var sFilterAttr, sAntiFilterAttr;
|
|
57
|
+
|
|
58
|
+
// Cache and only read once
|
|
59
|
+
if (filters) {
|
|
60
|
+
return filters;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (oScript) {
|
|
64
|
+
// Set custom client-side instrument filter (from script attributes)
|
|
65
|
+
if (oScript.hasAttribute("data-sap-ui-cover-only")) {
|
|
66
|
+
sFilterAttr = oScript.getAttribute("data-sap-ui-cover-only");
|
|
67
|
+
}
|
|
68
|
+
if (oScript.hasAttribute("data-sap-ui-cover-never")) {
|
|
69
|
+
sAntiFilterAttr = oScript.getAttribute("data-sap-ui-cover-never");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
filters = {filter: sFilterAttr, antiFilter: sAntiFilterAttr};
|
|
74
|
+
return filters;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function shouldBeInstrumented(sModuleName) {
|
|
78
|
+
var appliedFilters = getFilters(),
|
|
79
|
+
sFilterAttr = appliedFilters.filter,
|
|
80
|
+
sAntiFilterAttr = appliedFilters.antiFilter;
|
|
81
|
+
|
|
82
|
+
if (typeof sAntiFilterAttr !== "undefined" && matchPatternAttribute(sModuleName, sAntiFilterAttr)) {
|
|
83
|
+
// NEVER INSTRUMENT (excluded)
|
|
84
|
+
return false;
|
|
85
|
+
} else if (typeof sFilterAttr === "undefined" || matchPatternAttribute(sModuleName, sFilterAttr)) {
|
|
86
|
+
// INSTRUMENT (included)
|
|
87
|
+
return true;
|
|
88
|
+
} else {
|
|
89
|
+
// DONT INSTRUMENT (not explicitly excluded / included)
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function appendUrlParameter(sUrl) {
|
|
95
|
+
var oUrl = new URL(sUrl, document.baseURI);
|
|
96
|
+
oUrl.searchParams.set("instrument", "true");
|
|
97
|
+
return oUrl.toString();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// check for coverage being active or not
|
|
101
|
+
if (QUnit.urlParams.coverage) {
|
|
102
|
+
|
|
103
|
+
var fnSetAttributeOrig = HTMLScriptElement.prototype.setAttribute;
|
|
104
|
+
HTMLScriptElement.prototype.setAttribute = function(sName, sValue) {
|
|
105
|
+
if (sName === "data-sap-ui-module" && shouldBeInstrumented(sValue || "")) {
|
|
106
|
+
this.src = appendUrlParameter(this.src);
|
|
107
|
+
}
|
|
108
|
+
fnSetAttributeOrig.apply(this, arguments);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var fnXhrOpenOrig = XMLHttpRequest.prototype.open;
|
|
112
|
+
XMLHttpRequest.prototype.open = function(sMethod, sUrl) {
|
|
113
|
+
if (
|
|
114
|
+
typeof sap !== "undefined" && sap.ui && sap.ui.loader &&
|
|
115
|
+
sUrl && sUrl.endsWith(".js") && shouldBeInstrumented(sap.ui.loader._.guessResourceName(sUrl) || "")
|
|
116
|
+
) {
|
|
117
|
+
arguments[1] = appendUrlParameter(sUrl);
|
|
118
|
+
}
|
|
119
|
+
fnXhrOpenOrig.apply(this, arguments);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// Build the layout
|
|
123
|
+
QUnit.done(function () {
|
|
124
|
+
// Do not try to create a report when the page is embed into an IFrame
|
|
125
|
+
// The IFrame has the coverage data and could handle it on its own
|
|
126
|
+
if (window.top !== window){
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
sap.ui.require(["sap/base/util/fetch"], function (fetch) {
|
|
130
|
+
fetch("/.ui5/coverage/report", {
|
|
131
|
+
method: "POST",
|
|
132
|
+
body: JSON.stringify(window.top.__coverage__),
|
|
133
|
+
headers: {
|
|
134
|
+
"Content-Type": "application/json"
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
.then(function (pResponse) {
|
|
138
|
+
return pResponse.json();
|
|
139
|
+
})
|
|
140
|
+
.then(function (oData) {
|
|
141
|
+
var aReports = oData.availableReports;
|
|
142
|
+
var oHTMLReport = aReports.filter(function (oCurReport) {
|
|
143
|
+
// HTML is the only one that make sense and
|
|
144
|
+
// provides understandable information
|
|
145
|
+
return oCurReport.report === "html";
|
|
146
|
+
})[0];
|
|
147
|
+
|
|
148
|
+
if (!oHTMLReport) { // Do not render reports if HTML or lcov are not provided
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
var body = document.body;
|
|
153
|
+
var oFrameEl = document.createElement("iframe");
|
|
154
|
+
oFrameEl.src = "/.ui5/coverage/report/" + oHTMLReport.destination;
|
|
155
|
+
oFrameEl.style.border = "none";
|
|
156
|
+
oFrameEl.style.width = "100%";
|
|
157
|
+
oFrameEl.style.height = "100vh";
|
|
158
|
+
oFrameEl.sandbox = "allow-scripts";
|
|
159
|
+
|
|
160
|
+
body.appendChild(oFrameEl);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// add a QUnit configuration option in the Toolbar to enable/disable
|
|
167
|
+
// client-side instrumentation (done manually because there might be a
|
|
168
|
+
// case where the setup does not use _setupAndStart.js)
|
|
169
|
+
var bHasCoverageCheckbox = QUnit.config.urlConfig.some(function (oConf) {
|
|
170
|
+
return oConf.id === "coverage";
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
if (!bHasCoverageCheckbox) {
|
|
174
|
+
QUnit.config.urlConfig.push({
|
|
175
|
+
id: "coverage",
|
|
176
|
+
label: "Enable coverage",
|
|
177
|
+
tooltip: "Enable code coverage."
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
})();
|
|
@@ -132,12 +132,17 @@
|
|
|
132
132
|
// add a QUnit configuration option in the Toolbar to enable/disable
|
|
133
133
|
// client-side instrumentation via blanket (done manually because in
|
|
134
134
|
// this case blanket will not be loaded and executed)
|
|
135
|
-
QUnit.config.urlConfig.
|
|
136
|
-
id
|
|
137
|
-
label: "Enable coverage",
|
|
138
|
-
tooltip: "Enable code coverage."
|
|
135
|
+
var bHasCoverageCheckbox = QUnit.config.urlConfig.some(function (oConf) {
|
|
136
|
+
return oConf.id === "coverage";
|
|
139
137
|
});
|
|
140
138
|
|
|
139
|
+
if (!bHasCoverageCheckbox) {
|
|
140
|
+
QUnit.config.urlConfig.push({
|
|
141
|
+
id: "coverage",
|
|
142
|
+
label: "Enable coverage",
|
|
143
|
+
tooltip: "Enable code coverage."
|
|
144
|
+
});
|
|
145
|
+
}
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
})();
|
package/src/sap/ui/test/Opa.js
CHANGED
|
@@ -213,10 +213,57 @@ sap.ui.define([
|
|
|
213
213
|
$.extend(this, extensionObject);
|
|
214
214
|
};
|
|
215
215
|
|
|
216
|
+
/**
|
|
217
|
+
* @typedef {object} sap.ui.test.Opa.BaseParameters
|
|
218
|
+
* @description Configuration parameters for Opa.
|
|
219
|
+
* @property {int} [timeout=15] (seconds) Specifies how long the waitFor function polls before it fails. The default value is 15 seconds, 0 means it will wait forever.
|
|
220
|
+
* @property {int} [debugTimeout=0] (seconds) @since 1.47 Specifies how long the waitFor function polls before it fails in debug mode. 0 means it will wait forever.
|
|
221
|
+
* @property {int} [pollingInterval=400] (milliseconds) Specifies how often the waitFor function polls. The default is 400ms.
|
|
222
|
+
* @property {boolean} [asyncPolling=false] @since 1.55 Enable asynchronous polling after success() call. This allows more stable autoWaiter synchronization with event flows originating from within success(). Especially useful to stabilize synchronization with overflow toolbars. False by default.
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @typedef {sap.ui.test.Opa.BaseParameters} sap.ui.test.Opa.Config
|
|
228
|
+
* @description The global configuration of Opa.
|
|
229
|
+
* @property {sap.ui.test.Opa} [arrangements] A new Opa instance
|
|
230
|
+
* @property {sap.ui.test.Opa} [actions] A new Opa instance
|
|
231
|
+
* @property {sap.ui.test.Opa} [assertions] A new Opa instance
|
|
232
|
+
* @property {int} [executionDelay] The value is a number representing milliseconds. The default values are 0 or 50 (depending on the browser).
|
|
233
|
+
* The executionDelay will slow down the execution of every single waitFor statement to be delayed by the number of milliseconds.
|
|
234
|
+
* This does not effect the polling interval it just adds an initial pause.
|
|
235
|
+
* Use this parameter to slow down OPA when you want to watch your test during development or checking the UI of your app.
|
|
236
|
+
* It is not recommended to use this parameter in any automated test executions.
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @typedef {sap.ui.test.Opa.BaseParameters} sap.ui.test.Opa.WaitForOptions
|
|
242
|
+
* @description Configuration parameters for an individual {@link sap.ui.test.Opa#waitFor} call.
|
|
243
|
+
* @property {function(any):boolean} [check] Will get invoked in every polling interval.
|
|
244
|
+
* If it returns true, the check is successful and the polling will stop.
|
|
245
|
+
* The first parameter passed into the function is the same value that gets passed to the success function.
|
|
246
|
+
* Returning something other than boolean in the check will not change the first parameter of success.
|
|
247
|
+
* @property {function} [success] Will get invoked after the check function returns true.
|
|
248
|
+
* If there is no check function defined, it will be directly invoked.
|
|
249
|
+
* waitFor statements added in the success handler will be executed before previously added waitFor statements.
|
|
250
|
+
* @property {string} [errorMessage] Will be displayed as an errorMessage depending on your unit test framework.
|
|
251
|
+
* Currently the only adapter for Opa is QUnit.
|
|
252
|
+
* This message is displayed there if Opa has reached its timeout but QUnit has not yet reached it.
|
|
253
|
+
* @public
|
|
254
|
+
*/
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @typedef {sap.ui.test.Opa} sap.ui.test.Opa.Chain
|
|
258
|
+
* @description Used as return value of the {@link sap.ui.test.Opa#waitFor} to assist chaining
|
|
259
|
+
* @property {sap.ui.test.Opa} and A reference to the same <code>sap.ui.test.Opa</code> instance that can be used for chaining statements
|
|
260
|
+
* @public
|
|
261
|
+
*/
|
|
262
|
+
|
|
216
263
|
/**
|
|
217
264
|
* The global configuration of Opa.
|
|
218
|
-
*
|
|
219
|
-
* The default values are:
|
|
265
|
+
* The subset of the global values defined in {@link sap.ui.test.Opa.BaseParameters}.can be overwritten in an individual <code>waitFor</code> call.
|
|
266
|
+
* The default values for the global configuration are:
|
|
220
267
|
* <ul>
|
|
221
268
|
* <li>arrangements: A new Opa instance</li>
|
|
222
269
|
* <li>actions: A new Opa instance</li>
|
|
@@ -227,6 +274,7 @@ sap.ui.define([
|
|
|
227
274
|
* <li>asyncPolling: false</li>
|
|
228
275
|
* </ul>
|
|
229
276
|
* You can either directly manipulate the config, or extend it using {@link sap.ui.test.Opa.extendConfig}.
|
|
277
|
+
* @type sap.ui.test.Opa.Config
|
|
230
278
|
* @public
|
|
231
279
|
*/
|
|
232
280
|
Opa.config = {};
|
|
@@ -292,7 +340,7 @@ sap.ui.define([
|
|
|
292
340
|
* @since 1.48 All config parameters could be overwritten from URL. Should be prefixed with 'opa'
|
|
293
341
|
* and have uppercase first character. Like 'opaExecutionDelay=1000' will overwrite 'executionDelay'
|
|
294
342
|
*
|
|
295
|
-
* @param {
|
|
343
|
+
* @param {sap.ui.test.Opa.Config} options The values to be added to the existing config
|
|
296
344
|
* @public
|
|
297
345
|
*/
|
|
298
346
|
Opa.extendConfig = function (oOptions) {
|
|
@@ -387,7 +435,7 @@ sap.ui.define([
|
|
|
387
435
|
* Gives access to a singleton object you can save values in.
|
|
388
436
|
* Same as {@link sap.ui.test.Opa#getContext}
|
|
389
437
|
* @since 1.29.0
|
|
390
|
-
* @returns {
|
|
438
|
+
* @returns {Object<string,any>} the context object
|
|
391
439
|
* @public
|
|
392
440
|
* @function
|
|
393
441
|
*/
|
|
@@ -509,23 +557,8 @@ sap.ui.define([
|
|
|
509
557
|
*
|
|
510
558
|
*
|
|
511
559
|
* @public
|
|
512
|
-
* @param {
|
|
513
|
-
* @
|
|
514
|
-
* @param {int} [options.debugTimeout] @since 1.47 default: 0 - (seconds) Specifies how long the waitFor function polls before it fails in debug mode.O means it will wait forever.
|
|
515
|
-
* @param {int} [options.pollingInterval] default: 400 - (milliseconds) Specifies how often the waitFor function polls.
|
|
516
|
-
* @param {boolean} [options.asyncPolling] @since 1.55 default: false Enable asynchronous polling after success() call. This allows more stable autoWaiter synchronization with event flows originating from within success(). Especially usefull to stabilize synchronization with overflow toolbars.
|
|
517
|
-
* @param {function} [options.check] Will get invoked in every polling interval.
|
|
518
|
-
* If it returns true, the check is successful and the polling will stop.
|
|
519
|
-
* The first parameter passed into the function is the same value that gets passed to the success function.
|
|
520
|
-
* Returning something other than boolean in the check will not change the first parameter of success.
|
|
521
|
-
* @param {function} [options.success] Will get invoked after the check function returns true.
|
|
522
|
-
* If there is no check function defined, it will be directly invoked.
|
|
523
|
-
* waitFor statements added in the success handler will be executed before previously added waitFor statements.
|
|
524
|
-
* @param {string} [options.errorMessage] Will be displayed as an errorMessage depending on your unit test framework.
|
|
525
|
-
* Currently the only adapter for Opa is QUnit.
|
|
526
|
-
* This message is displayed there if Opa has reached its timeout but QUnit has not yet reached it.
|
|
527
|
-
*
|
|
528
|
-
* @returns {object} an object extending a jQuery promise.
|
|
560
|
+
* @param {sap.ui.test.Opa.WaitForOptions} options configuration options
|
|
561
|
+
* @returns {sap.ui.test.Opa.Chain} an object extending a jQuery promise.
|
|
529
562
|
* The object is essentially a jQuery promise with an additional "and" method that can be used for chaining waitFor statements.
|
|
530
563
|
* The promise is resolved when the waitFor completes successfully.
|
|
531
564
|
* The promise is rejected with the options object, if an error occurs. In this case, options.errorMessage will contain a detailed error message containing the stack trace and Opa logs.
|