@openui5/sap.ui.core 1.118.0 → 1.119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +9 -0
- package/THIRDPARTY.txt +2 -2
- 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/Localization.js +16 -1
- package/src/sap/base/i18n/ResourceBundle.js +5 -0
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/UriParameters.js +26 -19
- 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/BindingInfo.js +25 -3
- 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 +2 -2
- package/src/sap/ui/base/ManagedObjectMetadata.js +4 -3
- package/src/sap/ui/base/Metadata.js +3 -3
- 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/AccessKeysEnablement.js +2 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +68 -51
- 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 +15 -167
- package/src/sap/ui/core/Control.js +2 -2
- package/src/sap/ui/core/Core.js +162 -93
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomStyleClassSupport.js +3 -3
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +40 -4
- 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 +19 -2
- package/src/sap/ui/core/FocusHandler.js +3 -24
- package/src/sap/ui/core/Fragment.js +2 -2
- 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 +2 -2
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +11 -4
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +42 -42
- 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 +4 -4
- package/src/sap/ui/core/Messaging.js +4 -5
- package/src/sap/ui/core/Popup.js +3 -3
- package/src/sap/ui/core/RenderManager.js +15 -10
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/Rendering.js +1 -0
- package/src/sap/ui/core/ResizeHandler.js +15 -20
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +5 -5
- package/src/sap/ui/core/StashedControlSupport.js +4 -4
- package/src/sap/ui/core/StaticArea.js +66 -74
- package/src/sap/ui/core/Theming.js +71 -8
- 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 +10 -9
- package/src/sap/ui/core/UIComponent.js +2 -2
- 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 +4 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/_IconRegistry.js +2 -0
- package/src/sap/ui/core/cache/CacheManager.js +22 -16
- package/src/sap/ui/core/cache/LRUPersistentCache.js +13 -7
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +3 -3
- 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 +6 -6
- package/src/sap/ui/core/dnd/DragInfo.js +4 -4
- package/src/sap/ui/core/dnd/DropInfo.js +6 -6
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +64 -0
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +14 -9
- package/src/sap/ui/core/message/ControlMessageProcessor.js +4 -4
- package/src/sap/ui/core/message/Message.js +14 -13
- package/src/sap/ui/core/message/MessageManager.js +12 -13
- package/src/sap/ui/core/message/MessageMixin.js +2 -2
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +2 -2
- package/src/sap/ui/core/message/MessageType.js +4 -4
- package/src/sap/ui/core/messagebundle_ar.properties +2 -2
- package/src/sap/ui/core/messagebundle_bg.properties +3 -3
- package/src/sap/ui/core/messagebundle_ca.properties +1 -1
- package/src/sap/ui/core/messagebundle_cs.properties +4 -4
- package/src/sap/ui/core/messagebundle_cy.properties +1 -1
- package/src/sap/ui/core/messagebundle_da.properties +3 -3
- package/src/sap/ui/core/messagebundle_de.properties +2 -2
- package/src/sap/ui/core/messagebundle_el.properties +10 -10
- package/src/sap/ui/core/messagebundle_en.properties +4 -4
- package/src/sap/ui/core/messagebundle_es.properties +17 -17
- package/src/sap/ui/core/messagebundle_fi.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +21 -21
- package/src/sap/ui/core/messagebundle_hi.properties +2 -2
- package/src/sap/ui/core/messagebundle_hr.properties +6 -6
- package/src/sap/ui/core/messagebundle_hu.properties +10 -10
- package/src/sap/ui/core/messagebundle_id.properties +5 -5
- package/src/sap/ui/core/messagebundle_it.properties +57 -57
- package/src/sap/ui/core/messagebundle_iw.properties +5 -5
- package/src/sap/ui/core/messagebundle_kk.properties +1 -1
- package/src/sap/ui/core/messagebundle_ko.properties +6 -6
- package/src/sap/ui/core/messagebundle_lv.properties +5 -5
- package/src/sap/ui/core/messagebundle_ms.properties +5 -5
- package/src/sap/ui/core/messagebundle_nl.properties +12 -12
- package/src/sap/ui/core/messagebundle_no.properties +8 -8
- package/src/sap/ui/core/messagebundle_pl.properties +2 -2
- package/src/sap/ui/core/messagebundle_pt.properties +8 -8
- package/src/sap/ui/core/messagebundle_ro.properties +2 -2
- package/src/sap/ui/core/messagebundle_ru.properties +7 -7
- package/src/sap/ui/core/messagebundle_sk.properties +2 -2
- package/src/sap/ui/core/messagebundle_sl.properties +9 -9
- package/src/sap/ui/core/messagebundle_sv.properties +8 -8
- package/src/sap/ui/core/messagebundle_th.properties +18 -18
- package/src/sap/ui/core/messagebundle_tr.properties +5 -5
- package/src/sap/ui/core/messagebundle_uk.properties +8 -8
- package/src/sap/ui/core/messagebundle_vi.properties +1 -1
- package/src/sap/ui/core/messagebundle_zh_CN.properties +2 -2
- package/src/sap/ui/core/messagebundle_zh_TW.properties +24 -24
- 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 +3 -3
- 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 +3 -3
- 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/async/Target.js +5 -4
- package/src/sap/ui/core/routing/sync/Target.js +3 -3
- package/src/sap/ui/core/rules/App.support.js +30 -1
- package/src/sap/ui/core/rules/Config.support.js +4 -0
- package/src/sap/ui/core/rules/CoreHelper.support.js +3 -3
- package/src/sap/ui/core/rules/Theming.support.js +4 -0
- 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 +5 -3
- package/src/sap/ui/core/support/ToolsAPI.js +8 -4
- package/src/sap/ui/core/support/plugins/Breakpoint.js +4 -4
- package/src/sap/ui/core/support/plugins/ControlTree.js +31 -13
- 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 +2 -2
- 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 +6 -4
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +4 -2
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +275 -269
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/global.less +8 -8
- package/src/sap/ui/core/theming/Parameters.js +4 -5
- package/src/sap/ui/core/theming/ThemeHelper.js +0 -1
- package/src/sap/ui/core/theming/ThemeManager.js +15 -14
- 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 +4 -2
- 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/reflection/BaseTreeModifier.js +27 -4
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +55 -30
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +54 -48
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/Serializer.js +3 -3
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +27 -10
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +2 -2
- 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 +3 -3
- 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 +5 -5
- package/src/sap/ui/debug/DebugEnv.js +15 -6
- package/src/sap/ui/debug/PropertyList.js +3 -3
- package/src/sap/ui/dom/jquery/control.js +3 -4
- package/src/sap/ui/events/F6Navigation.js +2 -1
- package/src/sap/ui/model/ClientModel.js +33 -1
- package/src/sap/ui/model/ClientPropertyBinding.js +17 -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/Filter.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 +2 -3
- package/src/sap/ui/model/message/MessageModel.js +3 -7
- 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 -2
- 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 +2 -3
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +13 -5
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +85 -56
- package/src/sap/ui/model/odata/v2/ODataModel.js +20 -15
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +60 -10
- package/src/sap/ui/model/odata/v4/ODataBinding.js +13 -4
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +159 -34
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +94 -24
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +10 -10
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +4 -2
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +10 -13
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +105 -25
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +3 -5
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +83 -24
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +6 -20
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +3 -3
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -2
- package/src/sap/ui/model/type/DateInterval.js +1 -2
- 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 +2 -2
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +4 -2
- package/src/sap/ui/performance/BeaconRequest.js +8 -10
- package/src/sap/ui/qunit/qunit-coverage-istanbul.js +60 -6
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/qunit/utils/waitForThemeApplied.js +16 -14
- package/src/sap/ui/test/BlanketReporterUI.view.xml +5 -2
- package/src/sap/ui/test/OpaPlugin.js +3 -3
- package/src/sap/ui/test/TestUtils.js +3 -3
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/matchers/Descendant.js +1 -1
- package/src/sap/ui/test/matchers/Sibling.js +1 -1
- package/src/sap/ui/test/selectors/_LabelFor.js +3 -2
- package/src/sap/ui/test/starter/_setupAndStart.js +35 -11
- package/src/sap/ui/util/Storage.js +1 -1
- package/test/sap/ui/core/HTMLControl.html +94 -93
- package/test/sap/ui/core/HyphenationPlayground.html +10 -9
- package/test/sap/ui/core/Strings.view.xml +5 -1
- package/test/sap/ui/core/ThemeParameters.html +31 -30
- package/test/sap/ui/core/ValidateURL.html +10 -10
- package/test/sap/ui/core/demokit/sample/BusyIndicator/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/Commands/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/ControlBusyIndicator/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/ControllerExtension/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/FieldGroup/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/Html/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/Html/preserveDOM/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/Html/static/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/HyphenationAPI/C.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/Icon/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/InvisibleMessage/InvisibleMessage.controller.js +4 -4
- package/test/sap/ui/core/demokit/sample/InvisibleMessage/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/InvisibleText/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/MessageManager/BasicODataMessages/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/OpaAction/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/OpaAutoWaitParams/OpaAutoWaitParams.js +1 -1
- package/test/sap/ui/core/demokit/sample/OpaAutoWaitParams/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaAutoWaitParams/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaById/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaById/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaDynamicWait/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaDynamicWait/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaGetStarted/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaMatchers/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaMatchers/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaPageObject/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaPageObject/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaStartup/iStartMyAppInAFrame/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaStartup/iStartMyAppInAFrame/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaStartup/iStartMyUIComponent/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaStartup/iStartMyUIComponent/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaStaticAreaControls/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaStaticAreaControls/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaTestLibrary/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaTestLibrary/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaURLParameters/iStartMyAppInAFrameWithURLParameters/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaURLParameters/iStartMyAppInAFrameWithURLParameters/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaURLParameters/iStartMyUIComponentWithURLParameters/applicationUnderTest/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/OpaURLParameters/iStartMyUIComponentWithURLParameters/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/OpaWithSupportAssistant/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/PatternMatching/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/PatternMatching/patternApp/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/RoutingFullscreen/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/RoutingMasterDetail/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/reuse/categories/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/reuse/products/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/reuse/suppliers/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/TargetsStandalone/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/ThemeCustomClasses/ThemeCustomClasses.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/ThemeCustomClasses/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeCurrency/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeDateAsDate/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeDateAsString/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeDateTime/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeFileSize/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeFloat/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeInteger/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/TypeTimeAsTime/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/View/async/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/View/preprocessor/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/XMLComposite/02/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/common/Controller.js +3 -2
- package/test/sap/ui/core/demokit/sample/common/Helper.js +15 -2
- package/test/sap/ui/core/demokit/sample/common/pages/Any.js +3 -0
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithPageObjects/applicationUnderTest/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/gherkin/GherkinWithPageObjects/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/webapp/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/webapp/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/webapp/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/manifest.json +2 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/webapp/manifest.json +2 -2
- package/test/sap/ui/core/demokit/sample/odata/types/v2/DateTimeOffset/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/odata/types/v4/Date/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/odata/types/v4/TimeOfDay/manifest.json +1 -0
- package/test/sap/ui/core/demokit/sample/odata/v2/AutoExpand/AutoExpand.view.xml +6 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.view.xml +7 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/DataAggregation.controller.js +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/DataAggregation.view.xml +7 -4
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/expandPageCollapse.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/filter.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Draft/Opa.qunit.js +3 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/FieldGroups/Opa.qunit.js +4 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.controller.js +6 -4
- package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.view.xml +6 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Opa.qunit.js +9 -16
- package/test/sap/ui/core/demokit/sample/odata/v4/GridTable/GridTable.view.xml +6 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.view.xml +7 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.view.xml +5 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +4 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/Products/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.controller.js +29 -4
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +30 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +33 -6
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/tests/createEdit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/tests/pageExpandCollapse.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/pages/Main.js +9 -8
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/ChangeContext.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/Create.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/CreateMultiple.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/CreateRelative.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/MessageHandling.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/TypeDeterminationAndDelete.js +8 -9
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/WriteNonDeferredGroup.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/additionalTargets.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/tests/AdaptSalesOrdersTable.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.view.xml +5 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/pages/Main.js +4 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/Opa.qunit.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/webapp/manifest.json +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/webapp/manifest.json +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/webapp/manifest.json +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/webapp/manifest.json +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/webapp/manifest.json +1 -1
- package/test/sap/ui/core/internal/samples/composite/xmlcomposite/exTableWrapperOuterBinding/Test.controller.js +3 -2
- package/test/sap/ui/core/internal/samples/odata/v2/SalesOrders/Main.controller.js +1 -1
- package/test/sap/ui/core/internal/samples/odata/v2/SalesOrders/Main.view.xml +6 -3
- package/test/sap/ui/core/internal/samples/odata/v2/TreeTable/Main.view.xml +1 -1
- package/test/sap/ui/core/qunit/ControlDefinition.qunit.js +40 -20
- package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +1 -1
- package/test/sap/ui/core/qunit/Core.qunit.js +5 -4
- package/test/sap/ui/core/qunit/Core_libraryTerminologies_integration.qunit.js +12 -11
- package/test/sap/ui/core/qunit/CustomStyleClassSupport.qunit.js +119 -117
- package/test/sap/ui/core/qunit/CustomThemeFallback.qunit.js +5 -17
- package/test/sap/ui/core/qunit/Declarative.qunit.js +37 -37
- package/test/sap/ui/core/qunit/Element_base.qunit.js +1 -1
- package/test/sap/ui/core/qunit/EventBus.qunit.js +4 -3
- package/test/sap/ui/core/qunit/FastNavigation.qunit.js +3 -2
- package/test/sap/ui/core/qunit/FieldGroup.qunit.js +9 -8
- package/test/sap/ui/core/qunit/FocusHandler.qunit.js +5 -4
- package/test/sap/ui/core/qunit/Fragment.qunit.js +12 -12
- package/test/sap/ui/core/qunit/Fragment_legacyAPIs.qunit.js +13 -12
- package/test/sap/ui/core/qunit/HTML.qunit.js +35 -35
- package/test/sap/ui/core/qunit/IconPool.qunit.js +6 -6
- package/test/sap/ui/core/qunit/InvisibleText.qunit.js +5 -4
- package/test/sap/ui/core/qunit/ManagedObject.qunit.js +3 -3
- package/test/sap/ui/core/qunit/PlaceAt.qunit.js +2 -2
- package/test/sap/ui/core/qunit/ScrollBar.qunit.js +3 -3
- package/test/sap/ui/core/qunit/StashedControlSupport.qunit.js +9 -9
- package/test/sap/ui/core/qunit/ThemeHelper.qunit.js +5 -4
- package/test/sap/ui/core/qunit/ThemeManager.qunit.js +47 -79
- package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +40 -372
- package/test/sap/ui/core/qunit/ThemeParameters_legacyAPIs.qunit.js +686 -0
- package/test/sap/ui/core/qunit/TooltipBase.qunit.js +3 -2
- package/test/sap/ui/core/qunit/UIArea.qunit.js +10 -10
- package/test/sap/ui/core/qunit/analytics/testsuite4analytics.qunit.html +3 -3
- package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +4 -3
- package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +13 -3
- package/test/sap/ui/core/qunit/base/util/UriParameters.qunit.js +27 -1
- package/test/sap/ui/core/qunit/bootstrap/BootstrapCustomBootTaskPreloadCss.qunit.js +4 -4
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +22 -21
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.qunit.js +4 -9
- package/test/sap/ui/core/qunit/bootstrap/CalendarClassLoadingWithCustomBootTaskAndPreload.qunit.js +19 -4
- package/test/sap/ui/core/qunit/bootstrap/CfgDefaults.qunit.js +3 -2
- package/test/sap/ui/core/qunit/bootstrap/CfgFromConfigAttribute.qunit.js +4 -3
- package/test/sap/ui/core/qunit/bootstrap/CfgFromGlobalObject.qunit.js +4 -3
- package/test/sap/ui/core/qunit/bootstrap/CfgFromTagAttributes.qunit.js +4 -3
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +2 -198
- package/test/sap/ui/core/qunit/bootstrap/Configuration_language_via_URL.qunit.js +210 -0
- package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +33 -30
- package/test/sap/ui/core/qunit/bootstrap/testsuite.bootstrap.qunit.js +6 -0
- package/test/sap/ui/core/qunit/component/Component.qunit.js +12 -0
- package/test/sap/ui/core/qunit/component/ComponentSupport.qunit.js +6 -5
- package/test/sap/ui/core/qunit/component/Component_dependencyLoading.qunit.js +15 -9
- package/test/sap/ui/core/qunit/component/Component_dependencyLoading_unavoidablySync.qunit.js +10 -6
- package/test/sap/ui/core/qunit/component/Customizing.qunit.js +8 -7
- package/test/sap/ui/core/qunit/component/Customizing_disabled.qunit.js +6 -5
- package/test/sap/ui/core/qunit/component/Customizing_legacyAPIs.qunit.js +8 -7
- package/test/sap/ui/core/qunit/component/Customizing_multi.qunit.js +7 -6
- package/test/sap/ui/core/qunit/component/Customizing_unavoidablySync.qunit.js +5 -4
- package/test/sap/ui/core/qunit/component/Metadata.qunit.js +3 -3
- package/test/sap/ui/core/qunit/component/Models.qunit.js +103 -44
- package/test/sap/ui/core/qunit/component/UIComponent.qunit.js +20 -4
- package/test/sap/ui/core/qunit/component/UIComponent_unavoidablySync.qunit.js +5 -4
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/component1/manifest.json +2 -1
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/component2/manifest.json +1 -0
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/component3/manifest.json +2 -1
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/component4/manifest.json +1 -0
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/component5/manifest.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/component6/manifest.json +1 -0
- package/test/sap/ui/core/qunit/component/testdata/dependencyLoading/componentVariant/manifest.json +1 -0
- package/test/sap/ui/core/qunit/component/testdata/v2asyncRootView/manifest.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/v2inline/Component.js +1 -1
- package/test/sap/ui/core/qunit/composite/XMLComposite.qunit.js +5 -5
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.html +4 -5
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
- package/test/sap/ui/core/qunit/internal/AnnotationParser.qunit.html +4 -4
- package/test/sap/ui/core/qunit/internal/testsuite.models.qunit.js +19 -9
- package/test/sap/ui/core/qunit/jquery.sap.global-config.qunit.js +2 -4
- package/test/sap/ui/core/qunit/jquery.sap.ui.qunit.js +5 -4
- package/test/sap/ui/core/qunit/json/JSONModel.qunit.js +5 -9
- package/test/sap/ui/core/qunit/messages/Messaging.qunit.js +10 -5
- package/test/sap/ui/core/qunit/messages/messagesGeneral.qunit.js +6 -0
- package/test/sap/ui/core/qunit/messages/messagesGeneral_legacyAPIs.qunit.js +158 -0
- package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +5 -4
- package/test/sap/ui/core/qunit/messages/testsuite.messaging.base.qunit.js +7 -0
- package/test/sap/ui/core/qunit/model/ClientPropertyBinding.qunit.js +47 -0
- package/test/sap/ui/core/qunit/mvc/AsyncXMLView.qunit.js +5 -3
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +3 -3
- package/test/sap/ui/core/qunit/mvc/View.qunit.js +5 -1
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +6 -5
- package/test/sap/ui/core/qunit/mvc/testdata/TypedViewWithRendererRenderer.js +2 -2
- package/test/sap/ui/core/qunit/mvc/testdata/stashed/manifest.json +2 -1
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing.qunit.js +4 -3
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing_legacyAPIs.qunit.js +4 -3
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/AsyncXMLView_legacyAPIs.qunit.js +5 -3
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLView_legacyAPIs.qunit.js +6 -5
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +11 -7
- package/test/sap/ui/core/qunit/odata/ODataMetaModel.qunit.js +35 -0
- package/test/sap/ui/core/qunit/odata/_AnnotationHelperBasics.qunit.js +10 -4
- package/test/sap/ui/core/qunit/odata/data/ODataModelFakeService.js +1 -1
- package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +5 -0
- package/test/sap/ui/core/qunit/odata/type/ODataType.qunit.js +9 -0
- package/test/sap/ui/core/qunit/odata/v2/Context.qunit.js +12 -0
- package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +422 -9
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +483 -33
- package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +121 -2
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +95 -8
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +59 -13
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +355 -75
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +152 -19
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1253 -130
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +19 -9
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +6 -27
- package/test/sap/ui/core/qunit/odata/v4/data/metadata.json +3 -1
- package/test/sap/ui/core/qunit/odata/v4/data/metadata.xml +2 -2
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +172 -17
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +7 -8
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +185 -84
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +2 -22
- package/test/sap/ui/core/qunit/opa/OpaPlugin.qunit.js +6 -4
- package/test/sap/ui/core/qunit/opa/selectors/_Selector.js +3 -2
- package/test/sap/ui/core/qunit/opa/selectors/_TableRowItem.js +4 -3
- package/test/sap/ui/core/qunit/rule/app/deprecatedJSViewUsage.qunit.js +4 -0
- package/test/sap/ui/core/qunit/rule/app/globalApiUsage.qunit.js +4 -0
- package/test/sap/ui/core/qunit/rule/app/jquerySapUsage.qunit.js +4 -0
- package/test/sap/ui/core/qunit/rule/app/syncXHR.qunit.js +4 -0
- package/test/sap/ui/core/qunit/rule/app/syncXHRBootstrap.qunit.js +4 -0
- package/test/sap/ui/core/qunit/rule/app/syncXHRBootstrapDebug.qunit.js +4 -0
- package/test/sap/ui/core/qunit/rule/app/syncXHRBootstrapDebugBeforeBootstrap.js +4 -0
- package/test/sap/ui/core/qunit/rule/config/asynchronousXMLViews.qunit.js +4 -1
- package/test/sap/ui/core/qunit/rule/misc/silentEventBus.qunit.js +8 -7
- package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +11 -2
- package/test/sap/ui/core/qunit/rule/testsuite.rule.qunit.js +18 -0
- package/test/sap/ui/core/qunit/test/starter/find/main.js +11 -8
- package/test/sap/ui/core/qunit/testsuites/testsuite.databinding.qunit.js +6 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.foundation.enablement.qunit.js +7 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +21 -2
- package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +26 -4
- package/test/sap/ui/core/qunit/util/jQuery.sap.Version.qunit.js +5 -5
- package/test/sap/ui/core/qunit/util/reflection/JsControlTreeModifier.qunit.js +30 -13
- package/test/sap/ui/core/qunit/util/reflection/XmlTreeModifier.qunit.js +40 -16
- package/test/sap/ui/core/qunit/util/support/TechnicalInfo.qunit.js +11 -10
- package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +69 -8
- package/test/sap/ui/core/relnotes/changes-1.118.json +1 -34
- package/test/sap/ui/core/relnotes/changes-1.119.json +217 -0
- package/test/sap/ui/core/resources/fastnav.js +3 -2
- package/test/sap/ui/core/samples/ResponsiveDemo.html +3 -3
- package/test/sap/ui/core/samples/components/commands/manifest.json +2 -2
- package/test/sap/ui/core/samples/components/sample/manifest.json +2 -1
- package/test/sap/ui/core/samples/databinding/DatabindingMessages.html +1 -1
- package/test/sap/ui/core/samples/databinding/ODatabindingMessages.html +3 -3
- package/test/sap/ui/core/samples/databinding/UnitTable.view.xml +9 -2
- package/test/sap/ui/core/samples/formatting/manifest.json +2 -2
- package/test/sap/ui/core/samples/mvc/XMLViewAsync.html +62 -61
- package/test/sap/ui/core/samples/routing_legacyAPIs/AsyncViews.html +124 -123
- package/test/sap/ui/core/terminologies/App.controller.js +3 -2
- package/test/sap/ui/core/terminologies/App.view.xml +64 -64
- package/test/sap/ui/core/tmpl_legacyAPIs/TemplateSimple.html +38 -37
- package/test/sap/ui/core/util/PasteHelper.html +5 -4
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/samples/databinding/DataBinding.html +0 -135
- package/test/sap/ui/core/samples/databinding/DataBindingCalculatedFields.html +0 -229
- package/test/sap/ui/core/samples/databinding/DataBindingCompositeTypes.html +0 -273
- package/test/sap/ui/core/samples/databinding/DataBindingFormat.html +0 -294
- package/test/sap/ui/core/samples/databinding/DataBindingList.html +0 -290
- package/test/sap/ui/core/samples/databinding/DataBindingListNamedModel.html +0 -290
- package/test/sap/ui/core/samples/databinding/DataBindingListXML.html +0 -280
- package/test/sap/ui/core/samples/databinding/DataBindingMasterDetail.html +0 -117
- package/test/sap/ui/core/samples/databinding/DataBindingMultiModel.html +0 -154
- package/test/sap/ui/core/samples/databinding/DataBindingResourceModel.html +0 -119
- package/test/sap/ui/core/samples/databinding/DataBindingSortingFiltering.html +0 -103
- package/test/sap/ui/core/samples/databinding/DataBindingTree.html +0 -166
- package/test/sap/ui/core/samples/databinding/DataBindingTreeFilter.html +0 -117
- package/test/sap/ui/core/samples/databinding/DataBindingTreeFilterXML.html +0 -103
- package/test/sap/ui/core/samples/databinding/DataBindingTreeLarge.html +0 -128
- package/test/sap/ui/core/samples/databinding/DataBindingTreeWithArrays.html +0 -132
- package/test/sap/ui/core/samples/databinding/DataBindingTwoWay.html +0 -158
- package/test/sap/ui/core/samples/databinding/DataBindingTwoWayTable.html +0 -141
- package/test/sap/ui/core/samples/databinding/DataBindingTypes.html +0 -265
- package/test/sap/ui/core/samples/databinding/DataBindingValidation.html +0 -195
- package/test/sap/ui/core/samples/databinding/DataBindingXML.html +0 -148
- package/test/sap/ui/core/samples/databinding/DataBindingXMLView.html +0 -53
- package/test/sap/ui/core/samples/databinding/testdata/ListBinding.view.xml +0 -9
- package/test/sap/ui/core/samples/databinding/testdata/test.view.json +0 -15
- package/test/sap/ui/core/samples/databinding/testdata/test.view.xml +0 -8
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
/*global QUnit */
|
|
2
|
+
sap.ui.define([
|
|
3
|
+
"sap/ui/core/theming/Parameters",
|
|
4
|
+
"sap/ui/core/Control",
|
|
5
|
+
"sap/ui/core/Element",
|
|
6
|
+
"sap/ui/core/Icon",
|
|
7
|
+
"sap/ui/core/Lib",
|
|
8
|
+
"sap/ui/core/Theming",
|
|
9
|
+
"sap/ui/dom/includeStylesheet",
|
|
10
|
+
"sap/m/Bar",
|
|
11
|
+
"sap/ui/thirdparty/URI",
|
|
12
|
+
"sap/ui/qunit/utils/nextUIUpdate"
|
|
13
|
+
], function(Parameters, Control, Element, Icon, Library, Theming, includeStylesheet, Bar, URI, nextUIUpdate) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
QUnit.module("Parmeters.get", {
|
|
17
|
+
before: function() {
|
|
18
|
+
// For some reasons window.performance.getResourceByType does only return the first 250?!
|
|
19
|
+
// entries therefore clear the resource timings upfront
|
|
20
|
+
window.performance.clearResourceTimings();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
var sPath = new URI(sap.ui.require.toUrl("testdata/core"), document.baseURI).toString();
|
|
25
|
+
|
|
26
|
+
QUnit.test("InitialCheck", function(assert) {
|
|
27
|
+
assert.ok(Parameters, "sap.ui.core.theming.Parameters must exist");
|
|
28
|
+
assert.ok(Parameters.get, "sap.ui.core.theming.Parameters.get() must exist");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* converts short notation hex color code to long notation
|
|
33
|
+
* @param {string} input Color string, e.g. #abc
|
|
34
|
+
* @returns {string} Normalized, 6-hex-digit color string, e.g. #aabbcc
|
|
35
|
+
*/
|
|
36
|
+
function unifyHexNotation(input) {
|
|
37
|
+
if (input.length === 4) {
|
|
38
|
+
var colorShortNotationRegexp = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
39
|
+
var sResult = colorShortNotationRegexp.exec(input);
|
|
40
|
+
if (sResult) {
|
|
41
|
+
return "#" + sResult[1] + sResult[1] + sResult[2] + sResult[2] + sResult[3] + sResult[3];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return input;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getParameterInUnifiedHexNotation(key, oElement) {
|
|
48
|
+
var sParameter = Parameters.get(key, oElement);
|
|
49
|
+
if (sParameter) {
|
|
50
|
+
return unifyHexNotation(sParameter);
|
|
51
|
+
}
|
|
52
|
+
return sParameter;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function getParametersInUnifiedHexNotation(aKeys, oElement) {
|
|
56
|
+
var oParameters = Parameters.get(aKeys, oElement);
|
|
57
|
+
if (oParameters) {
|
|
58
|
+
aKeys.forEach(function(key) {
|
|
59
|
+
if (oParameters[key]) {
|
|
60
|
+
oParameters[key] = unifyHexNotation(oParameters[key]);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return oParameters;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function checkLibraryParametersJsonRequestForLib(sLibNumber) {
|
|
68
|
+
return window.performance.getEntriesByType("resource").filter(function (oResource) {
|
|
69
|
+
return oResource.name.endsWith("themeParameters/lib" + sLibNumber + "/themes/sap_hcb/library-parameters.json");
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function createLinkElement (sId, bBase) {
|
|
73
|
+
var sUrl = sap.ui.require.toUrl("test-resources/sap/ui/core/qunit/testdata/libraries/themeParameters/lib17/themes/" + (bBase ? "base" : "sap_hcb") + "/library.css");
|
|
74
|
+
return includeStylesheet({
|
|
75
|
+
url: sUrl,
|
|
76
|
+
id: bBase ? sId : undefined
|
|
77
|
+
}).then(function () {
|
|
78
|
+
if (bBase) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
Array.from(document.querySelectorAll("link")).forEach(function (oLink) {
|
|
82
|
+
if (!oLink.getAttribute("id") && oLink.getAttribute("href") === sUrl) {
|
|
83
|
+
oLink.setAttribute("data-sap-ui-foucmarker", sId);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Test module covers the deprecated sync Parameters.get() API.
|
|
91
|
+
* Since the Parameters.get() function is overloaded, only the sync usage is deprecated.
|
|
92
|
+
* The asynchronous behavior is tested in a separate QUnit module below.
|
|
93
|
+
* This test module also includes some calls to the deprecated Core facade API "loadLibrary".
|
|
94
|
+
*
|
|
95
|
+
* @deprecated As of version 1.119
|
|
96
|
+
*/
|
|
97
|
+
QUnit.module("Parmeters.get (sync)", {
|
|
98
|
+
before: function() {
|
|
99
|
+
// For some reasons window.performance.getResourceByType does only return the first 250?!
|
|
100
|
+
// entries therefore clear the resource timings upfront
|
|
101
|
+
window.performance.clearResourceTimings();
|
|
102
|
+
|
|
103
|
+
// test setup: load legacy.testlib (will be removed in 2.0, together with this QUnit module)
|
|
104
|
+
sap.ui.getCore().loadLibrary("sap.ui.legacy.testlib");
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
QUnit.test("Read single parameters", function(assert) {
|
|
109
|
+
/* HCB theme was chosen because:
|
|
110
|
+
* 1. it should be quite stable in general
|
|
111
|
+
* 2. background and text color are defined by design and thus even less likely to change
|
|
112
|
+
* 3. it should be reliably there for accessibility reasons
|
|
113
|
+
* 4. text and background color differ from the base theme
|
|
114
|
+
*/
|
|
115
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiBaseText"), "#ffffff", "sapUiBaseText must be defined as 'white - #ffffff'");
|
|
116
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiBaseBG"), "#000000", "sapUiBaseBG must be defined as black '#000000'");
|
|
117
|
+
|
|
118
|
+
// Read parameters of legacy library-parameters.json format
|
|
119
|
+
assert.equal(Parameters.get("sapUiLegacyTstTextColor"), "#fafafa", "sapUiLegacyTstTextColor must be defined as '#fafafa'");
|
|
120
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiLegacyText"), "#ffffff", "sapUiLegacyText must be defined as '#ffffff'");
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
QUnit.test("Undefined parameter", function(assert) {
|
|
124
|
+
assert.equal(Parameters.get("thisParameterNameMayNeverExist"), undefined, "'undefined' should be returned for unknown parameter names");
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
QUnit.test("Invalid parameter", function(assert) {
|
|
128
|
+
assert.equal(Parameters.get(null), undefined, "'undefined' should be returned for 'null' parameter name");
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
QUnit.test("All parameters", function(assert) {
|
|
132
|
+
var mAllParams = Parameters.get();
|
|
133
|
+
assert.ok(mAllParams, "A map of parameters should be returned when get is called without parameter name");
|
|
134
|
+
|
|
135
|
+
var count = 0;
|
|
136
|
+
for (var property in mAllParams) {
|
|
137
|
+
assert.equal(typeof mAllParams[property], "string", "Parameter '" + property + "' should be a string");
|
|
138
|
+
count++;
|
|
139
|
+
}
|
|
140
|
+
assert.ok(count > 10, "The map of parameters should have quite some entries");
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
QUnit.test("Parameter from Unknown Library", function(assert) {
|
|
144
|
+
assert.equal(Parameters.get("sapUiTstTextColor"), undefined, "'undefined' should be returned for a parameter of a library that currently is not loaded");
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
QUnit.test("Check that link tags for libraries are added in the correct order", function(assert) {
|
|
148
|
+
var i = 0;
|
|
149
|
+
var sLib15Name = "testlibs.themeParameters.lib15";
|
|
150
|
+
var sLib16Name = "testlibs.themeParameters.lib16";
|
|
151
|
+
|
|
152
|
+
sap.ui.getCore().loadLibrary(sLib16Name);
|
|
153
|
+
sap.ui.getCore().loadLibrary(sLib15Name);
|
|
154
|
+
|
|
155
|
+
// Link tags for recently loaded libs 15 and 16 shouldn't be available in DOM
|
|
156
|
+
var aAllLibrariesRequireCss = Library.getAllInstancesRequiringCss();
|
|
157
|
+
document.querySelectorAll("link").forEach(function (oLink) {
|
|
158
|
+
if (oLink.id.includes(sLib15Name) || oLink.id.includes(sLib16Name)) {
|
|
159
|
+
assert.notOk("Link tag for lib 15 and 16 shouldn't be available synchronous");
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// Trigger loading of parameters.json for lib CSS which is not loaded
|
|
164
|
+
Parameters.get("sapUiThemeParamForLib14");
|
|
165
|
+
// Check that link tags are added in the corrct order
|
|
166
|
+
aAllLibrariesRequireCss = Library.getAllInstancesRequiringCss();
|
|
167
|
+
document.querySelectorAll("link").forEach(function (oLink) {
|
|
168
|
+
if (oLink.id.startsWith("sap-ui-theme-")) {
|
|
169
|
+
var sExpectedLinkId = aAllLibrariesRequireCss[i].variant ?
|
|
170
|
+
aAllLibrariesRequireCss[i].name + "-[" + aAllLibrariesRequireCss[i].variant + "]" : aAllLibrariesRequireCss[i].name;
|
|
171
|
+
assert.strictEqual(oLink.id, "sap-ui-theme-" + sExpectedLinkId, "Link tag for library " + sExpectedLinkId + " is correct");
|
|
172
|
+
i++;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
QUnit.test("After Theme Change", function(assert) {
|
|
178
|
+
var done = assert.async();
|
|
179
|
+
var fnContinue = function(oEvent) {
|
|
180
|
+
if (oEvent.theme === "sap_hcb") {
|
|
181
|
+
Theming.detachApplied(fnContinue);
|
|
182
|
+
done();
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
var fnAssertApplied = function(oEvent) {
|
|
186
|
+
if (oEvent.theme === "base") {
|
|
187
|
+
// parameters of base theme should now be present
|
|
188
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiBaseText"), "#000000", "sapUiBaseText must be defined as 'black - #000000'");
|
|
189
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiBaseBG"), "#ffffff", "sapUiBaseBG must be defined as 'white - #ffffff'");
|
|
190
|
+
|
|
191
|
+
Theming.detachApplied(fnAssertApplied);
|
|
192
|
+
Theming.attachApplied(fnContinue);
|
|
193
|
+
Theming.setTheme("sap_hcb");
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
Theming.attachApplied(fnAssertApplied);
|
|
198
|
+
Theming.setTheme("base");
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
QUnit.test("Dynamically Loaded Library", function(assert) {
|
|
202
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib1");
|
|
203
|
+
|
|
204
|
+
// Need promise resolve to get async after load library
|
|
205
|
+
return Promise.resolve().then(function() {
|
|
206
|
+
// In Chrome the library.css for testlibs.themeParameters.lib1 is still pending, so the library-parameters.json needs to be loaded.
|
|
207
|
+
// In Firefox however, the library.css is available when fetching the theme-parameter.
|
|
208
|
+
// To unify the behaviour, prevent inline data-uri parameter usage and force a json request to test the request params
|
|
209
|
+
// BCP: 2170097761
|
|
210
|
+
var oLink = document.getElementById("sap-ui-theme-testlibs\.themeParameters\.lib1");
|
|
211
|
+
oLink.style = "background-image: none !important;";
|
|
212
|
+
|
|
213
|
+
assert.equal(Parameters.get("sapUiThemeParamForLib1"), "#fafafa", "parameter for newly loaded library should be known now");
|
|
214
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("1").length, 1, "library-parameters.json requested once for testlibs.themeParameters.lib1");
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
QUnit.test("Read scoped parameters (from testlibs.themeParameters.lib2)", function(assert) {
|
|
219
|
+
var oControl = new Control();
|
|
220
|
+
|
|
221
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib2");
|
|
222
|
+
|
|
223
|
+
// Need promise resolve to get async after load library
|
|
224
|
+
return Promise.resolve().then(function() {
|
|
225
|
+
assert.equal(Parameters.get("sapUiThemeParamWithScopeForLib2", oControl), "#fbfbfb",
|
|
226
|
+
"No scope set - default value should get returned");
|
|
227
|
+
|
|
228
|
+
oControl.addStyleClass("sapTestScope");
|
|
229
|
+
|
|
230
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamWithScopeForLib2", oControl), "#000000",
|
|
231
|
+
"Scope set directly on control - scoped param should be returned");
|
|
232
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamWithoutScopeForLib2", oControl), "#ffffff",
|
|
233
|
+
"Scope set directly on control but no scoped value defined - default value should get returned");
|
|
234
|
+
|
|
235
|
+
oControl.removeStyleClass("sapTestScope");
|
|
236
|
+
var oParent = new Control();
|
|
237
|
+
oParent.addStyleClass("sapTestScope");
|
|
238
|
+
oControl.setParent(oParent);
|
|
239
|
+
|
|
240
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamWithScopeForLib2", oControl), "#000000",
|
|
241
|
+
"Scope set on parent control - scoped param should be returned");
|
|
242
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamWithoutScopeForLib2", oControl), "#ffffff",
|
|
243
|
+
"Scope set on parent control but no scoped value defined - default value should get returned");
|
|
244
|
+
|
|
245
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("2").length, 1, "library-parameters.json requested once for testlibs.themeParameters.lib2");
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
QUnit.test("Read scoped parameters (error handling)", function(assert) {
|
|
250
|
+
var oElement = new Element();
|
|
251
|
+
|
|
252
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib3");
|
|
253
|
+
|
|
254
|
+
// Need promise resolve to get async after load library
|
|
255
|
+
return Promise.resolve().then(function() {
|
|
256
|
+
assert.equal(Parameters.get("sapUiThemeParamWithScopeForLib3", oElement), "#fcfcfc",
|
|
257
|
+
"No scope set - default value should get returned");
|
|
258
|
+
|
|
259
|
+
assert.equal(Parameters.get("sapUiThemeParamWithScopeForLib3", null), "#fcfcfc",
|
|
260
|
+
"'null' value provided as 'oControl' - default value should get returned");
|
|
261
|
+
|
|
262
|
+
assert.equal(Parameters.get("sapUiThemeParamWithScopeForLib3", {}), "#fcfcfc",
|
|
263
|
+
"'{}' value provided as 'oControl' - default value should get returned");
|
|
264
|
+
|
|
265
|
+
var oParent = new Control();
|
|
266
|
+
oParent.addStyleClass("sapTestScope");
|
|
267
|
+
oElement.setParent(oParent);
|
|
268
|
+
|
|
269
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamWithScopeForLib3", oElement), "#111111",
|
|
270
|
+
"Scope set on parent control - scoped param should be returned");
|
|
271
|
+
|
|
272
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("3").length, 1, "library-parameters.json requested once for testlibs.themeParameters.lib3");
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
QUnit.test("Read multiple given parameters", function(assert) {
|
|
277
|
+
var aParams = ["sapUiThemeParamWithScopeForLib2", "sapUiThemeParamWithoutScopeForLib2"];
|
|
278
|
+
var oExpected = {
|
|
279
|
+
"sapUiThemeParamWithScopeForLib2": "#fbfbfb",
|
|
280
|
+
"sapUiThemeParamWithoutScopeForLib2": "#ffffff"
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
// Only relevant for single test execution
|
|
284
|
+
if (!sap.ui.getCore().getLoadedLibraries()["testlibs.themeParameters.lib2"]) {
|
|
285
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib2");
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
var oParamResult = getParametersInUnifiedHexNotation(aParams);
|
|
289
|
+
|
|
290
|
+
assert.deepEqual(oParamResult, oExpected,
|
|
291
|
+
"Key-value map for the given params 'sapUiThemeParamWithScopeForLib2' and 'sapUiThemeParamWithoutScopeForLib2' should be returned");
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
QUnit.test("Read multiple given parameters and Element", function(assert) {
|
|
295
|
+
var oElement = new Element();
|
|
296
|
+
var oParent = new Control();
|
|
297
|
+
|
|
298
|
+
// Only relevant for single test execution
|
|
299
|
+
if (!sap.ui.getCore().getLoadedLibraries()["testlibs.themeParameters.lib2"]) {
|
|
300
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib2");
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
oParent.addStyleClass("sapTestScope");
|
|
304
|
+
oElement.setParent(oParent);
|
|
305
|
+
|
|
306
|
+
var aParams = ["sapUiThemeParamWithScopeForLib2", "sapUiThemeParamWithoutScopeForLib2"];
|
|
307
|
+
var oExpected = {
|
|
308
|
+
"sapUiThemeParamWithScopeForLib2": "#000000",
|
|
309
|
+
"sapUiThemeParamWithoutScopeForLib2": "#ffffff"
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
var oParamResult = getParametersInUnifiedHexNotation(aParams, oElement);
|
|
313
|
+
|
|
314
|
+
assert.deepEqual(oParamResult, oExpected,
|
|
315
|
+
"Key-value map for the given params 'sapUiThemeParamWithScopeForLib2' and 'sapUiThemeParamWithoutScopeForLib2' should be returned");
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
QUnit.test("Read multiple given parameters (including undefined param name)", function(assert) {
|
|
319
|
+
var aParams = ["sapUiThemeParamWithScopeForLib2", "sapUiThemeParamWithoutScopeForLib2", "sapUiThemeParamDoesNotExistForLib2"];
|
|
320
|
+
var oExpected = {
|
|
321
|
+
"sapUiThemeParamWithScopeForLib2": "#fbfbfb",
|
|
322
|
+
"sapUiThemeParamWithoutScopeForLib2": "#ffffff",
|
|
323
|
+
"sapUiThemeParamDoesNotExistForLib2": undefined
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
// Only relevant for single test execution
|
|
327
|
+
if (!sap.ui.getCore().getLoadedLibraries()["testlibs.themeParameters.lib2"]) {
|
|
328
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib2");
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
var oParamResult = getParametersInUnifiedHexNotation(aParams);
|
|
332
|
+
|
|
333
|
+
assert.deepEqual(oParamResult, oExpected,
|
|
334
|
+
"Key-value map for the given params 'sapUiThemeParamWithScopeForLib2' and 'sapUiThemeParamWithoutScopeForLib2' should be returned");
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
QUnit.test("Relative URLs in parameters", function(assert) {
|
|
338
|
+
|
|
339
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib4");
|
|
340
|
+
|
|
341
|
+
// Need promise resolve to get async after load library
|
|
342
|
+
return Promise.resolve().then(function() {
|
|
343
|
+
var expected = {
|
|
344
|
+
url1: sPath + "/testdata/libraries/themeParameters/lib4/img1.jpg",
|
|
345
|
+
url2: sPath + "/testdata/libraries/themeParameters/lib4/foo/img2.jpg",
|
|
346
|
+
url3: sPath + "/testdata/libraries/themeParameters/lib4/foo/bar/img3.jpg",
|
|
347
|
+
url4: sPath + "/testdata/libraries/themeParameters/lib4/themes/sap_hcb/",
|
|
348
|
+
url5: sPath + "/testdata/libraries/themeParameters/lib4/themes/sap_hcb/",
|
|
349
|
+
url6: sPath + "/testdata/libraries/themeParameters/lib4/themes/sap_hcb/",
|
|
350
|
+
url7: "blob:http://example.com/6e88648c-00e1-4512-9695-5b702d8455b4",
|
|
351
|
+
url8: "data:text/plain;utf-8,foo",
|
|
352
|
+
url9: {
|
|
353
|
+
plain: "none",
|
|
354
|
+
themeImage: null,
|
|
355
|
+
themeImageForce: sap.ui.require.toUrl("sap/ui/core/themes/base/img/1x1.gif")
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
// plain values
|
|
360
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl1"), "url('" + expected.url1 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/img1.jpg'.");
|
|
361
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl2"), "url('" + expected.url2 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/foo/img2.jpg'.");
|
|
362
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl3"), "url('" + expected.url3 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/foo/bar/img3.jpg'.");
|
|
363
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl4"), "url('" + expected.url4 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/themes/sap_hcb/'.");
|
|
364
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl5"), "url('" + expected.url5 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/themes/sap_hcb/'.");
|
|
365
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl6"), "url('" + expected.url6 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/themes/sap_hcb/'.");
|
|
366
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl7"), "url('" + expected.url7 + "')", "Relative URL should be resolved correctly 'blob:http://example.com/6e88648c-00e1-4512-9695-5b702d8455b4'.");
|
|
367
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl8"), "url('" + expected.url8 + "')", "Relative URL should be resolved correctly 'data:text/plain;utf-8,foo'.");
|
|
368
|
+
assert.equal(Parameters.get("sapUiThemeParamUrl9"), expected.url9.plain, "'none' should stay as defined");
|
|
369
|
+
|
|
370
|
+
// _getThemeImage
|
|
371
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl1"), expected.url1, "Theme Image value should be correct for 'sapUiThemeParamUrl1'.");
|
|
372
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl2"), expected.url2, "Theme Image value should be correct for 'sapUiThemeParamUrl2'.");
|
|
373
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl3"), expected.url3, "Theme Image value should be correct for 'sapUiThemeParamUrl3'.");
|
|
374
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl4"), expected.url4, "Theme Image value should be correct for 'sapUiThemeParamUrl4'.");
|
|
375
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl5"), expected.url5, "Theme Image value should be correct for 'sapUiThemeParamUrl5'.");
|
|
376
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl6"), expected.url6, "Theme Image value should be correct for 'sapUiThemeParamUrl6'.");
|
|
377
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl7"), expected.url7, "Theme Image value should be correct for 'sapUiThemeParamUrl7'.");
|
|
378
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl8"), expected.url8, "Theme Image value should be correct for 'sapUiThemeParamUrl8'.");
|
|
379
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl9"), expected.url9.themeImage, "Theme Image value should be 'null' for parameter value 'none'.");
|
|
380
|
+
assert.equal(Parameters._getThemeImage("sapUiThemeParamUrl9", true), expected.url9.themeImageForce, "Theme Image value should be 'sap/ui/core/themes/base/img/1x1.gif' for parameter value 'none' (force).");
|
|
381
|
+
|
|
382
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("4").length, 1, "library-parameters.json requested once for testlibs.themeParameters.lib4");
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
QUnit.test("Relative URLs in parameters (legacy library)", function(assert) {
|
|
387
|
+
|
|
388
|
+
var expected = {
|
|
389
|
+
url1: sPath + "/testdata/legacy-uilib_legacyAPIs/img1.jpg",
|
|
390
|
+
url2: {
|
|
391
|
+
plain: "none",
|
|
392
|
+
themeImage: null,
|
|
393
|
+
themeImageForce: sap.ui.require.toUrl("sap/ui/core/themes/base/img/1x1.gif")
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
// plain values
|
|
398
|
+
assert.equal(Parameters.get("sapUiLegacyTestUrl1"), "url('" + expected.url1 + "')", "Relative URL should be resolved correctly 'sap/ui/core/qunit/testdata/uilib/img1.jpg'.");
|
|
399
|
+
assert.equal(Parameters.get("sapUiLegacyTestUrl2"), expected.url2.plain, "'none' should stay as defined");
|
|
400
|
+
|
|
401
|
+
// _getThemeImage
|
|
402
|
+
assert.equal(Parameters._getThemeImage("sapUiLegacyTestUrl1"), expected.url1, "Theme Image value should be correct for 'sapUiLegacyTestUrl1'.");
|
|
403
|
+
assert.equal(Parameters._getThemeImage("sapUiLegacyTestUrl2"), expected.url2.themeImage, "Theme Image value should be 'null' for parameter value 'none'.");
|
|
404
|
+
assert.equal(Parameters._getThemeImage("sapUiLegacyTestUrl2", true), expected.url2.themeImageForce, "Theme Image value should be 'sap/ui/core/themes/base/img/1x1.gif' for parameter value 'none' (force).");
|
|
405
|
+
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
QUnit.test("Get parameter while CSS after Applied finished loading and before ThemeManager processed Applied event", function(assert) {
|
|
409
|
+
var sPrefixedLibId = "sap-ui-theme-testlibs.themeParameters.lib17";
|
|
410
|
+
|
|
411
|
+
// Setup
|
|
412
|
+
Parameters.reset();
|
|
413
|
+
var oCssPromise1 = createLinkElement(sPrefixedLibId, true);
|
|
414
|
+
var oCssPromise2 = createLinkElement(sPrefixedLibId, false);
|
|
415
|
+
return Promise.all([oCssPromise1, oCssPromise2]).then(function() {
|
|
416
|
+
assert.strictEqual(Parameters.get("sapUiThemeParamForLib17"), "#fafafa", "Parameter 'sapUiThemeParamForLib17' has value: '#fafafa'");
|
|
417
|
+
|
|
418
|
+
// Cleanup
|
|
419
|
+
Array.from(document.querySelectorAll("link")).forEach(function (oLink) {
|
|
420
|
+
if (oLink.getAttribute("id") === sPrefixedLibId || oLink.getAttribute("data-sap-ui-foucmarker") === sPrefixedLibId) {
|
|
421
|
+
oLink.remove();
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Test module covers the async Parameters.get() API.
|
|
429
|
+
* The module tests the async API together with legacy Core API, e.g. "loadLibrary".
|
|
430
|
+
*
|
|
431
|
+
* @deprecated As of version 1.119
|
|
432
|
+
*/
|
|
433
|
+
QUnit.module("Parmeters.get (async)", {
|
|
434
|
+
before: function() {
|
|
435
|
+
// For some reasons window.performance.getResourceByType does only return the first 250?!
|
|
436
|
+
// entries therefore clear the resource timings upfront
|
|
437
|
+
window.performance.clearResourceTimings();
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
QUnit.test("Dynamically Loaded Library", function (assert) {
|
|
442
|
+
var done = assert.async();
|
|
443
|
+
assert.equal(Parameters.get({
|
|
444
|
+
name: "sapUiAsyncThemeParamForLib5"
|
|
445
|
+
}), undefined, "'undefined' should be returned for a parameter of a library that currently is not loaded");
|
|
446
|
+
|
|
447
|
+
sap.ui.getCore().initLibrary({ name: "testlibs.themeParameters.lib5" });
|
|
448
|
+
|
|
449
|
+
Parameters.get({
|
|
450
|
+
name: "sapUiAsyncThemeParamForLib5",
|
|
451
|
+
callback: function (sParamValue) {
|
|
452
|
+
assert.equal(sParamValue, "0.5rem", "sapUiAsyncThemeParamForLib5 must be defined as '0.5rem'");
|
|
453
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("5").length, 0, "library-parameters.json not requested for testlibs.themeParameters.lib5");
|
|
454
|
+
done();
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
QUnit.test("Read scoped parameters (from testlibs.themeParameters.lib6)", function(assert) {
|
|
460
|
+
var oControl = new Control(), done = assert.async();
|
|
461
|
+
|
|
462
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib6");
|
|
463
|
+
|
|
464
|
+
Parameters.get({
|
|
465
|
+
name: "sapUiAsyncThemeParamWithScopeForLib6",
|
|
466
|
+
scopeElement: oControl,
|
|
467
|
+
callback: function (sParamValue) {
|
|
468
|
+
assert.equal(sParamValue, "#ababab", "No scope set - default value should get returned");
|
|
469
|
+
oControl.addStyleClass("sapTestScope");
|
|
470
|
+
|
|
471
|
+
assert.equal(Parameters.get({
|
|
472
|
+
name: "sapUiAsyncThemeParamWithScopeForLib6",
|
|
473
|
+
scopeElement: oControl
|
|
474
|
+
}), "#222222", "Scope set directly on control - scoped param should be returned");
|
|
475
|
+
|
|
476
|
+
assert.equal(Parameters.get({
|
|
477
|
+
name: "sapUiAsyncThemeParamWithoutScopeForLib6",
|
|
478
|
+
scopeElement: oControl
|
|
479
|
+
}), "#aaaaaa", "Scope set directly on control but no scoped value defined - default value should get returned");
|
|
480
|
+
|
|
481
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("6").length, 0, "library-parameters.json not requested for testlibs.themeParameters.lib6");
|
|
482
|
+
|
|
483
|
+
done();
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
QUnit.test("Read multiple given parameters (including undefined param name)", function(assert) {
|
|
489
|
+
var done = assert.async();
|
|
490
|
+
var oControl = new Control();
|
|
491
|
+
var aParams = ["sapUiMultipleAsyncThemeParamWithScopeForLib7", "sapUiMultipleAsyncThemeParamWithoutScopeForLib7", "sapUiNotExistingTestParam", "sapUiBaseColor"];
|
|
492
|
+
var oExpected = {
|
|
493
|
+
"sapUiMultipleAsyncThemeParamWithScopeForLib7": "#cccccc",
|
|
494
|
+
"sapUiMultipleAsyncThemeParamWithoutScopeForLib7": "#dddddd",
|
|
495
|
+
"sapUiBaseColor": "#000000"
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib7");
|
|
499
|
+
oControl.addStyleClass("sapTestScope");
|
|
500
|
+
|
|
501
|
+
assert.strictEqual(Parameters.get({
|
|
502
|
+
name: aParams,
|
|
503
|
+
scopeElement: oControl,
|
|
504
|
+
callback: function (oParamResult) {
|
|
505
|
+
aParams.forEach(function(key) {
|
|
506
|
+
if (oParamResult[key]) {
|
|
507
|
+
oParamResult[key] = unifyHexNotation(oParamResult[key]);
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
assert.deepEqual(oParamResult, oExpected, "Key-value map for the given params 'sapUiMultipleAsyncThemeParamWithScopeForLib7', 'sapUiMultipleAsyncThemeParamWithoutScopeForLib7' and 'sapUiBaseColor' should be returned");
|
|
511
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("7").length, 0, "library-parameters.json not requested for testlibs.themeParameters.lib7");
|
|
512
|
+
done();
|
|
513
|
+
}
|
|
514
|
+
}), undefined, "Parameter 'sapUiBaseColor' should already be available but value should be returned in callback.");
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
QUnit.test("Call Parameters.get multiple times with same callback function should only be executed once", function (assert) {
|
|
518
|
+
assert.expect(3);
|
|
519
|
+
var done = assert.async(), callback = function (oParamResult) {
|
|
520
|
+
assert.deepEqual(oParamResult, {
|
|
521
|
+
"sapUiThemeParam1ForLib8": "#123456",
|
|
522
|
+
"sapUiThemeParam2ForLib8": "#654321"
|
|
523
|
+
}, "Callback should be called once with values for the given params 'sapUiThemeParam1ForLib8' and 'sapUiThemeParam2ForLib8'");
|
|
524
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("8").length, 0, "library-parameters.json not requested for testlibs.themeParameters.lib8");
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib8");
|
|
528
|
+
|
|
529
|
+
Parameters.get({
|
|
530
|
+
name: "sapUiThemeParam1ForLib8",
|
|
531
|
+
callback: callback
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
Parameters.get({
|
|
535
|
+
name: ["sapUiThemeParam1ForLib8", "sapUiThemeParam2ForLib8"],
|
|
536
|
+
callback: callback
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
Parameters.get({
|
|
540
|
+
name: "sapUiThemeParam2ForLib8",
|
|
541
|
+
callback: function (sParamResult) {
|
|
542
|
+
assert.strictEqual(sParamResult, "#654321", "Different callback function should be called once with value for the given param 'sapUiThemeParam2ForLib8' should be returned");
|
|
543
|
+
done();
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
QUnit.test("Read not defined parameter using callback", function(assert) {
|
|
549
|
+
var done = assert.async();
|
|
550
|
+
|
|
551
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib9");
|
|
552
|
+
|
|
553
|
+
Parameters.get({
|
|
554
|
+
name: "sapUiNotExistingTestParam",
|
|
555
|
+
callback: function (oParamResult) {
|
|
556
|
+
assert.deepEqual(oParamResult, undefined, "Value for the given param 'sapUiNotExistingTestParam' does not exist and 'undefined' should be returned");
|
|
557
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("8").length, 0, "library-parameters.json not requested for testlibs.themeParameters.lib9");
|
|
558
|
+
done();
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
QUnit.test("Read parameter first time from lib which CSS is already loaded shouldn't trigger a library-parameters.json request", function(assert) {
|
|
564
|
+
var done = assert.async();
|
|
565
|
+
var fnAssertApplied = function() {
|
|
566
|
+
|
|
567
|
+
// parameters of base theme should now be present
|
|
568
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParam1ForLib10"), "#123321", "sapUiThemeParam1ForLib10 must be defined as '#123321'");
|
|
569
|
+
assert.strictEqual(checkLibraryParametersJsonRequestForLib("10").length, 0, "library-parameters.json not requested for testlibs.themeParameters.lib10");
|
|
570
|
+
|
|
571
|
+
Theming.detachApplied(fnAssertApplied);
|
|
572
|
+
done();
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib10");
|
|
576
|
+
|
|
577
|
+
Theming.attachApplied(fnAssertApplied);
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
QUnit.test("getActiveScopesFor: Check scope chain for given rendered control", async function(assert) {
|
|
581
|
+
assert.expect(18);
|
|
582
|
+
var done = assert.async();
|
|
583
|
+
|
|
584
|
+
var oInnerIcon1 = new Icon();
|
|
585
|
+
var oInnerIcon2 = new Icon();
|
|
586
|
+
oInnerIcon2.addStyleClass("TestScope1");
|
|
587
|
+
var oOuterIcon1 = new Icon();
|
|
588
|
+
var oOuterIcon2 = new Icon();
|
|
589
|
+
oOuterIcon2.addStyleClass("TestScope1");
|
|
590
|
+
var oInnerBar = new Bar({ contentLeft: [oInnerIcon1, oInnerIcon2] });
|
|
591
|
+
oInnerBar.addStyleClass("TestScope1");
|
|
592
|
+
var oOuterBar = new Bar({ contentLeft: oInnerBar, contentRight: [oOuterIcon1, oOuterIcon2] });
|
|
593
|
+
oOuterBar.addStyleClass("TestScope2"); // No valid TestScope ==> only checking that this is not part of the ScopeChain
|
|
594
|
+
oOuterBar.placeAt("qunit-fixture");
|
|
595
|
+
|
|
596
|
+
await nextUIUpdate();
|
|
597
|
+
|
|
598
|
+
var fnAssertApplied = function () {
|
|
599
|
+
// CSS is loaded and scope 'TestScope1' is defined therefore different scope chains expected
|
|
600
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oOuterBar, true), [], "OuterBar - no own scope - empty scope chain");
|
|
601
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oInnerBar, true), [["TestScope1"]], "InnerBar - TestScope1 - [['TestScope1']]");
|
|
602
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oOuterIcon1, true), [], "InnerIcon1 - no own scope - empty scope chain");
|
|
603
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oOuterIcon2, true), [["TestScope1"]], "OuterIcon2 - TestScope1 - [['TestScope1']]");
|
|
604
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oInnerIcon1, true), [["TestScope1"]], "InnerIcon1 - no own scope - [['TestScope1']]");
|
|
605
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oInnerIcon2, true), [["TestScope1"], ["TestScope1"]], "InnerIcon2 - TestScope1 - [['TestScope1'], ['TestScope1']]");
|
|
606
|
+
|
|
607
|
+
assert.deepEqual(Parameters.get("sapUiThemeParam1ForLib11", oOuterBar), "#111213", "OuterBar - no own scope - default scope value #111213");
|
|
608
|
+
assert.deepEqual(Parameters.get("sapUiThemeParam1ForLib11", oInnerBar), "#312111", "InnerBar - TestScope1 - TestScope1 value #312111");
|
|
609
|
+
assert.deepEqual(Parameters.get("sapUiThemeParam1ForLib11", oOuterIcon1), "#111213", "OuterBar - no own scope - default scope value #111213");
|
|
610
|
+
assert.deepEqual(Parameters.get("sapUiThemeParam1ForLib11", oOuterIcon2), "#312111", "OuterIcon2 - TestScope1 - TestScope1 value #312111");
|
|
611
|
+
assert.deepEqual(Parameters.get("sapUiThemeParam1ForLib11", oInnerIcon1), "#312111", "InnerIcon1 - no own scope - TestScope1 value #312111");
|
|
612
|
+
assert.deepEqual(Parameters.get("sapUiThemeParam1ForLib11", oInnerIcon2), "#312111", "InnerIcon2 - TestScope1 - TestScope1 value #312111");
|
|
613
|
+
|
|
614
|
+
oOuterBar.destroy();
|
|
615
|
+
Theming.detachApplied(fnAssertApplied);
|
|
616
|
+
done();
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
sap.ui.getCore().loadLibrary("testlibs.themeParameters.lib11");
|
|
620
|
+
|
|
621
|
+
Theming.attachApplied(fnAssertApplied);
|
|
622
|
+
|
|
623
|
+
// No scope in css defined therefore empty scope chain for all combinations
|
|
624
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oOuterBar, true), [], "OuterBar - no own scope - no scope defined ==> empty scope chain");
|
|
625
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oInnerBar, true), [], "InnerBar - TestScope1 - no scope defined ==> empty scope chain");
|
|
626
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oOuterIcon1, true), [], "InnerIcon1 - no own scope - no scope defined ==> empty scope chain");
|
|
627
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oOuterIcon2, true), [], "OuterIcon2 - TestScope1 - no scope defined ==> empty scope chain");
|
|
628
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oInnerIcon1, true), [], "InnerIcon1 - no own scope - no scope defined ==> empty scope chain");
|
|
629
|
+
assert.deepEqual(Parameters.getActiveScopesFor(oInnerIcon2, true), [], "InnerIcon2 - TestScope1 - no scope defined ==> empty scope chain");
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
QUnit.test("After Theme Change: Using Parameters.get", function(assert) {
|
|
634
|
+
var done = assert.async();
|
|
635
|
+
var fnContinue = function(oEvent) {
|
|
636
|
+
if (oEvent.theme === "base") {
|
|
637
|
+
Theming.detachApplied(fnContinue);
|
|
638
|
+
done();
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
var fnApplied = function (oEvent) {
|
|
643
|
+
if (oEvent.theme === "sap_hcb") {
|
|
644
|
+
Theming.detachApplied(fnApplied);
|
|
645
|
+
|
|
646
|
+
sap.ui.getCore().loadLibraries(["testlibs.themeParameters.lib14"]).then(function () {
|
|
647
|
+
Parameters.get({
|
|
648
|
+
name: "sapUiThemeParamForLib14",
|
|
649
|
+
callback: function (oParamResult) {
|
|
650
|
+
assert.deepEqual(oParamResult, "#dfdfdf", "Value for the given param 'sapUiThemeParamForLib14' must be defined as '#dfdfdf' for theme 'base'");
|
|
651
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamForLib13"), "#efefef", "sapUiThemeParamForLib13 must be defined as '#efefef' for theme 'base'");
|
|
652
|
+
|
|
653
|
+
Theming.attachApplied(fnContinue);
|
|
654
|
+
Theming.setTheme("sap_hcb");
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
assert.equal(getParameterInUnifiedHexNotation("sapUiThemeParamForLib13"), "#fefefe", "sapUiThemeParamForLib13 must be defined as '#fefefe' for theme 'hcb'");
|
|
658
|
+
Theming.setTheme("base");
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
sap.ui.getCore().loadLibraries(["testlibs.themeParameters.lib13"]).then(function () {
|
|
664
|
+
Theming.attachApplied(fnApplied);
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
QUnit.test("Get parameter while CSS after Applied finished loading and before ThemeManager processed Applied event", function(assert) {
|
|
669
|
+
var sPrefixedLibId = "sap-ui-theme-testlibs.themeParameters.lib17";
|
|
670
|
+
|
|
671
|
+
// Setup
|
|
672
|
+
Parameters.reset();
|
|
673
|
+
var oCssPromise1 = createLinkElement(sPrefixedLibId, true);
|
|
674
|
+
var oCssPromise2 = createLinkElement(sPrefixedLibId, false);
|
|
675
|
+
return Promise.all([oCssPromise1, oCssPromise2]).then(function() {
|
|
676
|
+
assert.strictEqual(Parameters.get({ name: "sapUiThemeParamForLib17" }), "#fafafa", "Parameter 'sapUiThemeParamForLib17' has value: '#fafafa'");
|
|
677
|
+
|
|
678
|
+
// Cleanup
|
|
679
|
+
Array.from(document.querySelectorAll("link")).forEach(function (oLink) {
|
|
680
|
+
if (oLink.getAttribute("id") === sPrefixedLibId || oLink.getAttribute("data-sap-ui-foucmarker") === sPrefixedLibId) {
|
|
681
|
+
oLink.remove();
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
});
|