@openui5/sap.ui.core 1.120.1 → 1.120.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.act.js +1 -1
- package/src/jquery.sap.dom.js +1 -1
- package/src/jquery.sap.encoder.js +1 -1
- package/src/jquery.sap.events.js +1 -1
- package/src/jquery.sap.global.js +2 -2
- package/src/jquery.sap.history.js +1 -1
- package/src/jquery.sap.keycodes.js +1 -1
- package/src/jquery.sap.mobile.js +1 -1
- package/src/jquery.sap.promise.js +1 -1
- package/src/jquery.sap.properties.js +2 -2
- package/src/jquery.sap.resources.js +2 -2
- package/src/jquery.sap.script.js +2 -2
- package/src/jquery.sap.sjax.js +1 -1
- package/src/jquery.sap.storage.js +4 -4
- package/src/jquery.sap.strings.js +1 -1
- package/src/jquery.sap.stubs.js +1 -1
- package/src/jquery.sap.trace.js +1 -1
- package/src/jquery.sap.ui.js +1 -1
- package/src/jquery.sap.xml.js +1 -1
- package/src/sap/base/Event.js +2 -2
- package/src/sap/base/Eventing.js +2 -2
- package/src/sap/base/Log.js +1 -1
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/config/MemoryConfigurationProvider.js +1 -1
- package/src/sap/base/config.js +2 -2
- package/src/sap/base/i18n/Formatting.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +2 -2
- package/src/sap/base/i18n/Localization.js +1 -1
- package/src/sap/base/i18n/ResourceBundle.js +1 -1
- package/src/sap/base/i18n/date/CalendarType.js +1 -1
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +23 -10
- package/src/sap/base/security/URLListValidator.js +1 -1
- package/src/sap/base/security/URLWhitelist.js +1 -1
- package/src/sap/base/security/encodeCSS.js +1 -1
- package/src/sap/base/security/encodeJS.js +1 -1
- package/src/sap/base/security/encodeURL.js +1 -1
- package/src/sap/base/security/encodeURLParameters.js +1 -1
- package/src/sap/base/security/encodeXML.js +1 -1
- package/src/sap/base/security/sanitizeHTML.js +1 -1
- package/src/sap/base/strings/camelize.js +1 -1
- package/src/sap/base/strings/capitalize.js +1 -1
- package/src/sap/base/strings/escapeRegExp.js +1 -1
- package/src/sap/base/strings/formatMessage.js +1 -1
- package/src/sap/base/strings/hash.js +1 -1
- package/src/sap/base/strings/hyphenate.js +1 -1
- package/src/sap/base/strings/toHex.js +1 -1
- package/src/sap/base/strings/whitespaceReplacer.js +1 -1
- package/src/sap/base/util/Deferred.js +1 -1
- package/src/sap/base/util/JSTokenizer.js +1 -1
- package/src/sap/base/util/LoaderExtensions.js +1 -1
- package/src/sap/base/util/ObjectPath.js +1 -1
- package/src/sap/base/util/Properties.js +1 -1
- package/src/sap/base/util/UriParameters.js +1 -1
- package/src/sap/base/util/Version.js +1 -1
- package/src/sap/base/util/_merge.js +1 -1
- package/src/sap/base/util/array/diff.js +1 -1
- package/src/sap/base/util/array/uniqueSort.js +1 -1
- package/src/sap/base/util/deepClone.js +1 -1
- package/src/sap/base/util/deepEqual.js +1 -1
- package/src/sap/base/util/deepExtend.js +1 -1
- package/src/sap/base/util/defineCoupledProperty.js +1 -1
- package/src/sap/base/util/defineLazyProperty.js +1 -1
- package/src/sap/base/util/each.js +1 -1
- package/src/sap/base/util/extend.js +1 -1
- package/src/sap/base/util/fetch.js +1 -1
- package/src/sap/base/util/includes.js +1 -1
- package/src/sap/base/util/isEmptyObject.js +1 -1
- package/src/sap/base/util/isPlainObject.js +1 -1
- package/src/sap/base/util/merge.js +1 -1
- package/src/sap/base/util/mixedFetch.js +1 -1
- package/src/sap/base/util/now.js +1 -1
- package/src/sap/base/util/resolveReference.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +2 -2
- package/src/sap/base/util/restricted/_compact.js +2 -2
- package/src/sap/base/util/restricted/_curry.js +2 -2
- package/src/sap/base/util/restricted/_debounce.js +2 -2
- package/src/sap/base/util/restricted/_difference.js +2 -2
- package/src/sap/base/util/restricted/_differenceBy.js +2 -2
- package/src/sap/base/util/restricted/_differenceWith.js +2 -2
- package/src/sap/base/util/restricted/_flatMap.js +2 -2
- package/src/sap/base/util/restricted/_flatMapDeep.js +2 -2
- package/src/sap/base/util/restricted/_flatMapDepth.js +2 -2
- package/src/sap/base/util/restricted/_flatten.js +2 -2
- package/src/sap/base/util/restricted/_flattenDeep.js +2 -2
- package/src/sap/base/util/restricted/_flattenDepth.js +2 -2
- package/src/sap/base/util/restricted/_intersection.js +2 -2
- package/src/sap/base/util/restricted/_intersectionBy.js +2 -2
- package/src/sap/base/util/restricted/_intersectionWith.js +2 -2
- package/src/sap/base/util/restricted/_isEqual.js +2 -2
- package/src/sap/base/util/restricted/_isEqualWith.js +2 -2
- package/src/sap/base/util/restricted/_isNil.js +2 -2
- package/src/sap/base/util/restricted/_max.js +2 -2
- package/src/sap/base/util/restricted/_merge.js +2 -2
- package/src/sap/base/util/restricted/_mergeWith.js +2 -2
- package/src/sap/base/util/restricted/_min.js +2 -2
- package/src/sap/base/util/restricted/_omit.js +2 -2
- package/src/sap/base/util/restricted/_pick.js +2 -2
- package/src/sap/base/util/restricted/_pickBy.js +2 -2
- package/src/sap/base/util/restricted/_throttle.js +2 -2
- package/src/sap/base/util/restricted/_toArray.js +2 -2
- package/src/sap/base/util/restricted/_union.js +2 -2
- package/src/sap/base/util/restricted/_unionBy.js +2 -2
- package/src/sap/base/util/restricted/_unionWith.js +2 -2
- package/src/sap/base/util/restricted/_uniq.js +2 -2
- package/src/sap/base/util/restricted/_uniqBy.js +2 -2
- package/src/sap/base/util/restricted/_uniqWith.js +2 -2
- package/src/sap/base/util/restricted/_without.js +2 -2
- package/src/sap/base/util/restricted/_xor.js +2 -2
- package/src/sap/base/util/restricted/_xorBy.js +2 -2
- package/src/sap/base/util/restricted/_xorWith.js +2 -2
- package/src/sap/base/util/restricted/_zipObject.js +2 -2
- package/src/sap/base/util/restricted/_zipObjectDeep.js +2 -2
- package/src/sap/base/util/syncFetch.js +1 -1
- package/src/sap/base/util/uid.js +1 -1
- package/src/sap/base/util/values.js +1 -1
- package/src/sap/ui/Device.js +4 -4
- package/src/sap/ui/Global.js +5 -5
- package/src/sap/ui/VersionInfo.js +1 -1
- package/src/sap/ui/base/BindingInfo.js +1 -1
- package/src/sap/ui/base/BindingParser.js +5 -5
- package/src/sap/ui/base/DataType.js +6 -6
- package/src/sap/ui/base/DesignTime.js +1 -1
- package/src/sap/ui/base/Event.js +2 -2
- package/src/sap/ui/base/EventProvider.js +2 -2
- package/src/sap/ui/base/Exception.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +1 -1
- package/src/sap/ui/base/Interface.js +2 -2
- package/src/sap/ui/base/ManagedObject.js +10 -10
- package/src/sap/ui/base/ManagedObjectMetadata.js +2 -2
- package/src/sap/ui/base/ManagedObjectObserver.js +1 -1
- package/src/sap/ui/base/ManagedObjectRegistry.js +187 -170
- package/src/sap/ui/base/Metadata.js +2 -2
- package/src/sap/ui/base/Object.js +2 -2
- package/src/sap/ui/base/ObjectPool.js +2 -2
- package/src/sap/ui/base/SyncPromise.js +1 -1
- package/src/sap/ui/base/syncXHRFix.js +1 -1
- package/src/sap/ui/core/.library +4 -4
- package/src/sap/ui/core/AccessKeysEnablement.js +1 -1
- package/src/sap/ui/core/AnimationMode.js +1 -1
- package/src/sap/ui/core/AppCacheBuster.js +1 -1
- package/src/sap/ui/core/BlockLayerUtils.js +1 -1
- package/src/sap/ui/core/BusyIndicator.js +2 -2
- package/src/sap/ui/core/BusyIndicatorUtils.js +1 -1
- package/src/sap/ui/core/CalendarType.js +1 -1
- package/src/sap/ui/core/CommandExecution.js +1 -1
- package/src/sap/ui/core/Component.js +31 -145
- package/src/sap/ui/core/ComponentContainer.js +4 -4
- package/src/sap/ui/core/ComponentContainerRenderer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +2 -2
- package/src/sap/ui/core/ComponentRegistry.js +153 -0
- package/src/sap/ui/core/ComponentSupport.js +4 -4
- package/src/sap/ui/core/Configuration.js +2 -2
- package/src/sap/ui/core/ContextMenuSupport.js +1 -1
- package/src/sap/ui/core/Control.js +7 -5
- package/src/sap/ui/core/ControlBehavior.js +1 -1
- package/src/sap/ui/core/Core.js +7 -5
- package/src/sap/ui/core/CustomData.js +2 -2
- package/src/sap/ui/core/CustomStyleClassSupport.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +2 -2
- package/src/sap/ui/core/Element.js +26 -142
- package/src/sap/ui/core/ElementMetadata.js +2 -2
- package/src/sap/ui/core/ElementRegistry.js +159 -0
- package/src/sap/ui/core/EnabledPropagator.js +2 -2
- package/src/sap/ui/core/EventBus.js +2 -2
- package/src/sap/ui/core/ExtensionPoint.js +6 -6
- package/src/sap/ui/core/FocusHandler.js +4 -3
- package/src/sap/ui/core/Fragment.js +6 -6
- package/src/sap/ui/core/HTML.js +2 -2
- package/src/sap/ui/core/HTMLRenderer.js +1 -1
- package/src/sap/ui/core/History.js +2 -2
- package/src/sap/ui/core/Icon.js +2 -2
- package/src/sap/ui/core/IconPool.js +1 -1
- package/src/sap/ui/core/IconRenderer.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +2 -2
- package/src/sap/ui/core/IntervalTrigger.js +2 -2
- package/src/sap/ui/core/InvisibleMessage.js +2 -2
- package/src/sap/ui/core/InvisibleRenderer.js +2 -2
- package/src/sap/ui/core/InvisibleText.js +2 -2
- package/src/sap/ui/core/Item.js +2 -2
- package/src/sap/ui/core/LabelEnablement.js +2 -2
- package/src/sap/ui/core/LayoutData.js +2 -2
- package/src/sap/ui/core/Lib.js +15 -8
- package/src/sap/ui/core/ListItem.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicator.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicatorRenderer.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicatorSupport.js +1 -1
- package/src/sap/ui/core/Locale.js +2 -2
- package/src/sap/ui/core/LocaleData.js +56 -12
- package/src/sap/ui/core/Manifest.js +5 -6
- package/src/sap/ui/core/Message.js +3 -2
- package/src/sap/ui/core/Messaging.js +3 -3
- package/src/sap/ui/core/Patcher.js +1 -1
- package/src/sap/ui/core/Placeholder.js +1 -1
- package/src/sap/ui/core/Popup.js +1 -1
- package/src/sap/ui/core/RenderManager.js +2 -2
- package/src/sap/ui/core/Renderer.js +2 -2
- package/src/sap/ui/core/Rendering.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +2 -2
- package/src/sap/ui/core/ScrollBar.js +2 -2
- package/src/sap/ui/core/ScrollBarRenderer.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +2 -2
- package/src/sap/ui/core/Shortcut.js +16 -10
- package/src/sap/ui/core/ShortcutHint.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +1 -1
- package/src/sap/ui/core/StashedControlSupport.js +1 -1
- package/src/sap/ui/core/StaticArea.js +5 -2
- package/src/sap/ui/core/Supportability.js +1 -1
- package/src/sap/ui/core/Theming.js +3 -3
- package/src/sap/ui/core/Title.js +2 -2
- package/src/sap/ui/core/TooltipBase.js +2 -2
- package/src/sap/ui/core/UIArea.js +52 -14
- package/src/sap/ui/core/UIAreaRegistry.js +150 -0
- package/src/sap/ui/core/UIComponent.js +4 -4
- package/src/sap/ui/core/UIComponentMetadata.js +2 -2
- package/src/sap/ui/core/ValueStateSupport.js +2 -2
- package/src/sap/ui/core/VariantLayoutData.js +2 -2
- package/src/sap/ui/core/XMLComposite.js +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
- package/src/sap/ui/core/XMLTemplateProcessor.js +96 -77
- package/src/sap/ui/core/_IconRegistry.js +1 -1
- package/src/sap/ui/core/_UrlResolver.js +1 -1
- package/src/sap/ui/core/boot/_bootConfig.js +1 -1
- package/src/sap/ui/core/boot/_runBoot.js +1 -1
- package/src/sap/ui/core/boot/initDOM.js +1 -1
- package/src/sap/ui/core/boot/loadCalendar.js +1 -1
- package/src/sap/ui/core/boot/loadManifest.js +1 -1
- package/src/sap/ui/core/boot/loadModules.js +1 -1
- package/src/sap/ui/core/boot/onInit.js +1 -1
- package/src/sap/ui/core/boot.js +1 -1
- package/src/sap/ui/core/cache/CacheManager.js +1 -1
- package/src/sap/ui/core/cache/CacheManagerNOP.js +1 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
- package/src/sap/ui/core/cldr/Unicode-Data-Files-LICENSE.txt +1 -1
- package/src/sap/ui/core/cldr/cy.json +12 -3
- package/src/sap/ui/core/cldr/en_AU.json +48 -12
- package/src/sap/ui/core/cldr/en_GB.json +24 -6
- package/src/sap/ui/core/cldr/en_HK.json +24 -6
- package/src/sap/ui/core/cldr/en_IE.json +24 -6
- package/src/sap/ui/core/cldr/en_IN.json +24 -6
- package/src/sap/ui/core/cldr/en_NZ.json +24 -6
- package/src/sap/ui/core/cldr/en_PG.json +24 -6
- package/src/sap/ui/core/cldr/en_SG.json +24 -6
- package/src/sap/ui/core/cldr/en_ZA.json +24 -6
- package/src/sap/ui/core/cldr/es.json +288 -72
- package/src/sap/ui/core/cldr/es_AR.json +288 -72
- package/src/sap/ui/core/cldr/es_BO.json +288 -72
- package/src/sap/ui/core/cldr/es_CL.json +144 -36
- package/src/sap/ui/core/cldr/es_CO.json +144 -36
- package/src/sap/ui/core/cldr/es_MX.json +288 -72
- package/src/sap/ui/core/cldr/fa.json +48 -12
- package/src/sap/ui/core/cldr/id.json +56 -14
- package/src/sap/ui/core/cldr/kk.json +184 -46
- package/src/sap/ui/core/cldr/ms.json +56 -14
- package/src/sap/ui/core/cldr/nb.json +36 -9
- package/src/sap/ui/core/cldr/nl.json +264 -66
- package/src/sap/ui/core/cldr/nl_BE.json +264 -66
- package/src/sap/ui/core/cldr/pt.json +288 -72
- package/src/sap/ui/core/cldr/pt_PT.json +288 -72
- package/src/sap/ui/core/cldr/sr.json +96 -24
- package/src/sap/ui/core/cldr/sr_Latn.json +72 -18
- package/src/sap/ui/core/date/Buddhist.js +1 -1
- package/src/sap/ui/core/date/CalendarUtils.js +1 -1
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +1 -1
- package/src/sap/ui/core/date/Gregorian.js +1 -1
- package/src/sap/ui/core/date/Islamic.js +1 -1
- package/src/sap/ui/core/date/Japanese.js +1 -1
- package/src/sap/ui/core/date/Persian.js +1 -1
- package/src/sap/ui/core/date/UI5Date.js +2 -2
- package/src/sap/ui/core/date/UniversalDate.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +1 -1
- package/src/sap/ui/core/date/_Calendars.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +2 -2
- package/src/sap/ui/core/delegate/ScrollEnablement.js +2 -2
- package/src/sap/ui/core/designtime/ComponentContainer.designtime.js +1 -1
- package/src/sap/ui/core/designtime/CustomData.designtime.js +1 -1
- package/src/sap/ui/core/designtime/Icon.designtime.js +1 -1
- package/src/sap/ui/core/designtime/UIComponent.designtime.js +1 -1
- package/src/sap/ui/core/designtime/library.designtime.js +1 -1
- package/src/sap/ui/core/designtime/mvc/ControllerExtensionTemplate.js +1 -1
- package/src/sap/ui/core/designtime/mvc/View.designtime.js +1 -1
- package/src/sap/ui/core/designtime/mvc/XMLView.designtime.js +1 -1
- package/src/sap/ui/core/dnd/DragAndDrop.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +2 -2
- package/src/sap/ui/core/dnd/DragDropInfo.js +2 -2
- package/src/sap/ui/core/dnd/DragInfo.js +2 -2
- package/src/sap/ui/core/dnd/DropInfo.js +2 -2
- package/src/sap/ui/core/format/DateFormat.js +26 -14
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +1 -1
- package/src/sap/ui/core/format/FileSizeFormat.js +1 -1
- package/src/sap/ui/core/format/ListFormat.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +2 -2
- package/src/sap/ui/core/getCompatibilityVersion.js +2 -2
- package/src/sap/ui/core/hyphenation/Hyphenation.js +2 -2
- package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +1 -1
- package/src/sap/ui/core/library.js +10 -4
- package/src/sap/ui/core/library.support.js +1 -1
- package/src/sap/ui/core/message/ControlMessageProcessor.js +2 -2
- package/src/sap/ui/core/message/Message.js +8 -8
- package/src/sap/ui/core/message/MessageManager.js +2 -2
- package/src/sap/ui/core/message/MessageMixin.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +2 -2
- package/src/sap/ui/core/message/MessageProcessor.js +2 -2
- package/src/sap/ui/core/message/MessageType.js +2 -2
- package/src/sap/ui/core/messagebundle_cnr.properties +352 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +297 -285
- package/src/sap/ui/core/mvc/Controller.js +16 -14
- package/src/sap/ui/core/mvc/ControllerExtension.js +8 -6
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +2 -2
- package/src/sap/ui/core/mvc/ControllerMetadata.js +2 -2
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +5 -5
- package/src/sap/ui/core/mvc/HTMLView.js +2 -2
- package/src/sap/ui/core/mvc/HTMLViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +2 -2
- package/src/sap/ui/core/mvc/JSONViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/JSViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/OverrideExecution.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/View.js +21 -10
- package/src/sap/ui/core/mvc/ViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/ViewType.js +1 -1
- package/src/sap/ui/core/mvc/XMLProcessingMode.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +9 -3
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +2 -2
- package/src/sap/ui/core/plugin/LessSupport.js +2 -2
- package/src/sap/ui/core/plugin/TemplatingSupport.js +2 -2
- package/src/sap/ui/core/postmessage/Bus.js +2 -2
- package/src/sap/ui/core/postmessage/confirmationDialog.js +2 -2
- package/src/sap/ui/core/routing/HashChanger.js +1 -1
- package/src/sap/ui/core/routing/HashChangerBase.js +1 -1
- package/src/sap/ui/core/routing/History.js +2 -2
- package/src/sap/ui/core/routing/Route.js +7 -7
- package/src/sap/ui/core/routing/Router.js +7 -7
- package/src/sap/ui/core/routing/RouterHashChanger.js +1 -1
- package/src/sap/ui/core/routing/Target.js +1 -1
- package/src/sap/ui/core/routing/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +4 -4
- package/src/sap/ui/core/routing/Views.js +1 -1
- package/src/sap/ui/core/routing/async/Route.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +3 -3
- package/src/sap/ui/core/routing/async/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/async/Targets.js +2 -2
- package/src/sap/ui/core/routing/sync/Route.js +1 -1
- package/src/sap/ui/core/routing/sync/Target.js +1 -1
- package/src/sap/ui/core/routing/sync/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/sync/Targets.js +1 -1
- package/src/sap/ui/core/rules/App.support.js +1 -1
- package/src/sap/ui/core/rules/Config.support.js +1 -1
- package/src/sap/ui/core/rules/CoreHelper.support.js +1 -1
- package/src/sap/ui/core/rules/Misc.support.js +4 -4
- package/src/sap/ui/core/rules/Model.support.js +1 -1
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +1 -1
- package/src/sap/ui/core/rules/View.support.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +2 -2
- package/src/sap/ui/core/search/SearchProvider.js +2 -2
- package/src/sap/ui/core/service/Service.js +2 -2
- package/src/sap/ui/core/service/ServiceFactory.js +2 -2
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +2 -2
- package/src/sap/ui/core/support/BootSupportTool.js +1 -1
- package/src/sap/ui/core/support/Hotkeys.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +2 -2
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +1 -1
- package/src/sap/ui/core/support/Support.js +2 -2
- package/src/sap/ui/core/support/ToolsAPI.js +1 -1
- package/src/sap/ui/core/support/bootstrapFallback.js +1 -1
- package/src/sap/ui/core/support/controls/InteractionSlider.js +1 -1
- package/src/sap/ui/core/support/controls/InteractionTree.js +1 -1
- package/src/sap/ui/core/support/controls/ObjectViewer.js +1 -1
- package/src/sap/ui/core/support/controls/TimelineOverview.js +1 -1
- package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
- package/src/sap/ui/core/support/debugReboot.js +1 -1
- package/src/sap/ui/core/support/plugins/Breakpoint.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +7 -5
- package/src/sap/ui/core/support/plugins/Debugging.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
- package/src/sap/ui/core/support/plugins/LocalStorage.js +2 -2
- package/src/sap/ui/core/support/plugins/Performance.js +2 -2
- package/src/sap/ui/core/support/plugins/Selector.js +2 -2
- package/src/sap/ui/core/support/plugins/TechInfo.js +2 -2
- package/src/sap/ui/core/support/plugins/Trace.js +2 -2
- package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
- package/src/sap/ui/core/support/techinfo/moduleTreeHelper.js +1 -1
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +1 -1
- package/src/sap/ui/core/support/trace/EppLib.js +1 -1
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +1 -1
- package/src/sap/ui/core/syncStyleClass.js +1 -1
- package/src/sap/ui/core/themes/base/library.source.less +1 -1
- package/src/sap/ui/core/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/core/theming/Parameters.js +8 -8
- package/src/sap/ui/core/theming/ThemeHelper.js +3 -3
- package/src/sap/ui/core/theming/ThemeManager.js +3 -3
- package/src/sap/ui/core/tmpl/DOMAttribute.js +2 -2
- package/src/sap/ui/core/tmpl/DOMElement.js +2 -2
- package/src/sap/ui/core/tmpl/DOMElementRenderer.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +2 -2
- package/src/sap/ui/core/tmpl/Template.js +2 -2
- package/src/sap/ui/core/tmpl/TemplateControl.js +2 -2
- package/src/sap/ui/core/tmpl/TemplateControlRenderer.js +1 -1
- package/src/sap/ui/core/tmpl/_parsePath.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +2 -2
- package/src/sap/ui/core/util/DraftEnabledMockServer.js +1 -1
- package/src/sap/ui/core/util/Export.js +2 -2
- package/src/sap/ui/core/util/ExportCell.js +2 -2
- package/src/sap/ui/core/util/ExportColumn.js +2 -2
- package/src/sap/ui/core/util/ExportRow.js +2 -2
- package/src/sap/ui/core/util/ExportType.js +2 -2
- package/src/sap/ui/core/util/ExportTypeCSV.js +2 -2
- package/src/sap/ui/core/util/File.js +2 -2
- package/src/sap/ui/core/util/LibraryInfo.js +2 -2
- package/src/sap/ui/core/util/MockServer.js +35 -4
- package/src/sap/ui/core/util/PasteHelper.js +2 -2
- package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +1 -1
- package/src/sap/ui/core/util/ShortcutHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +1 -1
- package/src/sap/ui/core/util/_LocalizationHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +16 -1
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +12 -1
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +15 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/Serializer.js +2 -2
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +2 -2
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +2 -2
- package/src/sap/ui/core/util/serializer/delegate/XML.js +2 -2
- package/src/sap/ui/core/webc/WebComponent.js +2 -2
- package/src/sap/ui/core/webc/WebComponentMetadata.js +2 -2
- package/src/sap/ui/core/webc/WebComponentRenderer.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +2 -2
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +2 -2
- package/src/sap/ui/core/ws/WebSocket.js +2 -2
- package/src/sap/ui/debug/ControlTree.js +2 -2
- package/src/sap/ui/debug/DebugEnv.js +2 -2
- package/src/sap/ui/debug/Highlighter.js +1 -1
- package/src/sap/ui/debug/LogViewer.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +2 -2
- package/src/sap/ui/dom/_ready.js +1 -1
- package/src/sap/ui/dom/containsOrEquals.js +1 -1
- package/src/sap/ui/dom/denormalizeScrollBeginRTL.js +1 -1
- package/src/sap/ui/dom/denormalizeScrollLeftRTL.js +1 -1
- package/src/sap/ui/dom/getComputedStyleFix.js +1 -1
- package/src/sap/ui/dom/getFirstEditableInput.js +1 -1
- package/src/sap/ui/dom/getOwnerWindow.js +1 -1
- package/src/sap/ui/dom/getScrollbarSize.js +1 -1
- package/src/sap/ui/dom/includeScript.js +1 -1
- package/src/sap/ui/dom/includeStylesheet.js +1 -1
- package/src/sap/ui/dom/isBehindOtherElement.js +1 -1
- package/src/sap/ui/dom/isHidden.js +1 -1
- package/src/sap/ui/dom/jquery/Aria.js +1 -1
- package/src/sap/ui/dom/jquery/Focusable.js +1 -1
- package/src/sap/ui/dom/jquery/Selection.js +1 -1
- package/src/sap/ui/dom/jquery/Selectors.js +1 -1
- package/src/sap/ui/dom/jquery/control.js +1 -1
- package/src/sap/ui/dom/jquery/cursorPos.js +1 -1
- package/src/sap/ui/dom/jquery/getSelectedText.js +1 -1
- package/src/sap/ui/dom/jquery/hasTabIndex.js +1 -1
- package/src/sap/ui/dom/jquery/parentByAttribute.js +1 -1
- package/src/sap/ui/dom/jquery/rect.js +1 -1
- package/src/sap/ui/dom/jquery/rectContains.js +1 -1
- package/src/sap/ui/dom/jquery/scrollLeftRTL.js +1 -1
- package/src/sap/ui/dom/jquery/scrollRightRTL.js +1 -1
- package/src/sap/ui/dom/jquery/selectText.js +1 -1
- package/src/sap/ui/dom/jquery/zIndex.js +1 -1
- package/src/sap/ui/dom/units/Rem.js +1 -1
- package/src/sap/ui/events/ControlEvents.js +1 -1
- package/src/sap/ui/events/F6Navigation.js +1 -1
- package/src/sap/ui/events/KeyCodes.js +1 -1
- package/src/sap/ui/events/PasteEventFix.js +1 -1
- package/src/sap/ui/events/PseudoEvents.js +1 -1
- package/src/sap/ui/events/TouchToMouseMapping.js +1 -1
- package/src/sap/ui/events/checkMouseEnterOrLeave.js +1 -1
- package/src/sap/ui/events/isMouseEventDelayed.js +1 -1
- package/src/sap/ui/events/isSpecialKey.js +1 -1
- package/src/sap/ui/events/jquery/EventExtension.js +1 -1
- package/src/sap/ui/events/jquery/EventSimulation.js +1 -1
- package/src/sap/ui/events/jquery/EventTriggerHook.js +1 -1
- package/src/sap/ui/model/Binding.js +3 -3
- package/src/sap/ui/model/BindingMode.js +1 -1
- package/src/sap/ui/model/ChangeReason.js +1 -1
- package/src/sap/ui/model/ClientContextBinding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +1 -1
- package/src/sap/ui/model/ClientModel.js +2 -2
- package/src/sap/ui/model/ClientPropertyBinding.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +1 -1
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +6 -6
- package/src/sap/ui/model/CompositeType.js +2 -2
- package/src/sap/ui/model/Context.js +1 -1
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +11 -11
- package/src/sap/ui/model/Filter.js +1 -1
- package/src/sap/ui/model/FilterOperator.js +1 -1
- package/src/sap/ui/model/FilterProcessor.js +9 -6
- package/src/sap/ui/model/FilterType.js +1 -1
- package/src/sap/ui/model/FormatException.js +1 -1
- package/src/sap/ui/model/ListBinding.js +1 -1
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +3 -3
- package/src/sap/ui/model/MetaModel.js +2 -2
- package/src/sap/ui/model/Model.js +2 -2
- package/src/sap/ui/model/ParseException.js +1 -1
- package/src/sap/ui/model/PropertyBinding.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +2 -2
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +1 -1
- package/src/sap/ui/model/SorterProcessor.js +1 -1
- package/src/sap/ui/model/StaticBinding.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
- package/src/sap/ui/model/TreeBinding.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +1 -1
- package/src/sap/ui/model/TreeBindingUtils.js +1 -1
- package/src/sap/ui/model/Type.js +2 -2
- package/src/sap/ui/model/ValidateException.js +1 -1
- package/src/sap/ui/model/_Helper.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +7 -7
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +1 -1
- package/src/sap/ui/model/json/JSONListBinding.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +2 -2
- package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
- package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +2 -2
- package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
- package/src/sap/ui/model/odata/CountMode.js +1 -1
- package/src/sap/ui/model/odata/Filter.js +1 -1
- package/src/sap/ui/model/odata/MessageScope.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +4 -4
- package/src/sap/ui/model/odata/ODataMetaModel.js +2 -2
- package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
- package/src/sap/ui/model/odata/ODataModel.js +2 -2
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +1 -1
- package/src/sap/ui/model/odata/ODataUtils.js +11 -6
- package/src/sap/ui/model/odata/OperationMode.js +1 -1
- package/src/sap/ui/model/odata/UpdateMethod.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +2 -2
- package/src/sap/ui/model/odata/type/Byte.js +2 -2
- package/src/sap/ui/model/odata/type/Currency.js +2 -2
- package/src/sap/ui/model/odata/type/Date.js +2 -2
- package/src/sap/ui/model/odata/type/DateTime.js +2 -2
- package/src/sap/ui/model/odata/type/DateTimeBase.js +2 -2
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +2 -2
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +2 -2
- package/src/sap/ui/model/odata/type/Decimal.js +2 -2
- package/src/sap/ui/model/odata/type/Double.js +2 -2
- package/src/sap/ui/model/odata/type/Guid.js +2 -2
- package/src/sap/ui/model/odata/type/Int.js +2 -2
- package/src/sap/ui/model/odata/type/Int16.js +2 -2
- package/src/sap/ui/model/odata/type/Int32.js +2 -2
- package/src/sap/ui/model/odata/type/Int64.js +2 -2
- package/src/sap/ui/model/odata/type/ODataType.js +2 -2
- package/src/sap/ui/model/odata/type/Raw.js +2 -2
- package/src/sap/ui/model/odata/type/SByte.js +2 -2
- package/src/sap/ui/model/odata/type/Single.js +2 -2
- package/src/sap/ui/model/odata/type/Stream.js +2 -2
- package/src/sap/ui/model/odata/type/String.js +2 -2
- package/src/sap/ui/model/odata/type/Time.js +2 -2
- package/src/sap/ui/model/odata/type/TimeOfDay.js +2 -2
- package/src/sap/ui/model/odata/type/Unit.js +2 -2
- package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
- package/src/sap/ui/model/odata/v2/BatchMode.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +5 -5
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +18 -10
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +1 -1
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +33 -28
- package/src/sap/ui/model/odata/v4/ODataBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +19 -13
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +199 -156
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +11 -9
- package/src/sap/ui/model/odata/v4/ODataModel.js +10 -5
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +10 -7
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/v4/ODataUtils.js +1 -1
- package/src/sap/ui/model/odata/v4/SubmitMode.js +1 -1
- package/src/sap/ui/model/odata/v4/ValueListType.js +1 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +231 -90
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +34 -21
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +72 -20
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Parser.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +10 -6
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_V4MetadataConverter.js +1 -1
- package/src/sap/ui/model/odata/v4/ts.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +2 -2
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +2 -2
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +2 -2
- package/src/sap/ui/model/type/DateInterval.js +2 -2
- package/src/sap/ui/model/type/DateTime.js +2 -2
- package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
- package/src/sap/ui/model/type/FileSize.js +2 -2
- package/src/sap/ui/model/type/Float.js +2 -2
- package/src/sap/ui/model/type/Integer.js +2 -2
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +2 -2
- package/src/sap/ui/model/type/TimeInterval.js +2 -2
- package/src/sap/ui/model/type/Unit.js +2 -2
- package/src/sap/ui/model/xml/XMLListBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +2 -2
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLTreeBinding.js +1 -1
- package/src/sap/ui/performance/BeaconRequest.js +1 -1
- package/src/sap/ui/performance/Measurement.js +1 -1
- package/src/sap/ui/performance/XHRInterceptor.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +1 -1
- package/src/sap/ui/performance/trace/FESRHelper.js +1 -1
- package/src/sap/ui/performance/trace/Interaction.js +1 -1
- package/src/sap/ui/performance/trace/Passport.js +1 -1
- package/src/sap/ui/performance/trace/initTraces.js +1 -1
- package/src/sap/ui/qunit/QUnitUtils.js +1 -1
- package/src/sap/ui/qunit/qunit-2-css.js +1 -1
- package/src/sap/ui/qunit/qunit-coverage-istanbul.js +1 -1
- package/src/sap/ui/qunit/qunit-coverage.js +1 -1
- package/src/sap/ui/qunit/qunit-css.js +1 -1
- package/src/sap/ui/qunit/qunit-junit.js +1 -1
- package/src/sap/ui/qunit/qunit-redirect.js +1 -1
- package/src/sap/ui/qunit/sinon-qunit-bridge.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +2 -2
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +6 -6
- package/src/sap/ui/qunit/utils/createAndAppendDiv.js +1 -1
- package/src/sap/ui/qunit/utils/nextUIUpdate.js +1 -1
- package/src/sap/ui/qunit/utils/waitForThemeApplied.js +1 -1
- package/src/sap/ui/security/FrameOptions.js +1 -1
- package/src/sap/ui/test/BlanketReporter.js +1 -1
- package/src/sap/ui/test/BranchTracking.js +5 -1
- package/src/sap/ui/test/ModuleTracking.js +1 -1
- package/src/sap/ui/test/Opa.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +1 -1
- package/src/sap/ui/test/OpaExtension.js +1 -1
- package/src/sap/ui/test/OpaPlugin.js +1 -1
- package/src/sap/ui/test/PageObjectFactory.js +1 -1
- package/src/sap/ui/test/RecordReplay.js +1 -1
- package/src/sap/ui/test/RecorderHotkeyListener.js +1 -1
- package/src/sap/ui/test/TestUtils.js +1 -1
- package/src/sap/ui/test/_BrowserLogCollector.js +1 -1
- package/src/sap/ui/test/_ControlFinder.js +1 -1
- package/src/sap/ui/test/_FocusListener.js +1 -1
- package/src/sap/ui/test/_LogCollector.js +1 -1
- package/src/sap/ui/test/_OpaLogger.js +1 -1
- package/src/sap/ui/test/_OpaUriParameterParser.js +1 -1
- package/src/sap/ui/test/_ParameterValidator.js +1 -1
- package/src/sap/ui/test/_UsageReport.js +1 -1
- package/src/sap/ui/test/_ValidationParameters.js +1 -1
- package/src/sap/ui/test/actions/Action.js +1 -1
- package/src/sap/ui/test/actions/Drag.js +1 -1
- package/src/sap/ui/test/actions/Drop.js +1 -1
- package/src/sap/ui/test/actions/EnterText.js +2 -6
- package/src/sap/ui/test/actions/Press.js +1 -1
- package/src/sap/ui/test/actions/Scroll.js +1 -1
- package/src/sap/ui/test/autowaiter/WaiterBase.js +1 -1
- package/src/sap/ui/test/autowaiter/_UIUpdatesWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_XHRWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiterAsync.js +1 -1
- package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_fetchWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_moduleWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_navigationContainerWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_promiseWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_timeoutWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_utils.js +1 -1
- package/src/sap/ui/test/generic/GenericTestCollection.js +2 -1
- package/src/sap/ui/test/generic/TestBase.js +5 -5
- package/src/sap/ui/test/generic/Utils.js +4 -3
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +1 -1
- package/src/sap/ui/test/gherkin/GherkinTestGenerator.js +1 -1
- package/src/sap/ui/test/gherkin/StepDefinitions.js +1 -1
- package/src/sap/ui/test/gherkin/dataTableUtils.js +1 -1
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +1 -1
- package/src/sap/ui/test/gherkin/qUnitTestHarness.js +1 -1
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +1 -1
- package/src/sap/ui/test/launchers/componentLauncher.js +1 -1
- package/src/sap/ui/test/launchers/iFrameLauncher.js +1 -1
- package/src/sap/ui/test/matchers/AggregationContainsPropertyEqual.js +1 -1
- package/src/sap/ui/test/matchers/AggregationEmpty.js +1 -1
- package/src/sap/ui/test/matchers/AggregationFilled.js +1 -1
- package/src/sap/ui/test/matchers/AggregationLengthEquals.js +1 -1
- package/src/sap/ui/test/matchers/Ancestor.js +1 -1
- package/src/sap/ui/test/matchers/BindingPath.js +1 -1
- package/src/sap/ui/test/matchers/Descendant.js +1 -1
- package/src/sap/ui/test/matchers/I18NText.js +1 -1
- package/src/sap/ui/test/matchers/Interactable.js +1 -1
- package/src/sap/ui/test/matchers/LabelFor.js +1 -1
- package/src/sap/ui/test/matchers/Matcher.js +1 -1
- package/src/sap/ui/test/matchers/MatcherFactory.js +1 -1
- package/src/sap/ui/test/matchers/Properties.js +1 -1
- package/src/sap/ui/test/matchers/PropertyStrictEquals.js +1 -1
- package/src/sap/ui/test/matchers/Sibling.js +1 -1
- package/src/sap/ui/test/matchers/Visible.js +1 -1
- package/src/sap/ui/test/matchers/_Busy.js +1 -1
- package/src/sap/ui/test/matchers/_Editable.js +1 -1
- package/src/sap/ui/test/matchers/_Enabled.js +1 -1
- package/src/sap/ui/test/matchers/_Visitor.js +1 -1
- package/src/sap/ui/test/matchers/matchers.js +1 -1
- package/src/sap/ui/test/opaQunit.js +1 -1
- package/src/sap/ui/test/pipelines/ActionPipeline.js +1 -1
- package/src/sap/ui/test/pipelines/MatcherPipeline.js +1 -1
- package/src/sap/ui/test/pipelines/PipelineFactory.js +1 -1
- package/src/sap/ui/test/qunitPause.js +1 -1
- package/src/sap/ui/test/selectors/_BindingPath.js +1 -1
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +1 -1
- package/src/sap/ui/test/selectors/_ControlSelectorValidator.js +1 -1
- package/src/sap/ui/test/selectors/_ControlType.js +1 -1
- package/src/sap/ui/test/selectors/_DropdownItem.js +1 -1
- package/src/sap/ui/test/selectors/_GlobalID.js +1 -1
- package/src/sap/ui/test/selectors/_LabelFor.js +1 -1
- package/src/sap/ui/test/selectors/_Properties.js +1 -1
- package/src/sap/ui/test/selectors/_Selector.js +1 -1
- package/src/sap/ui/test/selectors/_TableRowItem.js +1 -1
- package/src/sap/ui/test/selectors/_ViewID.js +1 -1
- package/src/sap/ui/test/selectors/_selectors.js +1 -1
- package/src/sap/ui/test/starter/_configureLoader.js +1 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +1 -1
- package/src/sap/ui/test/starter/_utils.js +1 -1
- package/src/sap/ui/test/starter/createSuite.js +1 -1
- package/src/sap/ui/test/starter/runTest.js +1 -1
- package/src/sap/ui/thirdparty/RequestRecorder.js +1 -1
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/util/ActivityDetection.js +1 -1
- package/src/sap/ui/util/Mobile.js +1 -1
- package/src/sap/ui/util/Storage.js +2 -2
- package/src/sap/ui/util/XMLHelper.js +1 -1
- package/src/sap/ui/util/_FeatureDetection.js +1 -1
- package/src/sap/ui/util/defaultLinkTypes.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +1 -1
- package/src/sap/ui/util/openWindow.js +1 -1
- package/src/sap-ui-boot.js +1 -1
- package/src/sap-ui-core-nojQuery.js +1 -1
- package/src/sap-ui-core.js +1 -1
- package/src/sap-ui-debug.js +1 -1
- package/src/ui5loader-autoconfig.js +24 -16
- package/src/ui5loader.js +10 -5
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/common/Controller.js +0 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.controller.js +14 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.view.xml +6 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/MIT.MultipleInlineCreationRowsGrid.html +5 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.view.xml +9 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +23 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +58 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.controller.js +75 -30
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +21 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +84 -28
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/data/metadata.xml +3 -3
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/qunit/BindingParser.qunit.js +4 -4
- package/test/sap/ui/core/qunit/CommandExecution.qunit.js +3 -1
- package/test/sap/ui/core/qunit/Core.qunit.js +1 -1
- package/test/sap/ui/core/qunit/DataBinding.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Declarative.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Element_base.qunit.js +8 -7
- package/test/sap/ui/core/qunit/Element_base_legacyAPIs.qunit.js +48 -0
- package/test/sap/ui/core/qunit/Element_closestTo.qunit.js +1 -1
- package/test/sap/ui/core/qunit/Fragment.qunit.js +63 -13
- package/test/sap/ui/core/qunit/HTML.qunit.js +5 -5
- package/test/sap/ui/core/qunit/Lib.qunit.js +19 -2
- package/test/sap/ui/core/qunit/PlaceAt.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Shortcut.qunit.js +9 -1
- package/test/sap/ui/core/qunit/UIArea.qunit.js +7 -6
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +41 -0
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.html +7 -5
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +46 -7
- package/test/sap/ui/core/qunit/base/config/GlobalConfigForCascade.js +24 -21
- package/test/sap/ui/core/qunit/component/Component.qunit.js +9 -8
- package/test/sap/ui/core/qunit/component/ComponentContainer.qunit.js +1 -1
- package/test/sap/ui/core/qunit/component/Models.qunit.js +29 -30
- package/test/sap/ui/core/qunit/component/UIComponent.qunit.js +3 -3
- package/test/sap/ui/core/qunit/generic/ControlMemoryLeaks.qunit.js +4 -3
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +6 -7
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +3 -2
- package/test/sap/ui/core/qunit/generic/legacy/testsuite.generic.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +65 -0
- package/test/sap/ui/core/qunit/i18n/UI5Date.qunit.js +107 -0
- package/test/sap/ui/core/qunit/jquery.sap.ui.qunit.js +12 -12
- package/test/sap/ui/core/qunit/loader/syncMode_unavoidablySync.qunit.js +54 -1
- package/test/sap/ui/core/qunit/messages/messagesGeneral.qunit.js +3 -1
- package/test/sap/ui/core/qunit/mockserver/testdata/shopping/Products.json +1 -1
- package/test/sap/ui/core/qunit/model/FilterProcessor.qunit.js +22 -8
- package/test/sap/ui/core/qunit/mvc/AnyView.qunit.js +3 -0
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +3 -2
- package/test/sap/ui/core/qunit/mvc/EventHandlerResolver.qunit.js +2 -2
- package/test/sap/ui/core/qunit/mvc/View.qunit.js +38 -35
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessor.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorAsync.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +1 -1
- package/test/sap/ui/core/qunit/mvc/extensions/ControllerMetadata.qunit.js +6 -2
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +12 -0
- package/test/sap/ui/core/qunit/mvc/extensions/testdata/AnotherMain.controller.js +3 -1
- package/test/sap/ui/core/qunit/mvc/testdata/XMLViewEmbeddingTypedViews.view.xml +1 -1
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing.qunit.js +26 -7
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLTemplateProcessorRequireXML_legacyAPIs.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLView_legacyAPIs.qunit.js +2 -2
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +36 -34
- package/test/sap/ui/core/qunit/odata/ODataUtils.qunit.js +21 -0
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +175 -0
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +11 -5
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +43 -22
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +75 -27
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +318 -217
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +34 -16
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +2360 -177
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +43 -35
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +20 -2
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +487 -139
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +70 -33
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +258 -10
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +10 -2
- package/test/sap/ui/core/qunit/opa/actions/EnterText.qunit.js +38 -14
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +102 -52
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -1
- package/test/sap/ui/core/qunit/routing/async/Targets.qunit.js +4 -5
- package/test/sap/ui/core/qunit/routing/async/TitleHistory.qunit.js +1 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/Component.js +1 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/manifest.json +1 -5
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/Component.js +1 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/manifest.json +1 -5
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/Component.js +15 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/manifest.json +8 -0
- package/test/sap/ui/core/qunit/routing/sync/Router.qunit.js +2 -2
- package/test/sap/ui/core/qunit/routing/sync/Targets.qunit.js +2 -3
- package/test/sap/ui/core/qunit/testdata/fragments/XMLTestFragmentWithXMLView.fragment.xml +5 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.base.configuration.qunit.js +1 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.control.framework.qunit.js +4 -0
- package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +190 -0
- package/test/sap/ui/core/qunit/types/DateInterval.qunit.js +2 -2
- package/test/sap/ui/core/qunit/types/TimezoneUtil.qunit.js +114 -2
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry.qunit.js +161 -0
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry_legacyAPIs.qunit.js +150 -0
- package/test/sap/ui/core/qunit/ui5classes/testsuite.ui5classes.qunit.js +84 -0
- package/test/sap/ui/core/qunit/util/ViewSerializer.qunit.js +4 -3
- package/test/sap/ui/core/qunit/util/reflection/JsControlTreeModifier.qunit.js +20 -0
- package/test/sap/ui/core/qunit/util/reflection/XmlTreeModifier.qunit.js +20 -2
- package/test/sap/ui/core/relnotes/changes-1.120.json +246 -0
|
@@ -16,6 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
"sap/ui/core/Messaging",
|
|
17
17
|
"sap/ui/core/Rendering",
|
|
18
18
|
"sap/ui/core/Supportability",
|
|
19
|
+
"sap/ui/core/message/Message",
|
|
19
20
|
"sap/ui/core/mvc/Controller",
|
|
20
21
|
"sap/ui/core/mvc/View",
|
|
21
22
|
"sap/ui/model/ChangeReason",
|
|
@@ -38,9 +39,9 @@ sap.ui.define([
|
|
|
38
39
|
"sap/ui/table/Table"
|
|
39
40
|
], function (Log, uid, ColumnListItem, CustomListItem, FlexBox, _MessageStrip, Text,
|
|
40
41
|
Device, EventProvider, SyncPromise, Configuration, Messaging, Rendering, Supportability,
|
|
41
|
-
Controller, View, ChangeReason, Filter, FilterOperator, FilterType, Sorter,
|
|
42
|
-
AnnotationHelper, ODataListBinding, ODataMetaModel, ODataModel,
|
|
43
|
-
ValueListType, _Helper, Security, TestUtils, XMLHelper) {
|
|
42
|
+
Message, Controller, View, ChangeReason, Filter, FilterOperator, FilterType, Sorter,
|
|
43
|
+
OperationMode, AnnotationHelper, ODataListBinding, ODataMetaModel, ODataModel,
|
|
44
|
+
ODataPropertyBinding, ValueListType, _Helper, Security, TestUtils, XMLHelper) {
|
|
44
45
|
/*eslint no-sparse-arrays: 0, "max-len": ["error", {"code": 100,
|
|
45
46
|
"ignorePattern": "/sap/opu/odata4/|\" :$|\" : \\{$|\\{meta>"}], */
|
|
46
47
|
"use strict";
|
|
@@ -96,14 +97,15 @@ sap.ui.define([
|
|
|
96
97
|
for (let i = 0, n = oCache.aElements.$created; i < n; i += 1) {
|
|
97
98
|
const oElement = oCache.aElements[i];
|
|
98
99
|
if (oElement) {
|
|
99
|
-
strictEqual(
|
|
100
|
+
strictEqual(_Helper.hasPrivateAnnotation(oElement, "transientPredicate"), true,
|
|
101
|
+
"created", oElement);
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
for (let i = oCache.aElements.$created, n = oCache.aElements.length; i < n; i += 1) {
|
|
103
105
|
const oElement = oCache.aElements[i];
|
|
104
106
|
if (oElement) {
|
|
105
|
-
strictEqual(
|
|
106
|
-
|
|
107
|
+
strictEqual(_Helper.hasPrivateAnnotation(oElement, "transientPredicate"), false,
|
|
108
|
+
"not created", oElement);
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
strictEqual(oCache.aElements.$count === oCache.iLimit + oCache.iActiveElements, true,
|
|
@@ -116,40 +118,43 @@ sap.ui.define([
|
|
|
116
118
|
.some((oContext) => oContext.getPath().endsWith(sPredicate));
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
function strictEqual(vActual, vExpected, sMyTitle) {
|
|
121
|
+
function strictEqual(vActual, vExpected, sMyTitle, oElement) {
|
|
120
122
|
if (vActual !== vExpected) {
|
|
121
|
-
|
|
123
|
+
if (oElement) {
|
|
124
|
+
sMyTitle += ": " + JSON.stringify(_Helper.publicClone(oElement));
|
|
125
|
+
}
|
|
126
|
+
assert.strictEqual(vActual, vExpected, sTitle + ": " + sMyTitle);
|
|
122
127
|
} // else: do not spam the output ;-)
|
|
123
128
|
}
|
|
124
129
|
|
|
125
130
|
function visitElements(aElements, bSkipByPredicate = false, iLevelOffset = 0,
|
|
126
|
-
|
|
127
|
-
aElements.forEach((oElement
|
|
128
|
-
let
|
|
131
|
+
iRankOffset = 0) {
|
|
132
|
+
aElements.forEach((oElement) => {
|
|
133
|
+
let iRank = _Helper.getPrivateAnnotation(oElement, "rank");
|
|
129
134
|
// Note: "@$ui5.node.level" is outdated after #move!
|
|
130
135
|
const iLevel = oElement["@$ui5.node.level"] + iLevelOffset;
|
|
131
136
|
const oParent = aParentByLevel[iLevel];
|
|
132
|
-
if (oParent === aParentByLevel[0] &&
|
|
133
|
-
|
|
137
|
+
if (oParent === aParentByLevel[0] && iRank !== undefined) {
|
|
138
|
+
iRank += iRankOffset;
|
|
134
139
|
}
|
|
135
140
|
const bPlaceholder = _Helper.hasPrivateAnnotation(oElement, "placeholder");
|
|
136
141
|
|
|
137
142
|
if (oParent) {
|
|
138
143
|
strictEqual(_Helper.getPrivateAnnotation(oElement, "parent"), oParent,
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
strictEqual(
|
|
142
|
-
|
|
144
|
+
`"parent" @ level ${iLevel}`, oElement);
|
|
145
|
+
if (_Helper.hasPrivateAnnotation(oElement, "transientPredicate")) {
|
|
146
|
+
strictEqual(iRank, undefined,
|
|
147
|
+
`created persisted @ level ${iLevel}`, oElement);
|
|
143
148
|
} else if (bPlaceholder) {
|
|
144
149
|
strictEqual(oParent.aElements.indexOf(oElement), -1,
|
|
145
|
-
|
|
150
|
+
`placeholder @ level ${iLevel}`, oElement);
|
|
146
151
|
} else {
|
|
147
|
-
strictEqual(
|
|
152
|
+
strictEqual(iRank,
|
|
148
153
|
oParent.aElements.indexOf(oElement) - oParent.aElements.$created,
|
|
149
|
-
`$
|
|
154
|
+
`$skip index @ level ${iLevel}`, oElement);
|
|
150
155
|
}
|
|
151
156
|
} else {
|
|
152
|
-
assert.ok(false,
|
|
157
|
+
assert.ok(false, `no known parent for level ${iLevel}`);
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
if (!bPlaceholder && !bSkipByPredicate) {
|
|
@@ -159,7 +164,7 @@ sap.ui.define([
|
|
|
159
164
|
return;
|
|
160
165
|
}
|
|
161
166
|
strictEqual(oListBinding.oCache.aElements.$byPredicate[sPredicate],
|
|
162
|
-
oElement, `${
|
|
167
|
+
oElement, `${sPredicate} in $byPredicate`, oElement);
|
|
163
168
|
};
|
|
164
169
|
|
|
165
170
|
checkByPredicate("predicate");
|
|
@@ -175,22 +180,25 @@ sap.ui.define([
|
|
|
175
180
|
const aSpliced = _Helper.getPrivateAnnotation(oElement, "spliced");
|
|
176
181
|
if (aSpliced) {
|
|
177
182
|
visitElements(aSpliced, true, iLevel + 1 - aSpliced[0]["@$ui5.node.level"],
|
|
178
|
-
|
|
183
|
+
iRank - aSpliced.$rank);
|
|
179
184
|
}
|
|
180
185
|
});
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
const aElements = oListBinding.oCache.aElements;
|
|
184
|
-
strictEqual(aElements.length, aElements.$count,
|
|
189
|
+
strictEqual(aElements.length, aElements.$count, "$count");
|
|
185
190
|
for (const sPredicate in aElements.$byPredicate) {
|
|
186
191
|
const oElement = aElements.$byPredicate[sPredicate];
|
|
187
192
|
strictEqual(oElement["@$ui5.context.isDeleted"] || aElements.includes(oElement)
|
|
188
193
|
|| isKeepAlive(sPredicate),
|
|
189
|
-
true, `$
|
|
194
|
+
true, `$byPredicate[${sPredicate}] in aElements`, oElement);
|
|
195
|
+
strictEqual(_Helper.getPrivateAnnotation(oElement, "predicate") === sPredicate
|
|
196
|
+
|| _Helper.getPrivateAnnotation(oElement, "transientPredicate") === sPredicate,
|
|
197
|
+
true, `unknown predicate ${sPredicate}`, oElement);
|
|
190
198
|
}
|
|
191
199
|
|
|
192
200
|
let iExpandTo = oListBinding.getAggregation().expandTo || 1;
|
|
193
|
-
if (iExpandTo
|
|
201
|
+
if (iExpandTo >= 999) {
|
|
194
202
|
iExpandTo = 99; // avoid "Invalid array length" :-)
|
|
195
203
|
}
|
|
196
204
|
for (let i = 0; i <= iExpandTo; i += 1) {
|
|
@@ -199,6 +207,27 @@ sap.ui.define([
|
|
|
199
207
|
}
|
|
200
208
|
checkCache(oListBinding.oCache.oFirstLevel);
|
|
201
209
|
visitElements(aElements);
|
|
210
|
+
|
|
211
|
+
if (iExpandTo > 1) {
|
|
212
|
+
const aElements = oListBinding.oCache.oFirstLevel.aElements;
|
|
213
|
+
if (!aElements.$created && aElements.$count === aElements.length) {
|
|
214
|
+
aElements.forEach((oElement, i) => {
|
|
215
|
+
const iLevel = oElement["@$ui5.node.level"];
|
|
216
|
+
let iDescendants = 0;
|
|
217
|
+
for (let j = i + 1; j < aElements.length; j += 1) {
|
|
218
|
+
if (!aElements[j]) {
|
|
219
|
+
return; // cannot count "descendants" for this oElement
|
|
220
|
+
}
|
|
221
|
+
if (iLevel >= aElements[j]["@$ui5.node.level"]) {
|
|
222
|
+
break; // end of "descendants"
|
|
223
|
+
}
|
|
224
|
+
iDescendants += 1;
|
|
225
|
+
}
|
|
226
|
+
strictEqual(_Helper.getPrivateAnnotation(oElement, "descendants", 0),
|
|
227
|
+
iDescendants, "descendants", oElement);
|
|
228
|
+
});
|
|
229
|
+
} // else: cannot count "descendants" this way
|
|
230
|
+
}
|
|
202
231
|
}
|
|
203
232
|
|
|
204
233
|
/**
|
|
@@ -214,6 +243,24 @@ sap.ui.define([
|
|
|
214
243
|
});
|
|
215
244
|
}
|
|
216
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Checks that the given context looks "created persisted".
|
|
248
|
+
*
|
|
249
|
+
* @param {object} assert - The QUnit assert object
|
|
250
|
+
* @param {sap.ui.model.odata.v4.Context} oContext - A context
|
|
251
|
+
* @param {Promise} [oCreatedPromise]
|
|
252
|
+
* Expected {@link sap.ui.model.odata.v4.Context#created} promise
|
|
253
|
+
*/
|
|
254
|
+
function checkCreatedPersisted(assert, oContext, oCreatedPromise) {
|
|
255
|
+
assert.strictEqual(oContext.isTransient(), false, "created persisted");
|
|
256
|
+
assert.strictEqual(oContext.getProperty("@$ui5.context.isTransient"), false);
|
|
257
|
+
if (oCreatedPromise) {
|
|
258
|
+
assert.strictEqual(oContext.created(), oCreatedPromise);
|
|
259
|
+
} else {
|
|
260
|
+
assert.ok(oContext.created() instanceof Promise);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
217
264
|
/**
|
|
218
265
|
* Checks that the given table has the expected state w.r.t. contexts and content.
|
|
219
266
|
*
|
|
@@ -249,7 +296,7 @@ sap.ui.define([
|
|
|
249
296
|
});
|
|
250
297
|
}), aExpectedContent, sTitle);
|
|
251
298
|
|
|
252
|
-
if (oListBinding.getAggregation()
|
|
299
|
+
if (oListBinding.getAggregation()?.hierarchyQualifier) {
|
|
253
300
|
checkAggregationCache(sTitle, assert, oListBinding);
|
|
254
301
|
}
|
|
255
302
|
}
|
|
@@ -775,6 +822,48 @@ sap.ui.define([
|
|
|
775
822
|
return sId;
|
|
776
823
|
},
|
|
777
824
|
|
|
825
|
+
/**
|
|
826
|
+
* Asynchronously checks that the given list binding's contexts, when they all have been
|
|
827
|
+
* loaded, provide values for the given properties as expected. Includes
|
|
828
|
+
* {@link #waitForChanges}.
|
|
829
|
+
*
|
|
830
|
+
* @param {string} sTitle - A test title
|
|
831
|
+
* @param {object} assert - The QUnit assert object
|
|
832
|
+
* @param {sap.ui.model.odata.v4.ODataListBinding} oListBinding - A list binding
|
|
833
|
+
* @param {string[]} aProperties - List of all properties to be checked in aExpectedValues
|
|
834
|
+
* @param {any[][]} aExpectedValues - "Table" of expected property values
|
|
835
|
+
* @returns {Promise} A promise that resolves after the check is done
|
|
836
|
+
*/
|
|
837
|
+
// eslint-disable-next-line valid-jsdoc -- [][] is unsupported
|
|
838
|
+
checkAllContexts : async function (sTitle, assert, oListBinding, aProperties,
|
|
839
|
+
aExpectedValues) {
|
|
840
|
+
function strictEqual(vActual, vExpected, sMyTitle) {
|
|
841
|
+
if (vActual !== vExpected) {
|
|
842
|
+
assert.strictEqual(vActual, vExpected, sMyTitle);
|
|
843
|
+
} // else: do not spam the output ;-)
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
strictEqual(oListBinding.isLengthFinal(), true, "length is final");
|
|
847
|
+
strictEqual(oListBinding.getLength(), aExpectedValues.length, "length as expected");
|
|
848
|
+
|
|
849
|
+
const aContexts = await oListBinding.requestContexts(0, oListBinding.getLength());
|
|
850
|
+
|
|
851
|
+
aContexts.forEach((oContext, i) => {
|
|
852
|
+
strictEqual(oContext.getIndex(), i,
|
|
853
|
+
`index of ${oContext.getPath()}`);
|
|
854
|
+
aProperties.forEach((sProperty, j) => {
|
|
855
|
+
strictEqual(oContext.getProperty(sProperty), aExpectedValues[i][j],
|
|
856
|
+
`${oContext.getPath()}/${sProperty}`);
|
|
857
|
+
});
|
|
858
|
+
});
|
|
859
|
+
|
|
860
|
+
await this.waitForChanges(assert, sTitle);
|
|
861
|
+
|
|
862
|
+
if (oListBinding.getAggregation()?.hierarchyQualifier) {
|
|
863
|
+
checkAggregationCache(sTitle, assert, oListBinding);
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
|
|
778
867
|
/**
|
|
779
868
|
* Checks the messages and finishes the test if no pending changes are left, all
|
|
780
869
|
* expected requests and canceled errors have been received and the expected number of
|
|
@@ -1938,7 +2027,42 @@ sap.ui.define([
|
|
|
1938
2027
|
|
|
1939
2028
|
/**
|
|
1940
2029
|
* The following code (either {@link #createView} or anything before
|
|
1941
|
-
* {@link #waitForChanges}) is expected to report
|
|
2030
|
+
* {@link #waitForChanges}) is expected to report at least the given message. All expected
|
|
2031
|
+
* messages should have a different message text.
|
|
2032
|
+
*
|
|
2033
|
+
* @param {object} oExpectedMessage The expected message with properties corresponding
|
|
2034
|
+
* to the getters of sap.ui.core.message.Message: message and type are required; code,
|
|
2035
|
+
* descriptionUrl, persistent (default false), target (default ""), technical (default
|
|
2036
|
+
* false) are optional; technicalDetails is only compared if given
|
|
2037
|
+
* @param {boolean} [bHasMatcher] Whether the expected message has a Sinon.JS matcher
|
|
2038
|
+
* @returns {object} The test instance for chaining
|
|
2039
|
+
*
|
|
2040
|
+
* @see #expectMessages
|
|
2041
|
+
*/
|
|
2042
|
+
expectMessage : function (oExpectedMessage, bHasMatcher) {
|
|
2043
|
+
const aTargets = oExpectedMessage.targets || [oExpectedMessage.target || ""];
|
|
2044
|
+
const oClone = Object.assign({
|
|
2045
|
+
code : undefined,
|
|
2046
|
+
descriptionUrl : undefined,
|
|
2047
|
+
persistent : false,
|
|
2048
|
+
targets : aTargets,
|
|
2049
|
+
technical : false
|
|
2050
|
+
}, oExpectedMessage);
|
|
2051
|
+
|
|
2052
|
+
if (oExpectedMessage.target && oExpectedMessage.targets) {
|
|
2053
|
+
throw new Error("Use either target or targets, not both!");
|
|
2054
|
+
}
|
|
2055
|
+
delete oClone.target;
|
|
2056
|
+
|
|
2057
|
+
this.aMessages.push(oClone);
|
|
2058
|
+
this.aMessages.bHasMatcher ||= bHasMatcher;
|
|
2059
|
+
|
|
2060
|
+
return this;
|
|
2061
|
+
},
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* The following code (either {@link #createView} or anything before
|
|
2065
|
+
* {@link #waitForChanges}) is expected to report *exactly* the given messages. All expected
|
|
1942
2066
|
* messages should have a different message text.
|
|
1943
2067
|
*
|
|
1944
2068
|
* @param {object[]} aExpectedMessages The expected messages with properties corresponding
|
|
@@ -1947,26 +2071,13 @@ sap.ui.define([
|
|
|
1947
2071
|
* false) are optional; technicalDetails is only compared if given
|
|
1948
2072
|
* @param {boolean} [bHasMatcher] Whether the expected messages have a Sinon.JS matcher
|
|
1949
2073
|
* @returns {object} The test instance for chaining
|
|
2074
|
+
*
|
|
2075
|
+
* @see #expectMessage
|
|
1950
2076
|
*/
|
|
1951
2077
|
expectMessages : function (aExpectedMessages, bHasMatcher) {
|
|
1952
|
-
this.aMessages =
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
code : undefined,
|
|
1956
|
-
descriptionUrl : undefined,
|
|
1957
|
-
persistent : false,
|
|
1958
|
-
targets : aTargets,
|
|
1959
|
-
technical : false
|
|
1960
|
-
}, oMessage);
|
|
1961
|
-
|
|
1962
|
-
if (oMessage.target && oMessage.targets) {
|
|
1963
|
-
throw new Error("Use either target or targets, not both!");
|
|
1964
|
-
}
|
|
1965
|
-
delete oClone.target;
|
|
1966
|
-
|
|
1967
|
-
return oClone;
|
|
1968
|
-
});
|
|
1969
|
-
this.aMessages.bHasMatcher = bHasMatcher;
|
|
2078
|
+
this.aMessages = [];
|
|
2079
|
+
this.aMessages.bHasMatcher = false;
|
|
2080
|
+
aExpectedMessages.forEach((oMessage) => this.expectMessage(oMessage, bHasMatcher));
|
|
1970
2081
|
|
|
1971
2082
|
return this;
|
|
1972
2083
|
},
|
|
@@ -8253,7 +8364,14 @@ sap.ui.define([
|
|
|
8253
8364
|
// check that no messages in the message model are touched.
|
|
8254
8365
|
//
|
|
8255
8366
|
// JIRA: CPOUI5ODATAV4-717
|
|
8256
|
-
|
|
8367
|
+
//
|
|
8368
|
+
// Optionally create a new item beforehand, with the POST response containing a (possibly empty)
|
|
8369
|
+
// messages array. This must not confuse the following message handling.
|
|
8370
|
+
// BCP: 2380140928
|
|
8371
|
+
[0, 1, 2].forEach((iCase) => { // 0: no POST // 1: POST w/o messages // 2: POST w/ messages
|
|
8372
|
+
const sTitle = "requestFilterForMessages on a relative list binding #" + iCase;
|
|
8373
|
+
|
|
8374
|
+
QUnit.test(sTitle, function (assert) {
|
|
8257
8375
|
var oBinding,
|
|
8258
8376
|
oModel = this.createSalesOrdersModel({autoExpandSelect : true}),
|
|
8259
8377
|
sView = '\
|
|
@@ -8310,12 +8428,46 @@ sap.ui.define([
|
|
|
8310
8428
|
return this.createView(assert, sView, oModel).then(function () {
|
|
8311
8429
|
oBinding = that.oView.byId("table").getBinding("items");
|
|
8312
8430
|
|
|
8431
|
+
if (iCase > 0) {
|
|
8432
|
+
that.expectChange("quantity", [,, "5.000"])
|
|
8433
|
+
.expectRequest({
|
|
8434
|
+
method : "POST",
|
|
8435
|
+
url : "SalesOrderList('42')/SO_2_SOITEM",
|
|
8436
|
+
payload : {Quantity : "5"}
|
|
8437
|
+
}, {
|
|
8438
|
+
ItemPosition : "0030",
|
|
8439
|
+
Messages : iCase > 1 ? [{
|
|
8440
|
+
message : "Well done!",
|
|
8441
|
+
numericSeverity : 1,
|
|
8442
|
+
target : "Quantity"
|
|
8443
|
+
}] : [],
|
|
8444
|
+
SalesOrderID : "42",
|
|
8445
|
+
Quantity : "5"
|
|
8446
|
+
});
|
|
8447
|
+
if (iCase > 1) {
|
|
8448
|
+
that.expectMessage({
|
|
8449
|
+
message : "Well done!",
|
|
8450
|
+
target : "/SalesOrderList('42')"
|
|
8451
|
+
+ "/SO_2_SOITEM(SalesOrderID='42',ItemPosition='0030')/Quantity",
|
|
8452
|
+
type : "Success"
|
|
8453
|
+
});
|
|
8454
|
+
}
|
|
8455
|
+
|
|
8456
|
+
return Promise.all([
|
|
8457
|
+
// code under test
|
|
8458
|
+
oBinding.create({Quantity : "5"}, /*bSkipRefresh*/true, /*bAtEnd*/true)
|
|
8459
|
+
.created(),
|
|
8460
|
+
that.waitForChanges(assert, "create new item")
|
|
8461
|
+
]);
|
|
8462
|
+
}
|
|
8463
|
+
}).then(function () {
|
|
8313
8464
|
// code under test
|
|
8314
8465
|
return oBinding.requestFilterForMessages();
|
|
8315
8466
|
}).then(function (oFilter) {
|
|
8316
8467
|
that.expectRequest("SalesOrderList('42')/SO_2_SOITEM"
|
|
8317
8468
|
+ "?$select=ItemPosition,Quantity,SalesOrderID"
|
|
8318
8469
|
+ "&$filter=SalesOrderID eq '42' and ItemPosition eq '0010'"
|
|
8470
|
+
+ (iCase > 1 ? " or SalesOrderID eq '42' and ItemPosition eq '0030'" : "")
|
|
8319
8471
|
+ "&$skip=0&$top=100", {
|
|
8320
8472
|
value : [{
|
|
8321
8473
|
ItemPosition : "0010",
|
|
@@ -8330,6 +8482,7 @@ sap.ui.define([
|
|
|
8330
8482
|
return that.waitForChanges(assert);
|
|
8331
8483
|
});
|
|
8332
8484
|
});
|
|
8485
|
+
});
|
|
8333
8486
|
|
|
8334
8487
|
//*********************************************************************************************
|
|
8335
8488
|
// Scenario: Request Late property with navigation properties in entity with key aliases
|
|
@@ -8831,10 +8984,9 @@ sap.ui.define([
|
|
|
8831
8984
|
return this.createView(assert, sView, oModel).then(function () {
|
|
8832
8985
|
var oTable = that.oView.byId("table");
|
|
8833
8986
|
|
|
8834
|
-
that.expectChange("note", ["
|
|
8987
|
+
that.expectChange("note", ["baz", "foo"]) // "bar" overtaken by update
|
|
8835
8988
|
.expectChange("companyName", ["", "SAP"])
|
|
8836
|
-
.expectChange("buyerID", ["24", "23"])
|
|
8837
|
-
.expectChange("note", ["baz"]);
|
|
8989
|
+
.expectChange("buyerID", ["24", "23"]);
|
|
8838
8990
|
|
|
8839
8991
|
oCreatedContext = oTable.getBinding("items")
|
|
8840
8992
|
.create({BuyerID : "24", Note : "bar"}, bSkipRefresh);
|
|
@@ -12941,8 +13093,9 @@ sap.ui.define([
|
|
|
12941
13093
|
});
|
|
12942
13094
|
|
|
12943
13095
|
//*********************************************************************************************
|
|
12944
|
-
// Scenario: Avoid duplicate call to computed annotation
|
|
12945
|
-
|
|
13096
|
+
// Scenario: Avoid duplicate call to computed annotation (via global path)
|
|
13097
|
+
/** @deprecated as of version 1.120 */
|
|
13098
|
+
QUnit.test("Avoid duplicate call to computed annotation, global path", function (assert) {
|
|
12946
13099
|
var oModel = this.createTeaBusiModel().getMetaModel(),
|
|
12947
13100
|
sView = '\
|
|
12948
13101
|
<Text id="text"\
|
|
@@ -12954,6 +13107,22 @@ sap.ui.define([
|
|
|
12954
13107
|
return this.createView(assert, sView, oModel);
|
|
12955
13108
|
});
|
|
12956
13109
|
|
|
13110
|
+
//*********************************************************************************************
|
|
13111
|
+
// Scenario: Computed annotation via ODMM#requestObject with scope
|
|
13112
|
+
// JIRA: CPOUI5ODATAV4-2398
|
|
13113
|
+
QUnit.test("Computed annotation via ODMM#requestObject with scope", async function (assert) {
|
|
13114
|
+
const oModel = this.createTeaBusiModel().getMetaModel();
|
|
13115
|
+
|
|
13116
|
+
await this.createView(assert, "", oModel);
|
|
13117
|
+
|
|
13118
|
+
this.mock(AnnotationHelper).expects("getValueListType").returns("foo");
|
|
13119
|
+
|
|
13120
|
+
const sResult = await oModel.requestObject("/MANAGERS/TEAM_ID@@AH.getValueListType",
|
|
13121
|
+
undefined, {scope : {AH : AnnotationHelper}}
|
|
13122
|
+
);
|
|
13123
|
+
assert.strictEqual(sResult, "foo");
|
|
13124
|
+
});
|
|
13125
|
+
|
|
12957
13126
|
//*********************************************************************************************
|
|
12958
13127
|
// Scenario: Enable autoExpandSelect mode for an ODataContextBinding with relative
|
|
12959
13128
|
// ODataPropertyBindings where the paths of the relative bindings lead to a $expand
|
|
@@ -13459,56 +13628,74 @@ sap.ui.define([
|
|
|
13459
13628
|
//*********************************************************************************************
|
|
13460
13629
|
// Scenario: Call bound action on a context of a relative ListBinding.
|
|
13461
13630
|
//
|
|
13462
|
-
// Ensure that
|
|
13463
|
-
//
|
|
13464
|
-
//
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13631
|
+
// Ensure that no Return Value Context is created, because the back end does not return the
|
|
13632
|
+
// needed key properties.
|
|
13633
|
+
// SNOW: DINC0010118
|
|
13634
|
+
[{ID : "2"}, {EMPLOYEE_2_TEAM : {Team_Id : "TEAM_02"}}].forEach(function (oPredicates, i) {
|
|
13635
|
+
var sTitle = "Read entity for a relative ListBinding, call bound action, key for the "
|
|
13636
|
+
+ (i ? "first" : "second") + " segment is missing";
|
|
13637
|
+
|
|
13638
|
+
QUnit.test(sTitle, function (assert) {
|
|
13639
|
+
var that = this,
|
|
13468
13640
|
sView = '\
|
|
13469
13641
|
<FlexBox id="form" binding="{path : \'/TEAMS(\\\'42\\\')\',\
|
|
13470
|
-
parameters : {
|
|
13642
|
+
parameters : {\
|
|
13643
|
+
$expand : {TEAM_2_EMPLOYEES : {$select : \'ID,__CT__FAKE__Message/__FAKE__Messages\'}}}}">\
|
|
13471
13644
|
<Table id="table" items="{TEAM_2_EMPLOYEES}">\
|
|
13472
13645
|
<Text id="id" text="{ID}"/>\
|
|
13473
13646
|
</Table>\
|
|
13474
13647
|
</FlexBox>';
|
|
13475
13648
|
|
|
13476
|
-
this.expectRequest("TEAMS('42')
|
|
13649
|
+
this.expectRequest("TEAMS('42')"
|
|
13650
|
+
+ "?$expand=TEAM_2_EMPLOYEES($select=ID,__CT__FAKE__Message/__FAKE__Messages)", {
|
|
13477
13651
|
TEAM_2_EMPLOYEES : [{ID : "2"}]
|
|
13478
13652
|
})
|
|
13479
13653
|
.expectChange("id", ["2"]);
|
|
13480
13654
|
|
|
13481
|
-
return this.createView(assert, sView
|
|
13655
|
+
return this.createView(assert, sView).then(function () {
|
|
13482
13656
|
var oEmployeeContext = that.oView.byId("table").getItems()[0].getBindingContext(),
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
oEmployeeContext)
|
|
13657
|
+
sAction = "com.sap.gateway.default.iwbep.tea_busi.v0001.AcChangeTeamOfEmployee",
|
|
13658
|
+
oAction = that.oModel.bindContext(sAction + "(...)",
|
|
13659
|
+
oEmployeeContext, {$$inheritExpandSelect : true}),
|
|
13660
|
+
oResponse = Object.assign({
|
|
13661
|
+
__CT__FAKE__Message : {
|
|
13662
|
+
__FAKE__Messages : [{
|
|
13663
|
+
code : "1",
|
|
13664
|
+
message : "Text",
|
|
13665
|
+
numericSeverity : 3,
|
|
13666
|
+
target : "Name",
|
|
13667
|
+
transition : false
|
|
13668
|
+
}]
|
|
13669
|
+
}
|
|
13670
|
+
}, oPredicates);
|
|
13486
13671
|
|
|
13487
13672
|
that.expectRequest({
|
|
13488
13673
|
method : "POST",
|
|
13489
13674
|
url : "TEAMS('42')/TEAM_2_EMPLOYEES('2')/"
|
|
13490
13675
|
+ "com.sap.gateway.default.iwbep.tea_busi.v0001.AcChangeTeamOfEmployee"
|
|
13491
|
-
+ "?$
|
|
13676
|
+
+ "?$select=ID,__CT__FAKE__Message/__FAKE__Messages"
|
|
13677
|
+
+ "&$expand=EMPLOYEE_2_TEAM($select=Team_Id)",
|
|
13492
13678
|
payload : {TeamID : "TEAM_02"}
|
|
13493
|
-
},
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13679
|
+
}, oResponse)
|
|
13680
|
+
.expectMessages([{
|
|
13681
|
+
code : "1",
|
|
13682
|
+
message : "Text",
|
|
13683
|
+
target : "/TEAMS('42')/TEAM_2_EMPLOYEES('2')/" + sAction + "(...)/Name",
|
|
13684
|
+
type : "Warning"
|
|
13685
|
+
}]);
|
|
13499
13686
|
oAction.setParameter("TeamID", "TEAM_02");
|
|
13500
13687
|
|
|
13501
13688
|
return Promise.all([
|
|
13502
13689
|
// code under test
|
|
13503
|
-
oAction.execute().then(function (
|
|
13504
|
-
assert.strictEqual(
|
|
13505
|
-
|
|
13506
|
-
"/TEAMS('TEAM_02')/TEAM_2_EMPLOYEES('2')");
|
|
13690
|
+
oAction.execute().then(function (oResult) {
|
|
13691
|
+
assert.strictEqual(oResult, undefined,
|
|
13692
|
+
"no R.V.C. because EMPLOYEE_2_TEAM is missing");
|
|
13507
13693
|
}),
|
|
13508
13694
|
that.waitForChanges(assert)
|
|
13509
13695
|
]);
|
|
13510
13696
|
});
|
|
13511
13697
|
});
|
|
13698
|
+
});
|
|
13512
13699
|
|
|
13513
13700
|
//*********************************************************************************************
|
|
13514
13701
|
// Scenario: Execute a bound action for an entity in a list binding and afterwards call refresh
|
|
@@ -14333,6 +14520,28 @@ sap.ui.define([
|
|
|
14333
14520
|
});
|
|
14334
14521
|
});
|
|
14335
14522
|
|
|
14523
|
+
//*********************************************************************************************
|
|
14524
|
+
// Scenario: While the list binding has a size limit > 1024 and a read group lock (initially or
|
|
14525
|
+
// due to some kind of refresh), requestContexts is called. Ensure that not both requests (from
|
|
14526
|
+
// requestContexts and getContexts) are performed with a lock (requiring them to run in the same
|
|
14527
|
+
// batch) because with a read length > 1024 the cache has to serialize the calls.
|
|
14528
|
+
// In the test we skip the view and call getContexts directly to make timing easier.
|
|
14529
|
+
// BCP: 2370147917
|
|
14530
|
+
QUnit.test("BCP: 2370147917", async function (assert) {
|
|
14531
|
+
await this.createView(assert);
|
|
14532
|
+
|
|
14533
|
+
this.oModel.setSizeLimit(1025);
|
|
14534
|
+
const oBinding = this.oModel.bindList("/EMPLOYEES");
|
|
14535
|
+
|
|
14536
|
+
this.expectRequest("EMPLOYEES?$skip=0&$top=1025", {value : [/*doesn't matter*/]});
|
|
14537
|
+
|
|
14538
|
+
// code under test
|
|
14539
|
+
oBinding.requestContexts();
|
|
14540
|
+
oBinding.getContexts(0, 20);
|
|
14541
|
+
|
|
14542
|
+
await this.waitForChanges(assert);
|
|
14543
|
+
});
|
|
14544
|
+
|
|
14336
14545
|
//*********************************************************************************************
|
|
14337
14546
|
// Scenario: call submitBatch() synchronously after resume w/ auto-$expand/$select
|
|
14338
14547
|
QUnit.test("submitBatch after resume w/ auto-$expand/$select", function (assert) {
|
|
@@ -15961,6 +16170,8 @@ sap.ui.define([
|
|
|
15961
16170
|
//
|
|
15962
16171
|
// BCP: 2180279839
|
|
15963
16172
|
// BCP: 2280024694
|
|
16173
|
+
//
|
|
16174
|
+
// Same with prefetch of preceeding entries (SNOW: CS20230006538459)
|
|
15964
16175
|
QUnit.test("BCP: 2180279839: dataReceived follows each dataRequested", function (assert) {
|
|
15965
16176
|
var oListBinding,
|
|
15966
16177
|
aValues = [],
|
|
@@ -15968,7 +16179,7 @@ sap.ui.define([
|
|
|
15968
16179
|
that = this;
|
|
15969
16180
|
|
|
15970
16181
|
for (i = 0; i < 1110; i += 1) {
|
|
15971
|
-
if (i <
|
|
16182
|
+
if (i < 17 || i >= 1093) {
|
|
15972
16183
|
aValues[i] = {Team_Id : "TEAM_" + i};
|
|
15973
16184
|
}
|
|
15974
16185
|
}
|
|
@@ -16024,6 +16235,42 @@ sap.ui.define([
|
|
|
16024
16235
|
"/TEAMS('TEAM_1104')"
|
|
16025
16236
|
]);
|
|
16026
16237
|
|
|
16238
|
+
return that.waitForChanges(assert);
|
|
16239
|
+
}).then(function () { // prefetch *before* existing data
|
|
16240
|
+
that.expectRequest("TEAMS?$skip=1093&$top=5", {value : aValues.slice(1093, 1098)})
|
|
16241
|
+
.expectEvents(assert, oListBinding, [
|
|
16242
|
+
[, "dataRequested"],
|
|
16243
|
+
[, "dataReceived", {data : {}}]
|
|
16244
|
+
]);
|
|
16245
|
+
|
|
16246
|
+
assert.deepEqual(oListBinding.getContexts(1098, 7, 5).map(getPath), [
|
|
16247
|
+
"/TEAMS('TEAM_1098')",
|
|
16248
|
+
"/TEAMS('TEAM_1099')",
|
|
16249
|
+
"/TEAMS('TEAM_1100')",
|
|
16250
|
+
"/TEAMS('TEAM_1101')",
|
|
16251
|
+
"/TEAMS('TEAM_1102')",
|
|
16252
|
+
"/TEAMS('TEAM_1103')",
|
|
16253
|
+
"/TEAMS('TEAM_1104')"
|
|
16254
|
+
]);
|
|
16255
|
+
|
|
16256
|
+
return that.waitForChanges(assert);
|
|
16257
|
+
}).then(function () { // iIndex - iPrefetchLength becomes negative here
|
|
16258
|
+
that.expectRequest("TEAMS?$skip=10&$top=7", {value : aValues.slice(10, 17)})
|
|
16259
|
+
.expectEvents(assert, oListBinding, [
|
|
16260
|
+
[, "dataRequested"],
|
|
16261
|
+
[, "dataReceived", {data : {}}]
|
|
16262
|
+
]);
|
|
16263
|
+
|
|
16264
|
+
assert.deepEqual(oListBinding.getContexts(0, 7, 10).map(getPath), [
|
|
16265
|
+
"/TEAMS('TEAM_0')",
|
|
16266
|
+
"/TEAMS('TEAM_1')",
|
|
16267
|
+
"/TEAMS('TEAM_2')",
|
|
16268
|
+
"/TEAMS('TEAM_3')",
|
|
16269
|
+
"/TEAMS('TEAM_4')",
|
|
16270
|
+
"/TEAMS('TEAM_5')",
|
|
16271
|
+
"/TEAMS('TEAM_6')"
|
|
16272
|
+
]);
|
|
16273
|
+
|
|
16027
16274
|
return that.waitForChanges(assert);
|
|
16028
16275
|
});
|
|
16029
16276
|
});
|
|
@@ -24851,12 +25098,14 @@ sap.ui.define([
|
|
|
24851
25098
|
// Check that refresh is not supported (JIRA: CPOUI5ODATAV4-1851).
|
|
24852
25099
|
// Additionally, ODLB#getDownloadUrl is tested (JIRA: CPOUI5ODATAV4-1920, BCP: 2370011296).
|
|
24853
25100
|
// Retrieve "DistanceFromRoot" property path via ODLB#getAggregation (JIRA: CPOUI5ODATAV4-1961).
|
|
25101
|
+
// See that Filter.NONE is not allowed (JIRA: CPOUI5ODATAV4-2321).
|
|
24854
25102
|
//
|
|
24855
25103
|
// NodeID is selected automatically, even w/o UI, but "parent node ID" is not.
|
|
24856
25104
|
// JIRA: CPOUI5ODATAV4-1849
|
|
24857
25105
|
//
|
|
24858
25106
|
// Selection on header and root context (JIRA: CPOUI5ODATAV4-1943).
|
|
24859
25107
|
// Use $count (JIRA: CPOUI5ODATAV4-1855).
|
|
25108
|
+
// Old vs. new format of RecursiveHierarchy annotation (JIRA: CPOUI5ODATAV4-2401).
|
|
24860
25109
|
//
|
|
24861
25110
|
// Root is kept alive and requests messages, then list is refreshed and the kept-alive node is
|
|
24862
25111
|
// neither the root nor a leaf anymore ;-) A side-effects refresh fails and the new root is
|
|
@@ -24871,13 +25120,15 @@ sap.ui.define([
|
|
|
24871
25120
|
// downloadUrl
|
|
24872
25121
|
// JIRA: CPOUI5ODATAV4-2275
|
|
24873
25122
|
[false, true].forEach(function (bKeepAlive) {
|
|
24874
|
-
|
|
25123
|
+
["OldChart", "OrgChart"].forEach((sHierarchyQualifier) => {
|
|
25124
|
+
var sTitle = "Recursive Hierarchy: root is leaf; bKeepAlive=" + bKeepAlive
|
|
25125
|
+
+ ", hierarchyQualifier : " + sHierarchyQualifier;
|
|
24875
25126
|
|
|
24876
25127
|
QUnit.test(sTitle, function (assert) {
|
|
24877
25128
|
var sExpectedDownloadUrl
|
|
24878
25129
|
= "/special/cases/Artists?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
24879
|
-
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='
|
|
24880
|
-
+ ",NodeProperty='_/NodeID')"
|
|
25130
|
+
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='" + sHierarchyQualifier
|
|
25131
|
+
+ "',NodeProperty='_/NodeID')"
|
|
24881
25132
|
+ "&$select=ArtistID,IsActiveEntity,_/DistanceFromRoot,_/DrillState,_/NodeID"
|
|
24882
25133
|
+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)",
|
|
24883
25134
|
oHeaderContext,
|
|
@@ -24886,19 +25137,19 @@ sap.ui.define([
|
|
|
24886
25137
|
oModel = this.createSpecialCasesModel({autoExpandSelect : true}),
|
|
24887
25138
|
oRoot,
|
|
24888
25139
|
oTable,
|
|
24889
|
-
sView =
|
|
24890
|
-
<Text id="count" text="{$count}"
|
|
24891
|
-
<t:Table id="table" rows="{path :
|
|
24892
|
-
parameters : {
|
|
24893
|
-
$$aggregation : {
|
|
24894
|
-
hierarchyQualifier :
|
|
24895
|
-
}
|
|
24896
|
-
$count : true
|
|
24897
|
-
}}" threshold="0" visibleRowCount="3"
|
|
24898
|
-
<Text text="{= %{@$ui5.node.isExpanded} }"
|
|
24899
|
-
<Text text="{= %{@$ui5.node.level} }"
|
|
24900
|
-
<Text text="{BestFriend/Name}"
|
|
24901
|
-
</t:Table
|
|
25140
|
+
sView = `
|
|
25141
|
+
<Text id="count" text="{$count}"/>
|
|
25142
|
+
<t:Table id="table" rows="{path : '/Artists',
|
|
25143
|
+
parameters : {
|
|
25144
|
+
$$aggregation : {
|
|
25145
|
+
hierarchyQualifier : '${sHierarchyQualifier}'
|
|
25146
|
+
},
|
|
25147
|
+
$count : true
|
|
25148
|
+
}}" threshold="0" visibleRowCount="3">
|
|
25149
|
+
<Text text="{= %{@$ui5.node.isExpanded} }"/>
|
|
25150
|
+
<Text text="{= %{@$ui5.node.level} }"/>
|
|
25151
|
+
<Text text="{BestFriend/Name}"/>
|
|
25152
|
+
</t:Table>`,
|
|
24902
25153
|
that = this;
|
|
24903
25154
|
|
|
24904
25155
|
this.expectRequest({
|
|
@@ -24908,8 +25159,8 @@ sap.ui.define([
|
|
|
24908
25159
|
.expectRequest({
|
|
24909
25160
|
batchNo : 1,
|
|
24910
25161
|
url : "Artists?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
24911
|
-
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='
|
|
24912
|
-
+ ",NodeProperty='_/NodeID',Levels=1)"
|
|
25162
|
+
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='"
|
|
25163
|
+
+ sHierarchyQualifier + "',NodeProperty='_/NodeID',Levels=1)"
|
|
24913
25164
|
+ "&$select=ArtistID,IsActiveEntity,_/DrillState,_/NodeID"
|
|
24914
25165
|
+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)"
|
|
24915
25166
|
+ "&$count=true&$skip=0&$top=3"
|
|
@@ -24942,13 +25193,13 @@ sap.ui.define([
|
|
|
24942
25193
|
|
|
24943
25194
|
// code under test
|
|
24944
25195
|
assert.deepEqual(oListBinding.getAggregation(), {
|
|
24945
|
-
hierarchyQualifier :
|
|
25196
|
+
hierarchyQualifier : sHierarchyQualifier
|
|
24946
25197
|
}, "JIRA: CPOUI5ODATAV4-1825");
|
|
24947
25198
|
// code under test
|
|
24948
25199
|
assert.deepEqual(oListBinding.getAggregation(/*bVerbose*/true), {
|
|
24949
|
-
hierarchyQualifier :
|
|
24950
|
-
$
|
|
24951
|
-
$
|
|
25200
|
+
hierarchyQualifier : sHierarchyQualifier,
|
|
25201
|
+
$DistanceFromRoot : "_/DistanceFromRoot",
|
|
25202
|
+
$DrillState : "_/DrillState",
|
|
24952
25203
|
$NodeProperty : "_/NodeID"
|
|
24953
25204
|
}, "JIRA: CPOUI5ODATAV4-1961, CPOUI5ODATAV4-2275");
|
|
24954
25205
|
// code under test
|
|
@@ -24963,6 +25214,10 @@ sap.ui.define([
|
|
|
24963
25214
|
// code under test (JIRA: CPOUI5ODATAV4-2337)
|
|
24964
25215
|
oRoot.isAncestorOf(oHeaderContext);
|
|
24965
25216
|
}, new Error("Not currently part of a recursive hierarchy: /Artists"));
|
|
25217
|
+
assert.throws(() => {
|
|
25218
|
+
// code under test (JIRA: CPOUI5ODATAV4-2321)
|
|
25219
|
+
oListBinding.filter(Filter.NONE);
|
|
25220
|
+
}, new Error("Cannot combine Filter.NONE with $$aggregation"));
|
|
24966
25221
|
// code under test
|
|
24967
25222
|
assert.strictEqual(oRoot.isAncestorOf(oRoot), true, "JIRA: CPOUI5ODATAV4-2337");
|
|
24968
25223
|
|
|
@@ -25199,8 +25454,8 @@ sap.ui.define([
|
|
|
25199
25454
|
.expectRequest({
|
|
25200
25455
|
batchNo : 7,
|
|
25201
25456
|
url : "Artists?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
25202
|
-
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='
|
|
25203
|
-
+ ",NodeProperty='_/NodeID',Levels=1)"
|
|
25457
|
+
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='"
|
|
25458
|
+
+ sHierarchyQualifier + "',NodeProperty='_/NodeID',Levels=1)"
|
|
25204
25459
|
+ "&$select=ArtistID,IsActiveEntity,_/DrillState,_/NodeID"
|
|
25205
25460
|
+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)"
|
|
25206
25461
|
+ "&$count=true&$skip=0&$top=3"
|
|
@@ -25262,8 +25517,8 @@ sap.ui.define([
|
|
|
25262
25517
|
+ "&$filter=ArtistID eq '0' and IsActiveEntity eq true", oError)
|
|
25263
25518
|
.expectRequest("Artists/$count", oError)
|
|
25264
25519
|
.expectRequest("Artists?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
25265
|
-
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='
|
|
25266
|
-
+ ",NodeProperty='_/NodeID',Levels=1)"
|
|
25520
|
+
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='" + sHierarchyQualifier
|
|
25521
|
+
+ "',NodeProperty='_/NodeID',Levels=1)"
|
|
25267
25522
|
+ "&$select=ArtistID,IsActiveEntity,_/DrillState,_/NodeID"
|
|
25268
25523
|
+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)"
|
|
25269
25524
|
+ "&$count=true&$skip=0&$top=3", oError)
|
|
@@ -25302,8 +25557,8 @@ sap.ui.define([
|
|
|
25302
25557
|
assert.strictEqual(oListBinding.getAllCurrentContexts()[1], oKeptAliveNode,
|
|
25303
25558
|
"still kept alive");
|
|
25304
25559
|
|
|
25305
|
-
that.expectRequest("Artists?$apply=descendants($root/Artists,
|
|
25306
|
-
+ ",filter(ArtistID eq '1' and IsActiveEntity eq true),1)"
|
|
25560
|
+
that.expectRequest("Artists?$apply=descendants($root/Artists," + sHierarchyQualifier
|
|
25561
|
+
+ ",_/NodeID,filter(ArtistID eq '1' and IsActiveEntity eq true),1)"
|
|
25307
25562
|
+ "&$select=ArtistID,IsActiveEntity,_/DrillState,_/NodeID"
|
|
25308
25563
|
+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)"
|
|
25309
25564
|
+ "&$count=true&$skip=0&$top=3", {
|
|
@@ -25364,13 +25619,13 @@ sap.ui.define([
|
|
|
25364
25619
|
.expectRequest({
|
|
25365
25620
|
batchNo : 9,
|
|
25366
25621
|
url : "Artists?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
25367
|
-
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='
|
|
25368
|
-
+ ",NodeProperty='_/NodeID')&$select=ArtistID,IsActiveEntity"
|
|
25622
|
+
+ "HierarchyNodes=$root/Artists,HierarchyQualifier='" + sHierarchyQualifier
|
|
25623
|
+
+ "',NodeProperty='_/NodeID')&$select=ArtistID,IsActiveEntity"
|
|
25369
25624
|
+ ",_/DescendantCount,_/DistanceFromRoot,_/DrillState,_/NodeID"
|
|
25370
25625
|
+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)"
|
|
25371
25626
|
+ "&$count=true&$skip=0&$top=3"
|
|
25372
25627
|
}, {
|
|
25373
|
-
"@odata.count" : "
|
|
25628
|
+
"@odata.count" : "3",
|
|
25374
25629
|
value : [{
|
|
25375
25630
|
"@odata.etag" : "etag1.1",
|
|
25376
25631
|
ArtistID : "1",
|
|
@@ -25381,7 +25636,7 @@ sap.ui.define([
|
|
|
25381
25636
|
},
|
|
25382
25637
|
IsActiveEntity : true,
|
|
25383
25638
|
_ : {
|
|
25384
|
-
DescendantCount : "
|
|
25639
|
+
DescendantCount : "2",
|
|
25385
25640
|
DistanceFromRoot : "0",
|
|
25386
25641
|
DrillState : "expanded",
|
|
25387
25642
|
NodeID : "1,true"
|
|
@@ -25392,36 +25647,48 @@ sap.ui.define([
|
|
|
25392
25647
|
BestFriend : null,
|
|
25393
25648
|
IsActiveEntity : true,
|
|
25394
25649
|
_ : {
|
|
25395
|
-
DescendantCount : "
|
|
25650
|
+
DescendantCount : "1",
|
|
25396
25651
|
DistanceFromRoot : "1",
|
|
25397
|
-
DrillState : "
|
|
25652
|
+
DrillState : "expanded",
|
|
25398
25653
|
NodeID : "0,true"
|
|
25399
25654
|
}
|
|
25655
|
+
}, {
|
|
25656
|
+
"@odata.etag" : "etag2.0",
|
|
25657
|
+
ArtistID : "2",
|
|
25658
|
+
BestFriend : null,
|
|
25659
|
+
IsActiveEntity : true,
|
|
25660
|
+
_ : {
|
|
25661
|
+
DescendantCount : "0",
|
|
25662
|
+
DistanceFromRoot : "2",
|
|
25663
|
+
DrillState : "leaf",
|
|
25664
|
+
NodeID : "2,true"
|
|
25665
|
+
}
|
|
25400
25666
|
}]
|
|
25401
25667
|
});
|
|
25402
25668
|
|
|
25403
25669
|
// code under test
|
|
25404
25670
|
// Note: overall count must not change here, just the "expansion state"
|
|
25405
25671
|
oListBinding.setAggregation({
|
|
25406
|
-
expandTo :
|
|
25407
|
-
hierarchyQualifier :
|
|
25672
|
+
expandTo : 999,
|
|
25673
|
+
hierarchyQualifier : sHierarchyQualifier
|
|
25408
25674
|
});
|
|
25409
25675
|
|
|
25410
25676
|
return that.waitForChanges(assert, "expandTo");
|
|
25411
25677
|
}).then(function () {
|
|
25412
25678
|
checkTable("after expandTo", assert, oTable, [
|
|
25413
25679
|
"/Artists(ArtistID='1',IsActiveEntity=true)",
|
|
25414
|
-
"/Artists(ArtistID='0',IsActiveEntity=true)"
|
|
25680
|
+
"/Artists(ArtistID='0',IsActiveEntity=true)",
|
|
25681
|
+
"/Artists(ArtistID='2',IsActiveEntity=true)"
|
|
25415
25682
|
], [
|
|
25416
25683
|
[true, 1, "Friend #01 (no more)"],
|
|
25417
|
-
[
|
|
25418
|
-
[
|
|
25684
|
+
[true, 2, ""],
|
|
25685
|
+
[undefined, 3, ""]
|
|
25419
25686
|
]);
|
|
25420
25687
|
assert.strictEqual(oListBinding.getCount(), 3, "count of nodes"); // code under test
|
|
25421
25688
|
assert.strictEqual(oListBinding.getAllCurrentContexts()[1], oKeptAliveNode,
|
|
25422
25689
|
"still kept alive");
|
|
25423
25690
|
assert.deepEqual(oKeptAliveNode.getObject(), {
|
|
25424
|
-
"@$ui5.node.isExpanded" :
|
|
25691
|
+
"@$ui5.node.isExpanded" : true,
|
|
25425
25692
|
"@$ui5.node.level" : 2,
|
|
25426
25693
|
"@odata.etag" : "etag0.4",
|
|
25427
25694
|
ArtistID : "0",
|
|
@@ -25438,19 +25705,20 @@ sap.ui.define([
|
|
|
25438
25705
|
// no additional request for same aggregation data
|
|
25439
25706
|
// code under test (BCP: 2370045709)
|
|
25440
25707
|
oListBinding.setAggregation({
|
|
25441
|
-
expandTo :
|
|
25442
|
-
hierarchyQualifier :
|
|
25708
|
+
expandTo : 999,
|
|
25709
|
+
hierarchyQualifier : sHierarchyQualifier
|
|
25443
25710
|
});
|
|
25444
25711
|
// code under test (BCP: 2370045709)
|
|
25445
25712
|
oListBinding.changeParameters({
|
|
25446
25713
|
$$aggregation : {
|
|
25447
|
-
expandTo :
|
|
25448
|
-
hierarchyQualifier :
|
|
25714
|
+
expandTo : 999,
|
|
25715
|
+
hierarchyQualifier : sHierarchyQualifier
|
|
25449
25716
|
}
|
|
25450
25717
|
});
|
|
25451
|
-
assert.strictEqual(oListBinding.getAggregation().expandTo,
|
|
25718
|
+
assert.strictEqual(oListBinding.getAggregation().expandTo, 999);
|
|
25452
25719
|
});
|
|
25453
25720
|
});
|
|
25721
|
+
});
|
|
25454
25722
|
});
|
|
25455
25723
|
|
|
25456
25724
|
//*********************************************************************************************
|
|
@@ -25933,6 +26201,8 @@ sap.ui.define([
|
|
|
25933
26201
|
// into placeholders. Then 0 (Alpha) is expanded again and we scroll down to check that
|
|
25934
26202
|
// placeholders still cause proper requests w.r.t. indices.
|
|
25935
26203
|
// JIRA: CPOUI5ODATAV4-2355
|
|
26204
|
+
//
|
|
26205
|
+
// Check that no #move is supported (JIRA: CPOUI5ODATAV4-2360)
|
|
25936
26206
|
QUnit.test("Recursive Hierarchy: expand to 2, collapse & expand root etc.", function (assert) {
|
|
25937
26207
|
var oCollapsed,
|
|
25938
26208
|
oListBinding,
|
|
@@ -26178,6 +26448,15 @@ sap.ui.define([
|
|
|
26178
26448
|
|
|
26179
26449
|
oCollapsed = oTable.getRows()[1].getBindingContext();
|
|
26180
26450
|
|
|
26451
|
+
assert.throws(function () {
|
|
26452
|
+
// code under test
|
|
26453
|
+
oCollapsed.move();
|
|
26454
|
+
}, new Error("Unsupported $$aggregation.expandTo: 2"));
|
|
26455
|
+
assert.throws(function () {
|
|
26456
|
+
// code under test
|
|
26457
|
+
oCollapsed.move({parent : oRoot});
|
|
26458
|
+
}, new Error("Unsupported $$aggregation.expandTo: 2"));
|
|
26459
|
+
|
|
26181
26460
|
that.expectRequest("EMPLOYEES"
|
|
26182
26461
|
+ "?$apply=descendants($root/EMPLOYEES,OrgChart,ID,filter(ID eq '1'),1)"
|
|
26183
26462
|
+ "/orderby(AGE desc)"
|
|
@@ -26330,7 +26609,7 @@ sap.ui.define([
|
|
|
26330
26609
|
[false, 1, "0", "", "Alpha", 160],
|
|
26331
26610
|
["", "", "", "", "", ""]
|
|
26332
26611
|
]);
|
|
26333
|
-
assert
|
|
26612
|
+
checkCreatedPersisted(assert, oNewRoot);
|
|
26334
26613
|
|
|
26335
26614
|
that.expectRequest("EMPLOYEES?$apply=orderby(AGE desc)"
|
|
26336
26615
|
+ "/com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root/EMPLOYEES"
|
|
@@ -26604,6 +26883,7 @@ sap.ui.define([
|
|
|
26604
26883
|
// BCP: 2370011296
|
|
26605
26884
|
//
|
|
26606
26885
|
// Use a filter with spaces (BCP: 2380032202).
|
|
26886
|
+
// Check prefetch for expand (JIRA: CPOUI5ODATAV4-2432)
|
|
26607
26887
|
QUnit.test("Recursive Hierarchy: expand root, w/ filter, search & orderby", function (assert) {
|
|
26608
26888
|
var oModel = this.createTeaBusiModel123({autoExpandSelect : true, groupId : "$direct"}),
|
|
26609
26889
|
oTable,
|
|
@@ -26619,7 +26899,7 @@ sap.ui.define([
|
|
|
26619
26899
|
$count : true,\
|
|
26620
26900
|
$filter : \'Is_Manager\',\
|
|
26621
26901
|
$orderby : \'AGE desc\'\
|
|
26622
|
-
}}">\
|
|
26902
|
+
}}" threshold="4" visibleRowCount="2">\
|
|
26623
26903
|
<Text id="id" text="{ID}"/>\
|
|
26624
26904
|
</t:Table>',
|
|
26625
26905
|
that = this;
|
|
@@ -26630,7 +26910,7 @@ sap.ui.define([
|
|
|
26630
26910
|
+ ",filter(AGE ge 0 and (Is_Manager))/search(covfefe),keep start)"
|
|
26631
26911
|
+ "/orderby(AGE desc)/com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
26632
26912
|
+ "HierarchyNodes=$root/EMPLOYEES,HierarchyQualifier='OrgChart',NodeProperty='ID'"
|
|
26633
|
-
+ ",Levels=1)&$select=DrillState,ID&$count=true&$skip=0&$top=
|
|
26913
|
+
+ ",Levels=1)&$select=DrillState,ID&$count=true&$skip=0&$top=6", {
|
|
26634
26914
|
"@odata.count" : "1",
|
|
26635
26915
|
value : [{
|
|
26636
26916
|
DrillState : "collapsed",
|
|
@@ -26672,12 +26952,12 @@ sap.ui.define([
|
|
|
26672
26952
|
+ ",filter(AGE ge 0 and (Is_Manager))/search(covfefe),keep start)"
|
|
26673
26953
|
+ "/descendants($root/EMPLOYEES,OrgChart,ID,filter(ID eq '0'),1)"
|
|
26674
26954
|
+ "/orderby(AGE desc)"
|
|
26675
|
-
+ "&$select=DrillState,ID&$count=true&$skip=0&$top=
|
|
26676
|
-
"@odata.count" : "
|
|
26677
|
-
value : [
|
|
26678
|
-
DrillState : "leaf",
|
|
26679
|
-
ID : "
|
|
26680
|
-
|
|
26955
|
+
+ "&$select=DrillState,ID&$count=true&$skip=0&$top=6", {
|
|
26956
|
+
"@odata.count" : "2",
|
|
26957
|
+
value : [
|
|
26958
|
+
{DrillState : "leaf", ID : "1"},
|
|
26959
|
+
{DrillState : "leaf", ID : "2"}
|
|
26960
|
+
]
|
|
26681
26961
|
})
|
|
26682
26962
|
.expectChange("id", [, "1"]);
|
|
26683
26963
|
|
|
@@ -26685,6 +26965,12 @@ sap.ui.define([
|
|
|
26685
26965
|
oRoot.expand();
|
|
26686
26966
|
|
|
26687
26967
|
return that.waitForChanges(assert, "expand root");
|
|
26968
|
+
}).then(function () {
|
|
26969
|
+
that.expectChange("id", [, "1", "2"]);
|
|
26970
|
+
|
|
26971
|
+
oTable.setFirstVisibleRow(1);
|
|
26972
|
+
|
|
26973
|
+
return that.waitForChanges(assert, "scroll down");
|
|
26688
26974
|
});
|
|
26689
26975
|
});
|
|
26690
26976
|
|
|
@@ -26703,7 +26989,7 @@ sap.ui.define([
|
|
|
26703
26989
|
//
|
|
26704
26990
|
// A new child (Gimel) for 0 (Alpha) is created, then 0 (Alpha) is collapsed again to check
|
|
26705
26991
|
// that the internal "limited descendant count" has been updated correctly. Finally, 0 (Alpha)
|
|
26706
|
-
// is expanded again to check that internal "
|
|
26992
|
+
// is expanded again to check that internal "rank" handling is correct.
|
|
26707
26993
|
// JIRA: CPOUI5ODATAV4-2359
|
|
26708
26994
|
QUnit.test("Recursive Hierarchy: collapse nested initially expanded nodes", function (assert) {
|
|
26709
26995
|
var oAlpha,
|
|
@@ -26936,7 +27222,7 @@ sap.ui.define([
|
|
|
26936
27222
|
["", "", "", "", "", ""],
|
|
26937
27223
|
["", "", "", "", "", ""]
|
|
26938
27224
|
]);
|
|
26939
|
-
assert
|
|
27225
|
+
checkCreatedPersisted(assert, oNewRoot);
|
|
26940
27226
|
|
|
26941
27227
|
that.expectRequest("EMPLOYEES?$select=AGE,ID"
|
|
26942
27228
|
+ "&$filter=ID eq 'B' or ID eq '0' or ID eq '9'&$top=3", {
|
|
@@ -27080,7 +27366,7 @@ sap.ui.define([
|
|
|
27080
27366
|
[false, 2, "1", "0", "Beta", 155],
|
|
27081
27367
|
[undefined, 2, "2", "0", "Kappa", 156]
|
|
27082
27368
|
], 11);
|
|
27083
|
-
assert
|
|
27369
|
+
checkCreatedPersisted(assert, oNewChild);
|
|
27084
27370
|
|
|
27085
27371
|
// code under test
|
|
27086
27372
|
oAlpha.collapse();
|
|
@@ -27121,7 +27407,7 @@ sap.ui.define([
|
|
|
27121
27407
|
], 11);
|
|
27122
27408
|
assert.strictEqual(oNewChild.getBinding().getCurrentContexts()[2], oNewChild,
|
|
27123
27409
|
"still the same");
|
|
27124
|
-
assert
|
|
27410
|
+
checkCreatedPersisted(assert, oNewChild);
|
|
27125
27411
|
});
|
|
27126
27412
|
});
|
|
27127
27413
|
|
|
@@ -29464,12 +29750,14 @@ sap.ui.define([
|
|
|
29464
29750
|
// @odata.bind in POST relative to resource path (BCP: 2380119648)
|
|
29465
29751
|
//
|
|
29466
29752
|
// Move "Gamma" so that "Beta" becomes its parent, then move it back again. Collapse the root,
|
|
29467
|
-
// request a side effect for all rows, and expand the root
|
|
29468
|
-
// Move "Beta" so that "Gamma" becomes its parent (no change
|
|
29469
|
-
// node (again) becomes "created persisted"). Observe
|
|
29753
|
+
// request a side effect for all rows (two times, JIRA: CPOUI5ODATAV4-2385), and expand the root
|
|
29754
|
+
// again. Start a move, but cancel it. Move "Beta" so that "Gamma" becomes its parent (no change
|
|
29755
|
+
// to context's index, but a persisted node (again) becomes "created persisted"). Observe
|
|
29756
|
+
// property change events for "@odata.etag".
|
|
29470
29757
|
// JIRA: CPOUI5ODATAV4-2226
|
|
29471
29758
|
//
|
|
29472
29759
|
// Create a new root via "@$ui5.node.parent" : null (JIRA: CPOUI5ODATAV4-2355)
|
|
29760
|
+
// Move "Beta" to make it a root node (JIRA: CPOUI5ODATAV4-2399)
|
|
29473
29761
|
//
|
|
29474
29762
|
// "Refresh single" for stale elements; keep same context instance for created nodes throughout
|
|
29475
29763
|
// collapse and side effects.
|
|
@@ -29481,7 +29769,7 @@ sap.ui.define([
|
|
|
29481
29769
|
const oModel = this.createSpecialCasesModel({autoExpandSelect : true});
|
|
29482
29770
|
const sFriend = "/Artists(ArtistID='99',IsActiveEntity=false)/_Friend";
|
|
29483
29771
|
const sView = `
|
|
29484
|
-
<t:Table id="table" rows="{path : '/Artists(ArtistID
|
|
29772
|
+
<t:Table id="table" rows="{path : '/Artists(ArtistID=\\'99\\',IsActiveEntity=false)/_Friend',
|
|
29485
29773
|
parameters : {
|
|
29486
29774
|
$$aggregation : {
|
|
29487
29775
|
hierarchyQualifier : 'OrgChart'
|
|
@@ -29605,8 +29893,7 @@ sap.ui.define([
|
|
|
29605
29893
|
IsActiveEntity : false,
|
|
29606
29894
|
Name : "Beta: β"
|
|
29607
29895
|
});
|
|
29608
|
-
assert
|
|
29609
|
-
assert.strictEqual(oBeta.created(), oBetaCreated);
|
|
29896
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
29610
29897
|
|
|
29611
29898
|
// code under test (JIRA: CPOUI5ODATAV4-2272)
|
|
29612
29899
|
const oLostChild = oListBinding.create({
|
|
@@ -29657,8 +29944,7 @@ sap.ui.define([
|
|
|
29657
29944
|
[false, undefined, 2, "etag2.0", "Gamma: γ"],
|
|
29658
29945
|
[false, undefined, 2, "etag1.0", "Beta: β"]
|
|
29659
29946
|
]);
|
|
29660
|
-
assert
|
|
29661
|
-
assert.strictEqual(oGamma.created(), oGammaCreated);
|
|
29947
|
+
checkCreatedPersisted(assert, oGamma, oGammaCreated);
|
|
29662
29948
|
|
|
29663
29949
|
that.expectRequest({
|
|
29664
29950
|
headers : {
|
|
@@ -29701,8 +29987,7 @@ sap.ui.define([
|
|
|
29701
29987
|
IsActiveEntity : false,
|
|
29702
29988
|
Name : "Beta: β"
|
|
29703
29989
|
});
|
|
29704
|
-
assert
|
|
29705
|
-
assert.strictEqual(oBeta.created(), oBetaCreated);
|
|
29990
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
29706
29991
|
|
|
29707
29992
|
assert.strictEqual(oGamma.getIndex(), 2);
|
|
29708
29993
|
assert.deepEqual(oGamma.getObject(), {
|
|
@@ -29713,13 +29998,12 @@ sap.ui.define([
|
|
|
29713
29998
|
IsActiveEntity : false,
|
|
29714
29999
|
Name : "Gamma: γ"
|
|
29715
30000
|
});
|
|
29716
|
-
assert
|
|
29717
|
-
assert.strictEqual(oGamma.created(), oGammaCreated, "unchanged");
|
|
30001
|
+
checkCreatedPersisted(assert, oGamma, oGammaCreated);
|
|
29718
30002
|
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
30003
|
+
assert.throws(function () {
|
|
30004
|
+
// code under test
|
|
30005
|
+
oRoot.move({parent : oGamma});
|
|
30006
|
+
}, new Error("Unsupported parent context: " + oGamma));
|
|
29723
30007
|
|
|
29724
30008
|
that.expectRequest({
|
|
29725
30009
|
headers : {
|
|
@@ -29761,8 +30045,7 @@ sap.ui.define([
|
|
|
29761
30045
|
IsActiveEntity : false,
|
|
29762
30046
|
Name : "Gamma: γ"
|
|
29763
30047
|
});
|
|
29764
|
-
assert
|
|
29765
|
-
assert.strictEqual(oGamma.created(), oGammaCreated, "unchanged");
|
|
30048
|
+
checkCreatedPersisted(assert, oGamma, oGammaCreated);
|
|
29766
30049
|
|
|
29767
30050
|
assert.strictEqual(oBeta.getIndex(), 2);
|
|
29768
30051
|
assert.deepEqual(oBeta.getObject(), {
|
|
@@ -29773,8 +30056,7 @@ sap.ui.define([
|
|
|
29773
30056
|
IsActiveEntity : false,
|
|
29774
30057
|
Name : "Beta: β"
|
|
29775
30058
|
});
|
|
29776
|
-
assert
|
|
29777
|
-
assert.strictEqual(oBeta.created(), oBetaCreated);
|
|
30059
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
29778
30060
|
|
|
29779
30061
|
// code under test
|
|
29780
30062
|
oRoot.collapse();
|
|
@@ -29858,8 +30140,7 @@ sap.ui.define([
|
|
|
29858
30140
|
Name : "Gamma #1",
|
|
29859
30141
|
_ : null // Note: NodeID still unknown
|
|
29860
30142
|
});
|
|
29861
|
-
assert
|
|
29862
|
-
assert.strictEqual(oGamma.created(), oGammaCreated, "unchanged");
|
|
30143
|
+
checkCreatedPersisted(assert, oGamma, oGammaCreated);
|
|
29863
30144
|
|
|
29864
30145
|
assert.strictEqual(oBeta.getIndex(), 2);
|
|
29865
30146
|
assert.deepEqual(oBeta.getObject(), {
|
|
@@ -29871,8 +30152,7 @@ sap.ui.define([
|
|
|
29871
30152
|
Name : "Beta #1",
|
|
29872
30153
|
_ : null // Note: NodeID still unknown
|
|
29873
30154
|
});
|
|
29874
|
-
assert
|
|
29875
|
-
assert.strictEqual(oBeta.created(), oBetaCreated, "unchanged");
|
|
30155
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
29876
30156
|
|
|
29877
30157
|
return Promise.all([
|
|
29878
30158
|
// code under test
|
|
@@ -29924,8 +30204,7 @@ sap.ui.define([
|
|
|
29924
30204
|
Name : "Gamma #1",
|
|
29925
30205
|
_ : null // Note: NodeID still unknown
|
|
29926
30206
|
});
|
|
29927
|
-
assert
|
|
29928
|
-
assert.strictEqual(oGamma.created(), oGammaCreated, "unchanged");
|
|
30207
|
+
checkCreatedPersisted(assert, oGamma, oGammaCreated);
|
|
29929
30208
|
|
|
29930
30209
|
assert.strictEqual(oBeta.getIndex(), 2); // unchanged by #move
|
|
29931
30210
|
assert.deepEqual(oBeta.getObject(), {
|
|
@@ -29937,8 +30216,7 @@ sap.ui.define([
|
|
|
29937
30216
|
Name : "Beta #1",
|
|
29938
30217
|
_ : null // Note: NodeID still unknown
|
|
29939
30218
|
});
|
|
29940
|
-
assert
|
|
29941
|
-
assert.strictEqual(oBeta.created(), oBetaCreated, "unchanged");
|
|
30219
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
29942
30220
|
|
|
29943
30221
|
return oBeta.created(); // to prove that it's not rejected
|
|
29944
30222
|
}).then(function () {
|
|
@@ -29983,7 +30261,7 @@ sap.ui.define([
|
|
|
29983
30261
|
[undefined, true, 1, "etag0.1", "Alpha #1"],
|
|
29984
30262
|
[false, true, 2, "etag2.3", "Gamma #1"]
|
|
29985
30263
|
]);
|
|
29986
|
-
assert
|
|
30264
|
+
checkCreatedPersisted(assert, oNewRoot);
|
|
29987
30265
|
|
|
29988
30266
|
that.expectRequest(sFriend.slice(1) + "?$select=ArtistID,IsActiveEntity,Name,_/NodeID"
|
|
29989
30267
|
+ "&$filter=ArtistID eq '9' and IsActiveEntity eq false"
|
|
@@ -30023,10 +30301,12 @@ sap.ui.define([
|
|
|
30023
30301
|
return Promise.all([
|
|
30024
30302
|
// code under test
|
|
30025
30303
|
oListBinding.getHeaderContext().requestSideEffects(["Name"]),
|
|
30026
|
-
|
|
30304
|
+
// Note: no new request expected, it's merged with the 1st one
|
|
30305
|
+
oListBinding.getHeaderContext().requestSideEffects(["Name"]),
|
|
30306
|
+
that.waitForChanges(assert, "side effect again (2x): Name for all rows")
|
|
30027
30307
|
]);
|
|
30028
30308
|
}).then(function () {
|
|
30029
|
-
checkTable("after side effect again: Name for all rows", assert, oTable, [
|
|
30309
|
+
checkTable("after side effect again (2x): Name for all rows", assert, oTable, [
|
|
30030
30310
|
sFriend + "(ArtistID='9',IsActiveEntity=false)",
|
|
30031
30311
|
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
30032
30312
|
sFriend + "(ArtistID='2',IsActiveEntity=false)",
|
|
@@ -30056,11 +30336,443 @@ sap.ui.define([
|
|
|
30056
30336
|
[false, undefined, 3, "etag1.5", "Beta #2"]
|
|
30057
30337
|
]);
|
|
30058
30338
|
assert.strictEqual(oBeta, oListBinding.getCurrentContexts()[2], "same instance");
|
|
30059
|
-
assert
|
|
30060
|
-
|
|
30339
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
30340
|
+
|
|
30341
|
+
that.expectRequest({
|
|
30342
|
+
headers : {
|
|
30343
|
+
"If-Match" : "etag1.5",
|
|
30344
|
+
Prefer : "return=minimal"
|
|
30345
|
+
},
|
|
30346
|
+
method : "PATCH",
|
|
30347
|
+
url : "Artists(ArtistID='1',IsActiveEntity=false)",
|
|
30348
|
+
payload : {
|
|
30349
|
+
"BestFriend@odata.bind" : null
|
|
30350
|
+
}
|
|
30351
|
+
}, null, {ETag : "etag1.6"}) // 204 No Content
|
|
30352
|
+
.expectChange("etag", [,,, "etag1.6"])
|
|
30353
|
+
.expectChange("etag", [, "etag9.1", "etag0.2", "etag2.4"])
|
|
30354
|
+
.expectChange("name", [, "Aleph #2", "Alpha #2", "Gamma #2"]);
|
|
30355
|
+
|
|
30356
|
+
return Promise.all([
|
|
30357
|
+
// code under test
|
|
30358
|
+
oBeta.move(),
|
|
30359
|
+
that.waitForChanges(assert, "move Beta to make it a root node")
|
|
30360
|
+
]);
|
|
30361
|
+
}).then(function () {
|
|
30362
|
+
checkCreatedPersisted(assert, oBeta, oBetaCreated);
|
|
30363
|
+
|
|
30364
|
+
return that.checkAllContexts("after move Beta to make it a root node", assert,
|
|
30365
|
+
oListBinding, ["@$ui5.context.isTransient", "@$ui5.node.isExpanded",
|
|
30366
|
+
"@$ui5.node.level", "@odata.etag", "Name"], [
|
|
30367
|
+
[false, undefined, 1, "etag1.6", "Beta #2"],
|
|
30368
|
+
[false, undefined, 1, "etag9.1", "Aleph #2"],
|
|
30369
|
+
[undefined, true, 1, "etag0.2", "Alpha #2"],
|
|
30370
|
+
[false, undefined, 2, "etag2.4", "Gamma #2"]
|
|
30371
|
+
]);
|
|
30061
30372
|
});
|
|
30062
30373
|
});
|
|
30063
30374
|
|
|
30375
|
+
//*********************************************************************************************
|
|
30376
|
+
// Scenario: Create a new node when all levels are expanded, observe a GET for LimitedRank. The
|
|
30377
|
+
// created node is inserted on the second sibling position on back end, but is shown on the
|
|
30378
|
+
// client on first position. Use a filter and a search as well as a sort order. Before creation,
|
|
30379
|
+
// a sibling is collapsed and after creation it is expanded again. The root is collapsed and
|
|
30380
|
+
// immediately expanded again. Finally, the new node is deleted again.
|
|
30381
|
+
// JIRA: CPOUI5ODATAV4-2393
|
|
30382
|
+
//
|
|
30383
|
+
// Before deletion, the new node is maybe moved to make it a root (JIRA: CPOUI5ODATAV4-2400)
|
|
30384
|
+
// Old vs. new format of RecursiveHierarchy annotation (JIRA: CPOUI5ODATAV4-2401)
|
|
30385
|
+
[false, true].forEach((bMakeRoot) => {
|
|
30386
|
+
["OldChart", "OrgChart"].forEach((sHierarchyQualifier) => {
|
|
30387
|
+
const sTitle = `Recursive Hierarchy: expand all and create for ${sHierarchyQualifier};
|
|
30388
|
+
make root = ${bMakeRoot}`;
|
|
30389
|
+
const sLimitedRank = sHierarchyQualifier === "OldChart" ? "LimitedRank" : "Limited_Rank";
|
|
30390
|
+
|
|
30391
|
+
QUnit.test(sTitle, async function (assert) {
|
|
30392
|
+
const oModel = this.createSpecialCasesModel({autoExpandSelect : true});
|
|
30393
|
+
const sFriend = "/Artists(ArtistID='99',IsActiveEntity=false)/_Friend";
|
|
30394
|
+
const sBaseUrl = sFriend.slice(1) + "?$apply=ancestors"
|
|
30395
|
+
+ "($root/Artists(ArtistID='99',IsActiveEntity=false)/_Friend," + sHierarchyQualifier
|
|
30396
|
+
+ ",_/NodeID,filter(IsActiveEntity eq false)/search(covfefe),keep start)"
|
|
30397
|
+
+ "/orderby(ArtistID)"
|
|
30398
|
+
+ "/com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root" + sFriend
|
|
30399
|
+
+ ",HierarchyQualifier='" + sHierarchyQualifier + "',NodeProperty='_/NodeID')";
|
|
30400
|
+
const sReadUrl = sBaseUrl + "&$select=ArtistID,IsActiveEntity,Name"
|
|
30401
|
+
+ ",_/DescendantCount,_/DistanceFromRoot,_/DrillState,_/NodeID";
|
|
30402
|
+
const sView = `
|
|
30403
|
+
<t:Table id="table" rows="{path : '/Artists(ArtistID=\\'99\\',IsActiveEntity=false)/_Friend',
|
|
30404
|
+
parameters : {
|
|
30405
|
+
$$aggregation : {
|
|
30406
|
+
expandTo : 1E16,
|
|
30407
|
+
hierarchyQualifier : '${sHierarchyQualifier}',
|
|
30408
|
+
search : 'covfefe'
|
|
30409
|
+
},
|
|
30410
|
+
$filter : 'IsActiveEntity eq false',
|
|
30411
|
+
$orderby : 'ArtistID'
|
|
30412
|
+
}}" threshold="0" visibleRowCount="2">
|
|
30413
|
+
<Text text="{= %{@$ui5.node.isExpanded} }"/>
|
|
30414
|
+
<Text text="{= %{@$ui5.node.level} }"/>
|
|
30415
|
+
<Text text="{ArtistID}"/>
|
|
30416
|
+
<Text text="{Name}"/>
|
|
30417
|
+
</t:Table>`;
|
|
30418
|
+
|
|
30419
|
+
// Note: hierarchy in server perspective
|
|
30420
|
+
// 0 Alpha
|
|
30421
|
+
// 1 Beta
|
|
30422
|
+
// 2 Gamma (loaded later)
|
|
30423
|
+
// 3 Delta (loaded later)
|
|
30424
|
+
// <-- insert new on server: 9 New
|
|
30425
|
+
// 4 Epsilon (loaded later)
|
|
30426
|
+
// 5 Zeta (loaded soon)
|
|
30427
|
+
// 5.1 Eta (loaded soon)
|
|
30428
|
+
// 5.2 Theta (loaded later)
|
|
30429
|
+
// 6 Iota (loaded later)
|
|
30430
|
+
// 7 Kappa (loaded later)
|
|
30431
|
+
this.expectRequest(sReadUrl + "&$count=true&$skip=0&$top=2", {
|
|
30432
|
+
"@odata.count" : "10",
|
|
30433
|
+
value : [{
|
|
30434
|
+
ArtistID : "0",
|
|
30435
|
+
IsActiveEntity : false,
|
|
30436
|
+
Name : "Alpha",
|
|
30437
|
+
_ : {
|
|
30438
|
+
DescendantCount : "9",
|
|
30439
|
+
DistanceFromRoot : "0",
|
|
30440
|
+
DrillState : "expanded",
|
|
30441
|
+
NodeID : "0,false"
|
|
30442
|
+
}
|
|
30443
|
+
}, {
|
|
30444
|
+
ArtistID : "1",
|
|
30445
|
+
IsActiveEntity : false,
|
|
30446
|
+
Name : "Beta",
|
|
30447
|
+
_ : {
|
|
30448
|
+
DescendantCount : "0",
|
|
30449
|
+
DistanceFromRoot : "1",
|
|
30450
|
+
DrillState : "leaf",
|
|
30451
|
+
NodeID : "1,false"
|
|
30452
|
+
}
|
|
30453
|
+
}]
|
|
30454
|
+
});
|
|
30455
|
+
|
|
30456
|
+
await this.createView(assert, sView, oModel);
|
|
30457
|
+
|
|
30458
|
+
const oTable = this.oView.byId("table");
|
|
30459
|
+
checkTable("initial page", assert, oTable, [
|
|
30460
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
30461
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)"
|
|
30462
|
+
], [
|
|
30463
|
+
[true, 1, "0", "Alpha"],
|
|
30464
|
+
[undefined, 2, "1", "Beta"]
|
|
30465
|
+
], 10);
|
|
30466
|
+
const oListBinding = oTable.getBinding("rows");
|
|
30467
|
+
const oAlpha = oListBinding.getCurrentContexts()[0];
|
|
30468
|
+
|
|
30469
|
+
// 0 Alpha
|
|
30470
|
+
// 1 Beta
|
|
30471
|
+
// 2 Gamma (loaded later)
|
|
30472
|
+
// 3 Delta (loaded later)
|
|
30473
|
+
// 4 Epsilon (loaded later)
|
|
30474
|
+
// 5 Zeta
|
|
30475
|
+
// 5.1 Eta
|
|
30476
|
+
// 5.2 Theta (loaded later)
|
|
30477
|
+
// 6 Iota (loaded later)
|
|
30478
|
+
// 7 Kappa (loaded later)
|
|
30479
|
+
this.expectRequest(sReadUrl + "&$skip=5&$top=2", {
|
|
30480
|
+
value : [{
|
|
30481
|
+
ArtistID : "5",
|
|
30482
|
+
IsActiveEntity : false,
|
|
30483
|
+
Name : "Zeta",
|
|
30484
|
+
_ : {
|
|
30485
|
+
DescendantCount : "2",
|
|
30486
|
+
DistanceFromRoot : "1",
|
|
30487
|
+
DrillState : "expanded",
|
|
30488
|
+
NodeID : "5,false"
|
|
30489
|
+
}
|
|
30490
|
+
}, {
|
|
30491
|
+
ArtistID : "5.1",
|
|
30492
|
+
IsActiveEntity : false,
|
|
30493
|
+
Name : "Eta",
|
|
30494
|
+
_ : {
|
|
30495
|
+
DescendantCount : "0",
|
|
30496
|
+
DistanceFromRoot : "2",
|
|
30497
|
+
DrillState : "leaf",
|
|
30498
|
+
NodeID : "5.1,false"
|
|
30499
|
+
}
|
|
30500
|
+
}]
|
|
30501
|
+
});
|
|
30502
|
+
|
|
30503
|
+
oTable.setFirstVisibleRow(5);
|
|
30504
|
+
|
|
30505
|
+
await this.waitForChanges(assert, "scroll to Zeta");
|
|
30506
|
+
|
|
30507
|
+
checkTable("after scroll to Zeta", assert, oTable, [
|
|
30508
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
30509
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)",
|
|
30510
|
+
sFriend + "(ArtistID='5',IsActiveEntity=false)",
|
|
30511
|
+
sFriend + "(ArtistID='5.1',IsActiveEntity=false)"
|
|
30512
|
+
], [
|
|
30513
|
+
[true, 2, "5", "Zeta"],
|
|
30514
|
+
[undefined, 3, "5.1", "Eta"]
|
|
30515
|
+
], 10);
|
|
30516
|
+
const oZeta = oListBinding.getCurrentContexts()[0];
|
|
30517
|
+
|
|
30518
|
+
// 0 Alpha
|
|
30519
|
+
// 1 Beta
|
|
30520
|
+
// 2 Gamma (loaded later)
|
|
30521
|
+
// 3 Delta (loaded later)
|
|
30522
|
+
// 4 Epsilon (loaded later)
|
|
30523
|
+
// 5 Zeta
|
|
30524
|
+
// 5.1 Eta
|
|
30525
|
+
// 5.2 Theta (loaded later)
|
|
30526
|
+
// 6 Iota
|
|
30527
|
+
// 7 Kappa (loaded later)
|
|
30528
|
+
this.expectRequest(sReadUrl + "&$skip=8&$top=1", {
|
|
30529
|
+
value : [{
|
|
30530
|
+
ArtistID : "6",
|
|
30531
|
+
IsActiveEntity : false,
|
|
30532
|
+
Name : "Iota",
|
|
30533
|
+
_ : {
|
|
30534
|
+
DescendantCount : "0",
|
|
30535
|
+
DistanceFromRoot : "1",
|
|
30536
|
+
DrillState : "leaf",
|
|
30537
|
+
NodeID : "6,false"
|
|
30538
|
+
}
|
|
30539
|
+
}]
|
|
30540
|
+
});
|
|
30541
|
+
|
|
30542
|
+
oZeta.collapse();
|
|
30543
|
+
|
|
30544
|
+
await this.waitForChanges(assert, "collapse Zeta");
|
|
30545
|
+
|
|
30546
|
+
checkTable("after collapse Zeta", assert, oTable, [
|
|
30547
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
30548
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)",
|
|
30549
|
+
sFriend + "(ArtistID='5',IsActiveEntity=false)",
|
|
30550
|
+
sFriend + "(ArtistID='6',IsActiveEntity=false)"
|
|
30551
|
+
], [
|
|
30552
|
+
[false, 2, "5", "Zeta"],
|
|
30553
|
+
[undefined, 2, "6", "Iota"]
|
|
30554
|
+
], 8);
|
|
30555
|
+
|
|
30556
|
+
oTable.setFirstVisibleRow(0);
|
|
30557
|
+
|
|
30558
|
+
// 0 Alpha
|
|
30559
|
+
// 1 Beta
|
|
30560
|
+
// 2 Gamma (loaded later)
|
|
30561
|
+
// 3 Delta (loaded later)
|
|
30562
|
+
// 9 New (created)
|
|
30563
|
+
// 4 Epsilon (loaded later)
|
|
30564
|
+
// 5 Zeta
|
|
30565
|
+
// 5.1 Eta
|
|
30566
|
+
// 5.2 Theta (loaded later)
|
|
30567
|
+
// 6 Iota (loaded later)
|
|
30568
|
+
// 7 Kappa (loaded later)
|
|
30569
|
+
this.expectRequest({
|
|
30570
|
+
method : "POST",
|
|
30571
|
+
url : sFriend.slice(1),
|
|
30572
|
+
payload : {
|
|
30573
|
+
"BestFriend@odata.bind" : "../Artists(ArtistID='0',IsActiveEntity=false)",
|
|
30574
|
+
Name : "New"
|
|
30575
|
+
}
|
|
30576
|
+
}, {
|
|
30577
|
+
ArtistID : "9",
|
|
30578
|
+
IsActiveEntity : false,
|
|
30579
|
+
Name : "New"
|
|
30580
|
+
})
|
|
30581
|
+
.expectRequest(sBaseUrl + "&$filter=ArtistID eq '9' and IsActiveEntity eq false"
|
|
30582
|
+
+ "&$select=_/" + sLimitedRank, {
|
|
30583
|
+
value : [{
|
|
30584
|
+
_ : {
|
|
30585
|
+
[sLimitedRank] : "4" // Edm.Int64
|
|
30586
|
+
}
|
|
30587
|
+
}]
|
|
30588
|
+
});
|
|
30589
|
+
|
|
30590
|
+
// code under test
|
|
30591
|
+
const oNewChild = oListBinding.create({
|
|
30592
|
+
"@$ui5.node.parent" : oAlpha,
|
|
30593
|
+
Name : "New"
|
|
30594
|
+
}, /*bSkipRefresh*/true);
|
|
30595
|
+
|
|
30596
|
+
await Promise.all([
|
|
30597
|
+
oNewChild.created(),
|
|
30598
|
+
this.waitForChanges(assert, "create New")
|
|
30599
|
+
]);
|
|
30600
|
+
checkTable("after create New", assert, oTable, [
|
|
30601
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
30602
|
+
sFriend + "(ArtistID='9',IsActiveEntity=false)",
|
|
30603
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)",
|
|
30604
|
+
sFriend + "(ArtistID='5',IsActiveEntity=false)",
|
|
30605
|
+
sFriend + "(ArtistID='6',IsActiveEntity=false)"
|
|
30606
|
+
], [
|
|
30607
|
+
[true, 1, "0", "Alpha"],
|
|
30608
|
+
[undefined, 2, "9", "New"]
|
|
30609
|
+
], 9);
|
|
30610
|
+
|
|
30611
|
+
// code under test
|
|
30612
|
+
oZeta.expand();
|
|
30613
|
+
oAlpha.collapse();
|
|
30614
|
+
oAlpha.expand();
|
|
30615
|
+
|
|
30616
|
+
// 0 Alpha
|
|
30617
|
+
// 1 Beta
|
|
30618
|
+
// 2 Gamma
|
|
30619
|
+
// 3 Delta
|
|
30620
|
+
// 9 New (created)
|
|
30621
|
+
// 4 Epsilon
|
|
30622
|
+
// 5 Zeta
|
|
30623
|
+
// 5.1 Eta
|
|
30624
|
+
// 5.2 Theta
|
|
30625
|
+
// 6 Iota
|
|
30626
|
+
// 7 Kappa
|
|
30627
|
+
this.expectRequest(sReadUrl + "&$skip=2&$top=2", {
|
|
30628
|
+
value : [{
|
|
30629
|
+
ArtistID : "2",
|
|
30630
|
+
IsActiveEntity : false,
|
|
30631
|
+
Name : "Gamma",
|
|
30632
|
+
_ : {
|
|
30633
|
+
DescendantCount : "0",
|
|
30634
|
+
DistanceFromRoot : "1",
|
|
30635
|
+
DrillState : "leaf",
|
|
30636
|
+
NodeID : "2,false"
|
|
30637
|
+
}
|
|
30638
|
+
}, {
|
|
30639
|
+
ArtistID : "3",
|
|
30640
|
+
IsActiveEntity : false,
|
|
30641
|
+
Name : "Delta",
|
|
30642
|
+
_ : {
|
|
30643
|
+
DescendantCount : "0",
|
|
30644
|
+
DistanceFromRoot : "1",
|
|
30645
|
+
DrillState : "leaf",
|
|
30646
|
+
NodeID : "3,false"
|
|
30647
|
+
}
|
|
30648
|
+
}]
|
|
30649
|
+
})
|
|
30650
|
+
.expectRequest(sReadUrl + "&$skip=5&$top=1", {
|
|
30651
|
+
value : [{
|
|
30652
|
+
ArtistID : "4",
|
|
30653
|
+
IsActiveEntity : false,
|
|
30654
|
+
Name : "Epsilon",
|
|
30655
|
+
_ : {
|
|
30656
|
+
DescendantCount : "0",
|
|
30657
|
+
DistanceFromRoot : "1",
|
|
30658
|
+
DrillState : "leaf",
|
|
30659
|
+
NodeID : "4,false"
|
|
30660
|
+
}
|
|
30661
|
+
}]
|
|
30662
|
+
})
|
|
30663
|
+
.expectRequest(sReadUrl + "&$skip=8&$top=1", {
|
|
30664
|
+
value : [{
|
|
30665
|
+
ArtistID : "5.2",
|
|
30666
|
+
IsActiveEntity : false,
|
|
30667
|
+
Name : "Theta",
|
|
30668
|
+
_ : {
|
|
30669
|
+
DescendantCount : "0",
|
|
30670
|
+
DistanceFromRoot : "2",
|
|
30671
|
+
DrillState : "leaf",
|
|
30672
|
+
NodeID : "5.2,false"
|
|
30673
|
+
}
|
|
30674
|
+
}]
|
|
30675
|
+
})
|
|
30676
|
+
.expectRequest(sReadUrl + "&$skip=10&$top=1", {
|
|
30677
|
+
value : [{
|
|
30678
|
+
ArtistID : "7",
|
|
30679
|
+
IsActiveEntity : false,
|
|
30680
|
+
Name : "Kappa",
|
|
30681
|
+
_ : {
|
|
30682
|
+
DescendantCount : "0",
|
|
30683
|
+
DistanceFromRoot : "1",
|
|
30684
|
+
DrillState : "leaf",
|
|
30685
|
+
NodeID : "7,false"
|
|
30686
|
+
}
|
|
30687
|
+
}]
|
|
30688
|
+
});
|
|
30689
|
+
|
|
30690
|
+
await this.checkAllContexts("after loading all rows", assert, oListBinding,
|
|
30691
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
30692
|
+
[true, 1, "0", "Alpha"],
|
|
30693
|
+
[undefined, 2, "9", "New"],
|
|
30694
|
+
[undefined, 2, "1", "Beta"],
|
|
30695
|
+
[undefined, 2, "2", "Gamma"],
|
|
30696
|
+
[undefined, 2, "3", "Delta"],
|
|
30697
|
+
[undefined, 2, "4", "Epsilon"],
|
|
30698
|
+
[true, 2, "5", "Zeta"],
|
|
30699
|
+
[undefined, 3, "5.1", "Eta"],
|
|
30700
|
+
[undefined, 3, "5.2", "Theta"],
|
|
30701
|
+
[undefined, 2, "6", "Iota"],
|
|
30702
|
+
[undefined, 2, "7", "Kappa"]
|
|
30703
|
+
]);
|
|
30704
|
+
|
|
30705
|
+
if (bMakeRoot) {
|
|
30706
|
+
this.expectRequest({
|
|
30707
|
+
batchNo : 7,
|
|
30708
|
+
headers : {
|
|
30709
|
+
Prefer : "return=minimal"
|
|
30710
|
+
},
|
|
30711
|
+
method : "PATCH",
|
|
30712
|
+
url : "Artists(ArtistID='9',IsActiveEntity=false)",
|
|
30713
|
+
payload : {
|
|
30714
|
+
"BestFriend@odata.bind" : null
|
|
30715
|
+
}
|
|
30716
|
+
}) // 204 No Content
|
|
30717
|
+
.expectRequest({
|
|
30718
|
+
batchNo : 7,
|
|
30719
|
+
url : sBaseUrl + "&$filter=ArtistID eq '9' and IsActiveEntity eq false"
|
|
30720
|
+
+ "&$select=_/" + sLimitedRank
|
|
30721
|
+
}, {
|
|
30722
|
+
value : [{
|
|
30723
|
+
_ : {
|
|
30724
|
+
[sLimitedRank] : "10" // Edm.Int64
|
|
30725
|
+
}
|
|
30726
|
+
}]
|
|
30727
|
+
});
|
|
30728
|
+
|
|
30729
|
+
await Promise.all([
|
|
30730
|
+
// code under test
|
|
30731
|
+
oNewChild.move(),
|
|
30732
|
+
this.waitForChanges(assert, "make New a root node")
|
|
30733
|
+
]);
|
|
30734
|
+
|
|
30735
|
+
await this.checkAllContexts("after make New a root node", assert, oListBinding,
|
|
30736
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
30737
|
+
[undefined, 1, "9", "New"],
|
|
30738
|
+
[true, 1, "0", "Alpha"],
|
|
30739
|
+
[undefined, 2, "1", "Beta"],
|
|
30740
|
+
[undefined, 2, "2", "Gamma"],
|
|
30741
|
+
[undefined, 2, "3", "Delta"],
|
|
30742
|
+
[undefined, 2, "4", "Epsilon"],
|
|
30743
|
+
[true, 2, "5", "Zeta"],
|
|
30744
|
+
[undefined, 3, "5.1", "Eta"],
|
|
30745
|
+
[undefined, 3, "5.2", "Theta"],
|
|
30746
|
+
[undefined, 2, "6", "Iota"],
|
|
30747
|
+
[undefined, 2, "7", "Kappa"]
|
|
30748
|
+
]);
|
|
30749
|
+
}
|
|
30750
|
+
|
|
30751
|
+
this.expectRequest("DELETE Artists(ArtistID='9',IsActiveEntity=false)");
|
|
30752
|
+
|
|
30753
|
+
await Promise.all([
|
|
30754
|
+
// code under test
|
|
30755
|
+
oNewChild.delete(),
|
|
30756
|
+
this.waitForChanges(assert, "delete New")
|
|
30757
|
+
]);
|
|
30758
|
+
|
|
30759
|
+
await this.checkAllContexts("after loading all rows", assert, oListBinding,
|
|
30760
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
30761
|
+
[true, 1, "0", "Alpha"],
|
|
30762
|
+
[undefined, 2, "1", "Beta"],
|
|
30763
|
+
[undefined, 2, "2", "Gamma"],
|
|
30764
|
+
[undefined, 2, "3", "Delta"],
|
|
30765
|
+
[undefined, 2, "4", "Epsilon"],
|
|
30766
|
+
[true, 2, "5", "Zeta"],
|
|
30767
|
+
[undefined, 3, "5.1", "Eta"],
|
|
30768
|
+
[undefined, 3, "5.2", "Theta"],
|
|
30769
|
+
[undefined, 2, "6", "Iota"],
|
|
30770
|
+
[undefined, 2, "7", "Kappa"]
|
|
30771
|
+
]);
|
|
30772
|
+
});
|
|
30773
|
+
});
|
|
30774
|
+
});
|
|
30775
|
+
|
|
30064
30776
|
//*********************************************************************************************
|
|
30065
30777
|
// Scenario: Show the first level of a recursive hierarchy ("Alpha", "Omega"), expand "Alpha".
|
|
30066
30778
|
// Maybe expand "Beta" and collapse it again. Move "Alpha" so that "Omega" becomes its parent,
|
|
@@ -30341,6 +31053,7 @@ sap.ui.define([
|
|
|
30341
31053
|
]);
|
|
30342
31054
|
const oBeta = oTable.getRows()[2].getBindingContext();
|
|
30343
31055
|
const oKappa = oTable.getRows()[3].getBindingContext();
|
|
31056
|
+
assert.strictEqual(oAlpha.getIndex(), 1);
|
|
30344
31057
|
|
|
30345
31058
|
const iBatchNo = this.iBatchNo + 1; // don't care about exact no., but use twice below
|
|
30346
31059
|
this.expectEvents(assert, "sap.ui.model.odata.v4.ODataListBinding: /EMPLOYEES", [
|
|
@@ -30390,6 +31103,7 @@ sap.ui.define([
|
|
|
30390
31103
|
[undefined, 4, "1.2", "1", "Zeta", 42],
|
|
30391
31104
|
[undefined, 3, "3", "0", "Lambda", 57]
|
|
30392
31105
|
]);
|
|
31106
|
+
assert.strictEqual(oKappa.getIndex(), 3);
|
|
30393
31107
|
|
|
30394
31108
|
// code under test
|
|
30395
31109
|
assert.strictEqual(oBeta.isAncestorOf(oKappa), true, "JIRA: CPOUI5ODATAV4-2337");
|
|
@@ -30405,6 +31119,722 @@ sap.ui.define([
|
|
|
30405
31119
|
});
|
|
30406
31120
|
});
|
|
30407
31121
|
|
|
31122
|
+
//*********************************************************************************************
|
|
31123
|
+
// Scenario: Expand all levels of a recursive hierarchy and move a node with descendants (not
|
|
31124
|
+
// yet fully loaded) to another parent. Although it is shown as the new parent's first child on
|
|
31125
|
+
// UI, it is actually inserted between older siblings on the server. Still, paging works!
|
|
31126
|
+
// Collapse the new parent and later its root to check that their "descendants" is correct.
|
|
31127
|
+
// A new root (Beth) is created with a new child (Gimel) and moved to Aleph, but their
|
|
31128
|
+
// LimitedRank does not change. Then Gimel is moved to Aleph, thus Beth becomes a leaf again.
|
|
31129
|
+
// Gimel is moved to collapsed Alpha, thus expanding it again. Expand "the new parent" (Eta, see
|
|
31130
|
+
// above) again. Delete all moved nodes again in a single $batch.
|
|
31131
|
+
// JIRA: CPOUI5ODATAV4-2360
|
|
31132
|
+
//
|
|
31133
|
+
// Before deletion, Beta is maybe is maybe moved to make it a root (JIRA: CPOUI5ODATAV4-2400)
|
|
31134
|
+
// Old vs. new format of RecursiveHierarchy annotation (JIRA: CPOUI5ODATAV4-2401)
|
|
31135
|
+
[false, true].forEach((bMakeRoot) => {
|
|
31136
|
+
["OldChart", "OrgChart"].forEach((sHierarchyQualifier) => {
|
|
31137
|
+
const sTitle = `Recursive Hierarchy: expand all and move for ${sHierarchyQualifier};
|
|
31138
|
+
make root = ${bMakeRoot}`;
|
|
31139
|
+
const sLimitedRank = sHierarchyQualifier === "OldChart" ? "LimitedRank" : "Limited_Rank";
|
|
31140
|
+
|
|
31141
|
+
QUnit.test(sTitle, async function (assert) {
|
|
31142
|
+
const oModel = this.createSpecialCasesModel({autoExpandSelect : true});
|
|
31143
|
+
const sFriend = "/Artists(ArtistID='99',IsActiveEntity=false)/_Friend";
|
|
31144
|
+
const sBaseUrl = sFriend.slice(1) + "?$apply=orderby(ArtistID)"
|
|
31145
|
+
+ "/com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root" + sFriend
|
|
31146
|
+
+ ",HierarchyQualifier='" + sHierarchyQualifier + "',NodeProperty='_/NodeID')";
|
|
31147
|
+
const sReadUrl = sBaseUrl + "&$select=ArtistID,IsActiveEntity,Name"
|
|
31148
|
+
+ ",_/DescendantCount,_/DistanceFromRoot,_/DrillState,_/NodeID";
|
|
31149
|
+
const sView = `
|
|
31150
|
+
<t:Table id="table" rows="{path : '/Artists(ArtistID=\\'99\\',IsActiveEntity=false)/_Friend',
|
|
31151
|
+
parameters : {
|
|
31152
|
+
$$aggregation : {
|
|
31153
|
+
expandTo : 1E16,
|
|
31154
|
+
hierarchyQualifier : '${sHierarchyQualifier}'
|
|
31155
|
+
},
|
|
31156
|
+
$orderby : 'ArtistID'
|
|
31157
|
+
}}" threshold="0" visibleRowCount="3">
|
|
31158
|
+
<Text text="{= %{@$ui5.node.isExpanded} }"/>
|
|
31159
|
+
<Text text="{= %{@$ui5.node.level} }"/>
|
|
31160
|
+
<Text text="{ArtistID}"/>
|
|
31161
|
+
<Text text="{Name}"/>
|
|
31162
|
+
</t:Table>`;
|
|
31163
|
+
|
|
31164
|
+
// 0 Alpha
|
|
31165
|
+
// 1 Beta (moved...)
|
|
31166
|
+
// 1.1 Gamma
|
|
31167
|
+
// 1.1.1 Delta (loaded later)
|
|
31168
|
+
// 1.1.2 Epsilon (loaded later)
|
|
31169
|
+
// 2 Zeta (loaded later)
|
|
31170
|
+
// 3 Eta (...to here)
|
|
31171
|
+
// 3.1 Theta
|
|
31172
|
+
// 3.2 Iota
|
|
31173
|
+
// 3.3 Kappa (loaded later)
|
|
31174
|
+
// 4 Lambda (loaded later)
|
|
31175
|
+
// 9 Aleph (loaded later)
|
|
31176
|
+
this.expectRequest(sReadUrl + "&$count=true&$skip=0&$top=3", {
|
|
31177
|
+
"@odata.count" : "12",
|
|
31178
|
+
value : [{
|
|
31179
|
+
ArtistID : "0",
|
|
31180
|
+
IsActiveEntity : false,
|
|
31181
|
+
Name : "Alpha",
|
|
31182
|
+
_ : {
|
|
31183
|
+
DescendantCount : "10",
|
|
31184
|
+
DistanceFromRoot : "0",
|
|
31185
|
+
DrillState : "expanded",
|
|
31186
|
+
NodeID : "0,false"
|
|
31187
|
+
}
|
|
31188
|
+
}, {
|
|
31189
|
+
ArtistID : "1",
|
|
31190
|
+
IsActiveEntity : false,
|
|
31191
|
+
Name : "Beta",
|
|
31192
|
+
_ : {
|
|
31193
|
+
DescendantCount : "3",
|
|
31194
|
+
DistanceFromRoot : "1",
|
|
31195
|
+
DrillState : "expanded",
|
|
31196
|
+
NodeID : "1,false"
|
|
31197
|
+
}
|
|
31198
|
+
}, {
|
|
31199
|
+
ArtistID : "1.1",
|
|
31200
|
+
IsActiveEntity : false,
|
|
31201
|
+
Name : "Gamma",
|
|
31202
|
+
_ : {
|
|
31203
|
+
DescendantCount : "2",
|
|
31204
|
+
DistanceFromRoot : "2",
|
|
31205
|
+
DrillState : "expanded",
|
|
31206
|
+
NodeID : "1.1,false"
|
|
31207
|
+
}
|
|
31208
|
+
}]
|
|
31209
|
+
});
|
|
31210
|
+
|
|
31211
|
+
await this.createView(assert, sView, oModel);
|
|
31212
|
+
|
|
31213
|
+
const oTable = this.oView.byId("table");
|
|
31214
|
+
checkTable("initial page", assert, oTable, [
|
|
31215
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
31216
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)",
|
|
31217
|
+
sFriend + "(ArtistID='1.1',IsActiveEntity=false)"
|
|
31218
|
+
], [
|
|
31219
|
+
[true, 1, "0", "Alpha"],
|
|
31220
|
+
[true, 2, "1", "Beta"],
|
|
31221
|
+
[true, 3, "1.1", "Gamma"]
|
|
31222
|
+
], 12);
|
|
31223
|
+
const oAlpha = oTable.getRows()[0].getBindingContext();
|
|
31224
|
+
let oBeta = oTable.getRows()[1].getBindingContext();
|
|
31225
|
+
const oListBinding = oAlpha.getBinding();
|
|
31226
|
+
assert.strictEqual(oBeta.getIndex(), 1);
|
|
31227
|
+
|
|
31228
|
+
this.expectRequest(sReadUrl + "&$skip=6&$top=3", {
|
|
31229
|
+
value : [{
|
|
31230
|
+
ArtistID : "3",
|
|
31231
|
+
IsActiveEntity : false,
|
|
31232
|
+
Name : "Eta",
|
|
31233
|
+
_ : {
|
|
31234
|
+
DescendantCount : "3",
|
|
31235
|
+
DistanceFromRoot : "1",
|
|
31236
|
+
DrillState : "expanded",
|
|
31237
|
+
NodeID : "3,false"
|
|
31238
|
+
}
|
|
31239
|
+
}, {
|
|
31240
|
+
ArtistID : "3.1",
|
|
31241
|
+
IsActiveEntity : false,
|
|
31242
|
+
Name : "Theta",
|
|
31243
|
+
_ : {
|
|
31244
|
+
DescendantCount : "0",
|
|
31245
|
+
DistanceFromRoot : "2",
|
|
31246
|
+
DrillState : "leaf",
|
|
31247
|
+
NodeID : "3.1,false"
|
|
31248
|
+
}
|
|
31249
|
+
}, {
|
|
31250
|
+
ArtistID : "3.2",
|
|
31251
|
+
IsActiveEntity : false,
|
|
31252
|
+
Name : "Iota",
|
|
31253
|
+
_ : {
|
|
31254
|
+
DescendantCount : "0",
|
|
31255
|
+
DistanceFromRoot : "2",
|
|
31256
|
+
DrillState : "leaf",
|
|
31257
|
+
NodeID : "3.2,false"
|
|
31258
|
+
}
|
|
31259
|
+
}]
|
|
31260
|
+
});
|
|
31261
|
+
|
|
31262
|
+
oTable.setFirstVisibleRow(6);
|
|
31263
|
+
|
|
31264
|
+
await this.waitForChanges(assert, "scroll down to Eta");
|
|
31265
|
+
|
|
31266
|
+
checkTable("after scroll down to Eta", assert, oTable, [
|
|
31267
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
31268
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)",
|
|
31269
|
+
sFriend + "(ArtistID='1.1',IsActiveEntity=false)",
|
|
31270
|
+
sFriend + "(ArtistID='3',IsActiveEntity=false)",
|
|
31271
|
+
sFriend + "(ArtistID='3.1',IsActiveEntity=false)",
|
|
31272
|
+
sFriend + "(ArtistID='3.2',IsActiveEntity=false)"
|
|
31273
|
+
], [
|
|
31274
|
+
[true, 2, "3", "Eta"],
|
|
31275
|
+
[undefined, 3, "3.1", "Theta"],
|
|
31276
|
+
[undefined, 3, "3.2", "Iota"]
|
|
31277
|
+
], 12);
|
|
31278
|
+
let oEta = oTable.getRows()[0].getBindingContext();
|
|
31279
|
+
|
|
31280
|
+
// 0 Alpha
|
|
31281
|
+
// 2 Zeta (loaded later)
|
|
31282
|
+
// 3 Eta (...to here)
|
|
31283
|
+
// 3.1 Theta
|
|
31284
|
+
// 3.2 Iota
|
|
31285
|
+
// 1 Beta (moved...)
|
|
31286
|
+
// 1.1 Gamma
|
|
31287
|
+
// 1.1.1 Delta (loaded later)
|
|
31288
|
+
// 1.1.2 Epsilon (loaded soon)
|
|
31289
|
+
// 3.3 Kappa (loaded later)
|
|
31290
|
+
// 4 Lambda (loaded later)
|
|
31291
|
+
// 9 Aleph (loaded later)
|
|
31292
|
+
this.expectRequest({
|
|
31293
|
+
batchNo : 3,
|
|
31294
|
+
headers : {
|
|
31295
|
+
Prefer : "return=minimal"
|
|
31296
|
+
},
|
|
31297
|
+
method : "PATCH",
|
|
31298
|
+
url : "Artists(ArtistID='1',IsActiveEntity=false)",
|
|
31299
|
+
payload : {
|
|
31300
|
+
"BestFriend@odata.bind" : "Artists(ArtistID='3',IsActiveEntity=false)"
|
|
31301
|
+
}
|
|
31302
|
+
}) // 204 No Content
|
|
31303
|
+
.expectRequest({
|
|
31304
|
+
batchNo : 3,
|
|
31305
|
+
url : sBaseUrl + "&$filter=ArtistID eq '1' and IsActiveEntity eq false"
|
|
31306
|
+
+ "&$select=_/" + sLimitedRank
|
|
31307
|
+
}, {
|
|
31308
|
+
value : [{
|
|
31309
|
+
_ : {
|
|
31310
|
+
[sLimitedRank] : "5" // Edm.Int64
|
|
31311
|
+
}
|
|
31312
|
+
}]
|
|
31313
|
+
})
|
|
31314
|
+
.expectRequest({
|
|
31315
|
+
batchNo : 4,
|
|
31316
|
+
url : sReadUrl + "&$skip=8&$top=1"
|
|
31317
|
+
}, {
|
|
31318
|
+
value : [{
|
|
31319
|
+
ArtistID : "1.1.2",
|
|
31320
|
+
IsActiveEntity : false,
|
|
31321
|
+
Name : "Epsilon",
|
|
31322
|
+
_ : {
|
|
31323
|
+
DescendantCount : "0",
|
|
31324
|
+
DistanceFromRoot : "4",
|
|
31325
|
+
DrillState : "leaf",
|
|
31326
|
+
NodeID : "1.1.2,false"
|
|
31327
|
+
}
|
|
31328
|
+
}]
|
|
31329
|
+
});
|
|
31330
|
+
|
|
31331
|
+
await Promise.all([
|
|
31332
|
+
// code under test
|
|
31333
|
+
oBeta.move({parent : oEta}),
|
|
31334
|
+
resolveLater(undefined, 5), // table update takes a moment
|
|
31335
|
+
this.waitForChanges(assert, "move")
|
|
31336
|
+
]);
|
|
31337
|
+
|
|
31338
|
+
checkTable("after move", assert, oTable, [
|
|
31339
|
+
sFriend + "(ArtistID='0',IsActiveEntity=false)",
|
|
31340
|
+
sFriend + "(ArtistID='3',IsActiveEntity=false)",
|
|
31341
|
+
sFriend + "(ArtistID='1',IsActiveEntity=false)",
|
|
31342
|
+
sFriend + "(ArtistID='1.1',IsActiveEntity=false)",
|
|
31343
|
+
sFriend + "(ArtistID='1.1.2',IsActiveEntity=false)",
|
|
31344
|
+
sFriend + "(ArtistID='3.1',IsActiveEntity=false)",
|
|
31345
|
+
sFriend + "(ArtistID='3.2',IsActiveEntity=false)"
|
|
31346
|
+
], [
|
|
31347
|
+
[undefined, 5, "1.1.2", "Epsilon"],
|
|
31348
|
+
[undefined, 3, "3.1", "Theta"], // Note: on UI, Beta is shown as 1st child of Eta!
|
|
31349
|
+
[undefined, 3, "3.2", "Iota"]
|
|
31350
|
+
], 12);
|
|
31351
|
+
|
|
31352
|
+
assert.strictEqual(oBeta.isTransient(), undefined, "unchanged");
|
|
31353
|
+
assert.strictEqual(oBeta.created(), undefined);
|
|
31354
|
+
assert.deepEqual(oBeta.getObject(), {
|
|
31355
|
+
// no "@$ui5.context.isTransient"!
|
|
31356
|
+
"@$ui5.node.isExpanded" : true,
|
|
31357
|
+
"@$ui5.node.level" : 3,
|
|
31358
|
+
ArtistID : "1",
|
|
31359
|
+
IsActiveEntity : false,
|
|
31360
|
+
Name : "Beta",
|
|
31361
|
+
_ : {
|
|
31362
|
+
NodeID : "1,false"
|
|
31363
|
+
}
|
|
31364
|
+
});
|
|
31365
|
+
// Note: #checkAllContexts below will check #getIndex for all nodes
|
|
31366
|
+
|
|
31367
|
+
this.expectRequest(sReadUrl + "&$skip=1&$top=1", {
|
|
31368
|
+
value : [{
|
|
31369
|
+
ArtistID : "2",
|
|
31370
|
+
IsActiveEntity : false,
|
|
31371
|
+
Name : "Zeta",
|
|
31372
|
+
_ : {
|
|
31373
|
+
DescendantCount : "0",
|
|
31374
|
+
DistanceFromRoot : "1",
|
|
31375
|
+
DrillState : "leaf",
|
|
31376
|
+
NodeID : "2,false"
|
|
31377
|
+
}
|
|
31378
|
+
}]
|
|
31379
|
+
})
|
|
31380
|
+
.expectRequest(sReadUrl + "&$skip=7&$top=1", {
|
|
31381
|
+
value : [{
|
|
31382
|
+
ArtistID : "1.1.1",
|
|
31383
|
+
IsActiveEntity : false,
|
|
31384
|
+
Name : "Delta",
|
|
31385
|
+
_ : {
|
|
31386
|
+
DescendantCount : "0",
|
|
31387
|
+
DistanceFromRoot : "4",
|
|
31388
|
+
DrillState : "leaf",
|
|
31389
|
+
NodeID : "1.1.1,false"
|
|
31390
|
+
}
|
|
31391
|
+
}]
|
|
31392
|
+
})
|
|
31393
|
+
.expectRequest(sReadUrl + "&$skip=9&$top=3", {
|
|
31394
|
+
value : [{
|
|
31395
|
+
ArtistID : "3.3",
|
|
31396
|
+
IsActiveEntity : false,
|
|
31397
|
+
Name : "Kappa",
|
|
31398
|
+
_ : {
|
|
31399
|
+
DescendantCount : "0",
|
|
31400
|
+
DistanceFromRoot : "2",
|
|
31401
|
+
DrillState : "leaf",
|
|
31402
|
+
NodeID : "3.3,false"
|
|
31403
|
+
}
|
|
31404
|
+
}, {
|
|
31405
|
+
ArtistID : "4",
|
|
31406
|
+
IsActiveEntity : false,
|
|
31407
|
+
Name : "Lambda",
|
|
31408
|
+
_ : {
|
|
31409
|
+
DescendantCount : "0",
|
|
31410
|
+
DistanceFromRoot : "1",
|
|
31411
|
+
DrillState : "leaf",
|
|
31412
|
+
NodeID : "4,false"
|
|
31413
|
+
}
|
|
31414
|
+
}, {
|
|
31415
|
+
ArtistID : "9",
|
|
31416
|
+
IsActiveEntity : false,
|
|
31417
|
+
Name : "Aleph",
|
|
31418
|
+
_ : {
|
|
31419
|
+
DescendantCount : "0",
|
|
31420
|
+
DistanceFromRoot : "0",
|
|
31421
|
+
DrillState : "leaf",
|
|
31422
|
+
NodeID : "9,false"
|
|
31423
|
+
}
|
|
31424
|
+
}]
|
|
31425
|
+
});
|
|
31426
|
+
|
|
31427
|
+
await this.checkAllContexts("after move", assert, oListBinding,
|
|
31428
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31429
|
+
[true, 1, "0", "Alpha"],
|
|
31430
|
+
[undefined, 2, "2", "Zeta"],
|
|
31431
|
+
[true, 2, "3", "Eta"],
|
|
31432
|
+
[true, 3, "1", "Beta"],
|
|
31433
|
+
[true, 4, "1.1", "Gamma"],
|
|
31434
|
+
[undefined, 5, "1.1.1", "Delta"],
|
|
31435
|
+
[undefined, 5, "1.1.2", "Epsilon"],
|
|
31436
|
+
[undefined, 3, "3.1", "Theta"], // Note: on UI, Beta is shown as 1st child of Eta!
|
|
31437
|
+
[undefined, 3, "3.2", "Iota"],
|
|
31438
|
+
[undefined, 3, "3.3", "Kappa"],
|
|
31439
|
+
[undefined, 2, "4", "Lambda"],
|
|
31440
|
+
[undefined, 1, "9", "Aleph"]
|
|
31441
|
+
]);
|
|
31442
|
+
|
|
31443
|
+
// code under test
|
|
31444
|
+
oEta.collapse(); // Note: this eventually destroys oBeta!
|
|
31445
|
+
oBeta = null;
|
|
31446
|
+
|
|
31447
|
+
await this.checkAllContexts("after collapse Eta", assert, oListBinding,
|
|
31448
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31449
|
+
[true, 1, "0", "Alpha"],
|
|
31450
|
+
[undefined, 2, "2", "Zeta"],
|
|
31451
|
+
[false, 2, "3", "Eta"],
|
|
31452
|
+
[undefined, 2, "4", "Lambda"],
|
|
31453
|
+
[undefined, 1, "9", "Aleph"]
|
|
31454
|
+
]);
|
|
31455
|
+
|
|
31456
|
+
// code under test
|
|
31457
|
+
oAlpha.collapse(); // Note: this eventually destroys oEta!
|
|
31458
|
+
oEta = null;
|
|
31459
|
+
|
|
31460
|
+
await this.checkAllContexts("after collapse Alpha", assert, oListBinding,
|
|
31461
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31462
|
+
[false, 1, "0", "Alpha"],
|
|
31463
|
+
[undefined, 1, "9", "Aleph"]
|
|
31464
|
+
]);
|
|
31465
|
+
|
|
31466
|
+
// 0 Alpha
|
|
31467
|
+
// 2 Zeta
|
|
31468
|
+
// 3 Eta
|
|
31469
|
+
// 3.1 Theta
|
|
31470
|
+
// 3.2 Iota
|
|
31471
|
+
// 1 Beta
|
|
31472
|
+
// 1.1 Gamma
|
|
31473
|
+
// 1.1.1 Delta
|
|
31474
|
+
// 1.1.2 Epsilon
|
|
31475
|
+
// 3.3 Kappa
|
|
31476
|
+
// 4 Lambda
|
|
31477
|
+
// 9 Aleph
|
|
31478
|
+
// 10 Beth (now created as root and later moved beneath Aleph)
|
|
31479
|
+
// 10.1 Gimel (then created as child)
|
|
31480
|
+
this.expectRequest({
|
|
31481
|
+
method : "POST",
|
|
31482
|
+
url : sFriend.slice(1),
|
|
31483
|
+
payload : {
|
|
31484
|
+
// not needed: "BestFriend@odata.bind" : null,
|
|
31485
|
+
Name : "Beth"
|
|
31486
|
+
}
|
|
31487
|
+
}, {
|
|
31488
|
+
ArtistID : "10",
|
|
31489
|
+
IsActiveEntity : false,
|
|
31490
|
+
Name : "Beth"
|
|
31491
|
+
})
|
|
31492
|
+
.expectRequest(sBaseUrl + "&$filter=ArtistID eq '10' and IsActiveEntity eq false"
|
|
31493
|
+
+ "&$select=_/" + sLimitedRank, {
|
|
31494
|
+
value : [{
|
|
31495
|
+
_ : {
|
|
31496
|
+
[sLimitedRank] : "12" // Edm.Int64
|
|
31497
|
+
}
|
|
31498
|
+
}]
|
|
31499
|
+
});
|
|
31500
|
+
|
|
31501
|
+
// code under test
|
|
31502
|
+
const oBeth = oAlpha.getBinding().create({Name : "Beth"}, /*bSkipRefresh*/true);
|
|
31503
|
+
const oBethCreated = oBeth.created();
|
|
31504
|
+
|
|
31505
|
+
assert.strictEqual(oBeth.isTransient(), true);
|
|
31506
|
+
assert.ok(oBeth.created() instanceof Promise);
|
|
31507
|
+
assert.strictEqual(oBeth.getIndex(), 0);
|
|
31508
|
+
|
|
31509
|
+
await Promise.all([
|
|
31510
|
+
oBethCreated,
|
|
31511
|
+
this.waitForChanges(assert, "create new root Beth")
|
|
31512
|
+
]);
|
|
31513
|
+
|
|
31514
|
+
await this.checkAllContexts("after create new root Beth", assert, oListBinding,
|
|
31515
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31516
|
+
[undefined, 1, "10", "Beth"],
|
|
31517
|
+
[false, 1, "0", "Alpha"],
|
|
31518
|
+
[undefined, 1, "9", "Aleph"]
|
|
31519
|
+
]);
|
|
31520
|
+
|
|
31521
|
+
const oAleph = oTable.getRows()[2].getBindingContext();
|
|
31522
|
+
checkCreatedPersisted(assert, oBeth, oBethCreated);
|
|
31523
|
+
|
|
31524
|
+
this.expectRequest({
|
|
31525
|
+
method : "POST",
|
|
31526
|
+
url : sFriend.slice(1),
|
|
31527
|
+
payload : {
|
|
31528
|
+
"BestFriend@odata.bind" : "../Artists(ArtistID='10',IsActiveEntity=false)",
|
|
31529
|
+
Name : "Gimel"
|
|
31530
|
+
}
|
|
31531
|
+
}, {
|
|
31532
|
+
ArtistID : "10.1",
|
|
31533
|
+
IsActiveEntity : false,
|
|
31534
|
+
Name : "Gimel"
|
|
31535
|
+
})
|
|
31536
|
+
.expectRequest(sBaseUrl + "&$filter=ArtistID eq '10.1' and IsActiveEntity eq false"
|
|
31537
|
+
+ "&$select=_/" + sLimitedRank, {
|
|
31538
|
+
value : [{
|
|
31539
|
+
_ : {
|
|
31540
|
+
[sLimitedRank] : "13" // Edm.Int64
|
|
31541
|
+
}
|
|
31542
|
+
}]
|
|
31543
|
+
});
|
|
31544
|
+
|
|
31545
|
+
// code under test
|
|
31546
|
+
const oGimel = oBeth.getBinding().create({
|
|
31547
|
+
"@$ui5.node.parent" : oBeth,
|
|
31548
|
+
Name : "Gimel"
|
|
31549
|
+
}, /*bSkipRefresh*/true);
|
|
31550
|
+
const oGimelCreated = oGimel.created();
|
|
31551
|
+
|
|
31552
|
+
assert.strictEqual(oGimel.getIndex(), 1);
|
|
31553
|
+
assert.strictEqual(oBeth.getProperty("@$ui5.node.isExpanded"), true, "not a leaf anymore");
|
|
31554
|
+
|
|
31555
|
+
await Promise.all([
|
|
31556
|
+
oGimelCreated,
|
|
31557
|
+
this.waitForChanges(assert, "create new child Gimel")
|
|
31558
|
+
]);
|
|
31559
|
+
|
|
31560
|
+
await this.checkAllContexts("after create new child Gimel", assert, oListBinding,
|
|
31561
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31562
|
+
[true, 1, "10", "Beth"],
|
|
31563
|
+
[undefined, 2, "10.1", "Gimel"],
|
|
31564
|
+
[false, 1, "0", "Alpha"],
|
|
31565
|
+
[undefined, 1, "9", "Aleph"]
|
|
31566
|
+
]);
|
|
31567
|
+
|
|
31568
|
+
checkCreatedPersisted(assert, oGimel, oGimelCreated);
|
|
31569
|
+
|
|
31570
|
+
// 0 Alpha
|
|
31571
|
+
// 2 Zeta
|
|
31572
|
+
// 3 Eta
|
|
31573
|
+
// 3.1 Theta
|
|
31574
|
+
// 3.2 Iota
|
|
31575
|
+
// 1 Beta
|
|
31576
|
+
// 1.1 Gamma
|
|
31577
|
+
// 1.1.1 Delta
|
|
31578
|
+
// 1.1.2 Epsilon
|
|
31579
|
+
// 3.3 Kappa
|
|
31580
|
+
// 4 Lambda
|
|
31581
|
+
// 9 Aleph
|
|
31582
|
+
// 10 Beth (now moved beneath Aleph)
|
|
31583
|
+
// 10.1 Gimel
|
|
31584
|
+
this.expectRequest({
|
|
31585
|
+
batchNo : 10,
|
|
31586
|
+
headers : {
|
|
31587
|
+
Prefer : "return=minimal"
|
|
31588
|
+
},
|
|
31589
|
+
method : "PATCH",
|
|
31590
|
+
url : "Artists(ArtistID='10',IsActiveEntity=false)",
|
|
31591
|
+
payload : {
|
|
31592
|
+
"BestFriend@odata.bind" : "Artists(ArtistID='9',IsActiveEntity=false)"
|
|
31593
|
+
}
|
|
31594
|
+
}) // 204 No Content
|
|
31595
|
+
.expectRequest({
|
|
31596
|
+
batchNo : 10,
|
|
31597
|
+
url : sBaseUrl + "&$filter=ArtistID eq '10' and IsActiveEntity eq false"
|
|
31598
|
+
+ "&$select=_/" + sLimitedRank
|
|
31599
|
+
}, {
|
|
31600
|
+
value : [{
|
|
31601
|
+
_ : { // Note: rank has not changed due to move
|
|
31602
|
+
[sLimitedRank] : "12" // Edm.Int64
|
|
31603
|
+
}
|
|
31604
|
+
}]
|
|
31605
|
+
});
|
|
31606
|
+
|
|
31607
|
+
await Promise.all([
|
|
31608
|
+
// code under test
|
|
31609
|
+
oBeth.move({parent : oAleph}),
|
|
31610
|
+
this.waitForChanges(assert, "move Beth to Aleph")
|
|
31611
|
+
]);
|
|
31612
|
+
|
|
31613
|
+
// Note: #checkAllContexts will check #getIndex for all nodes
|
|
31614
|
+
await this.checkAllContexts("after move Beth to Aleph", assert, oListBinding,
|
|
31615
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31616
|
+
[false, 1, "0", "Alpha"],
|
|
31617
|
+
[true, 1, "9", "Aleph"],
|
|
31618
|
+
[true, 2, "10", "Beth"],
|
|
31619
|
+
[undefined, 3, "10.1", "Gimel"]
|
|
31620
|
+
]);
|
|
31621
|
+
|
|
31622
|
+
checkCreatedPersisted(assert, oBeth, oBethCreated);
|
|
31623
|
+
checkCreatedPersisted(assert, oGimel, oGimelCreated);
|
|
31624
|
+
|
|
31625
|
+
this.expectRequest({
|
|
31626
|
+
batchNo : 11,
|
|
31627
|
+
headers : {
|
|
31628
|
+
Prefer : "return=minimal"
|
|
31629
|
+
},
|
|
31630
|
+
method : "PATCH",
|
|
31631
|
+
url : "Artists(ArtistID='10.1',IsActiveEntity=false)",
|
|
31632
|
+
payload : {
|
|
31633
|
+
"BestFriend@odata.bind" : "Artists(ArtistID='9',IsActiveEntity=false)"
|
|
31634
|
+
}
|
|
31635
|
+
}) // 204 No Content
|
|
31636
|
+
.expectRequest({
|
|
31637
|
+
batchNo : 11,
|
|
31638
|
+
url : sBaseUrl + "&$filter=ArtistID eq '10.1' and IsActiveEntity eq false"
|
|
31639
|
+
+ "&$select=_/" + sLimitedRank
|
|
31640
|
+
}, {
|
|
31641
|
+
value : [{
|
|
31642
|
+
_ : { // Note: rank has not changed due to move
|
|
31643
|
+
[sLimitedRank] : "13" // Edm.Int64
|
|
31644
|
+
}
|
|
31645
|
+
}]
|
|
31646
|
+
});
|
|
31647
|
+
|
|
31648
|
+
await Promise.all([
|
|
31649
|
+
// code under test
|
|
31650
|
+
oGimel.move({parent : oAleph}),
|
|
31651
|
+
this.waitForChanges(assert, "move Gimel to Aleph")
|
|
31652
|
+
]);
|
|
31653
|
+
|
|
31654
|
+
// Note: #checkAllContexts will check #getIndex for all nodes
|
|
31655
|
+
await this.checkAllContexts("after move Gimel to Aleph", assert, oListBinding,
|
|
31656
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31657
|
+
[false, 1, "0", "Alpha"],
|
|
31658
|
+
[true, 1, "9", "Aleph"],
|
|
31659
|
+
[undefined, 2, "10.1", "Gimel"],
|
|
31660
|
+
[undefined, 2, "10", "Beth"] // last child has gone
|
|
31661
|
+
]);
|
|
31662
|
+
|
|
31663
|
+
checkCreatedPersisted(assert, oBeth, oBethCreated);
|
|
31664
|
+
checkCreatedPersisted(assert, oGimel, oGimelCreated);
|
|
31665
|
+
|
|
31666
|
+
// 0 Alpha
|
|
31667
|
+
// 10.1 Gimel (moved to here)
|
|
31668
|
+
// 2 Zeta
|
|
31669
|
+
// 3 Eta (still collapsed)
|
|
31670
|
+
// 3.1 Theta
|
|
31671
|
+
// 3.2 Iota
|
|
31672
|
+
// 1 Beta
|
|
31673
|
+
// 1.1 Gamma
|
|
31674
|
+
// 1.1.1 Delta
|
|
31675
|
+
// 1.1.2 Epsilon
|
|
31676
|
+
// 3.3 Kappa
|
|
31677
|
+
// 4 Lambda
|
|
31678
|
+
// 9 Aleph
|
|
31679
|
+
// 10 Beth
|
|
31680
|
+
this.expectRequest({
|
|
31681
|
+
batchNo : 12,
|
|
31682
|
+
headers : {
|
|
31683
|
+
Prefer : "return=minimal"
|
|
31684
|
+
},
|
|
31685
|
+
method : "PATCH",
|
|
31686
|
+
url : "Artists(ArtistID='10.1',IsActiveEntity=false)",
|
|
31687
|
+
payload : {
|
|
31688
|
+
"BestFriend@odata.bind" : "Artists(ArtistID='0',IsActiveEntity=false)"
|
|
31689
|
+
}
|
|
31690
|
+
}) // 204 No Content
|
|
31691
|
+
.expectRequest({
|
|
31692
|
+
batchNo : 12,
|
|
31693
|
+
url : sBaseUrl + "&$filter=ArtistID eq '10.1' and IsActiveEntity eq false"
|
|
31694
|
+
+ "&$select=_/" + sLimitedRank
|
|
31695
|
+
}, {
|
|
31696
|
+
value : [{
|
|
31697
|
+
_ : { // Note: same rank on UI as on server
|
|
31698
|
+
[sLimitedRank] : "1" // Edm.Int64
|
|
31699
|
+
}
|
|
31700
|
+
}]
|
|
31701
|
+
});
|
|
31702
|
+
|
|
31703
|
+
await Promise.all([
|
|
31704
|
+
// code under test
|
|
31705
|
+
oGimel.move({parent : oAlpha}),
|
|
31706
|
+
this.waitForChanges(assert, "move Gimel to collapsed Alpha")
|
|
31707
|
+
]);
|
|
31708
|
+
|
|
31709
|
+
// Note: #checkAllContexts will check #getIndex for all nodes
|
|
31710
|
+
await this.checkAllContexts("after move Gimel to collapsed Alpha", assert, oListBinding,
|
|
31711
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31712
|
+
[true, 1, "0", "Alpha"], // auto-expanded
|
|
31713
|
+
[undefined, 2, "10.1", "Gimel"],
|
|
31714
|
+
[undefined, 2, "2", "Zeta"],
|
|
31715
|
+
[false, 2, "3", "Eta"], // still collapsed
|
|
31716
|
+
[undefined, 2, "4", "Lambda"],
|
|
31717
|
+
[true, 1, "9", "Aleph"],
|
|
31718
|
+
[undefined, 2, "10", "Beth"]
|
|
31719
|
+
]);
|
|
31720
|
+
|
|
31721
|
+
oEta = oListBinding.getAllCurrentContexts()[3];
|
|
31722
|
+
|
|
31723
|
+
// code under test
|
|
31724
|
+
oEta.expand();
|
|
31725
|
+
|
|
31726
|
+
await this.checkAllContexts("after expand all again", assert, oListBinding,
|
|
31727
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31728
|
+
[true, 1, "0", "Alpha"],
|
|
31729
|
+
[undefined, 2, "10.1", "Gimel"],
|
|
31730
|
+
[undefined, 2, "2", "Zeta"],
|
|
31731
|
+
[true, 2, "3", "Eta"],
|
|
31732
|
+
[true, 3, "1", "Beta"],
|
|
31733
|
+
[true, 4, "1.1", "Gamma"],
|
|
31734
|
+
[undefined, 5, "1.1.1", "Delta"],
|
|
31735
|
+
[undefined, 5, "1.1.2", "Epsilon"],
|
|
31736
|
+
[undefined, 3, "3.1", "Theta"],
|
|
31737
|
+
[undefined, 3, "3.2", "Iota"],
|
|
31738
|
+
[undefined, 3, "3.3", "Kappa"],
|
|
31739
|
+
[undefined, 2, "4", "Lambda"],
|
|
31740
|
+
[true, 1, "9", "Aleph"],
|
|
31741
|
+
[undefined, 2, "10", "Beth"]
|
|
31742
|
+
]);
|
|
31743
|
+
|
|
31744
|
+
oBeta = oListBinding.getAllCurrentContexts()[4];
|
|
31745
|
+
|
|
31746
|
+
if (bMakeRoot) {
|
|
31747
|
+
this.expectRequest({
|
|
31748
|
+
batchNo : 13,
|
|
31749
|
+
headers : {
|
|
31750
|
+
Prefer : "return=minimal"
|
|
31751
|
+
},
|
|
31752
|
+
method : "PATCH",
|
|
31753
|
+
url : "Artists(ArtistID='1',IsActiveEntity=false)",
|
|
31754
|
+
payload : {
|
|
31755
|
+
"BestFriend@odata.bind" : null
|
|
31756
|
+
}
|
|
31757
|
+
}) // 204 No Content
|
|
31758
|
+
.expectRequest({
|
|
31759
|
+
batchNo : 13,
|
|
31760
|
+
url : sBaseUrl + "&$filter=ArtistID eq '1' and IsActiveEntity eq false"
|
|
31761
|
+
+ "&$select=_/" + sLimitedRank
|
|
31762
|
+
}, {
|
|
31763
|
+
value : [{
|
|
31764
|
+
_ : { // Note: 0, 8, or 10
|
|
31765
|
+
[sLimitedRank] : "0" // Edm.Int64
|
|
31766
|
+
}
|
|
31767
|
+
}]
|
|
31768
|
+
});
|
|
31769
|
+
|
|
31770
|
+
await Promise.all([
|
|
31771
|
+
// code under test
|
|
31772
|
+
oBeta.move(),
|
|
31773
|
+
this.waitForChanges(assert, "move Beta to make it a root node")
|
|
31774
|
+
]);
|
|
31775
|
+
|
|
31776
|
+
await this.checkAllContexts("after move Beta to make it a root node", assert,
|
|
31777
|
+
oListBinding,
|
|
31778
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31779
|
+
[true, 1, "1", "Beta"],
|
|
31780
|
+
[true, 2, "1.1", "Gamma"],
|
|
31781
|
+
[undefined, 3, "1.1.1", "Delta"],
|
|
31782
|
+
[undefined, 3, "1.1.2", "Epsilon"],
|
|
31783
|
+
[true, 1, "0", "Alpha"],
|
|
31784
|
+
[undefined, 2, "10.1", "Gimel"],
|
|
31785
|
+
[undefined, 2, "2", "Zeta"],
|
|
31786
|
+
[true, 2, "3", "Eta"],
|
|
31787
|
+
[undefined, 3, "3.1", "Theta"],
|
|
31788
|
+
[undefined, 3, "3.2", "Iota"],
|
|
31789
|
+
[undefined, 3, "3.3", "Kappa"],
|
|
31790
|
+
[undefined, 2, "4", "Lambda"],
|
|
31791
|
+
[true, 1, "9", "Aleph"],
|
|
31792
|
+
[undefined, 2, "10", "Beth"]
|
|
31793
|
+
]);
|
|
31794
|
+
}
|
|
31795
|
+
|
|
31796
|
+
const iBatchNo = this.iBatchNo + 1; // don't care about exact no., but use thrice below
|
|
31797
|
+
this.expectRequest({
|
|
31798
|
+
batchNo : iBatchNo,
|
|
31799
|
+
method : "DELETE",
|
|
31800
|
+
url : "Artists(ArtistID='1',IsActiveEntity=false)"
|
|
31801
|
+
})
|
|
31802
|
+
.expectRequest({
|
|
31803
|
+
batchNo : iBatchNo,
|
|
31804
|
+
method : "DELETE",
|
|
31805
|
+
url : "Artists(ArtistID='10',IsActiveEntity=false)"
|
|
31806
|
+
})
|
|
31807
|
+
.expectRequest({
|
|
31808
|
+
batchNo : iBatchNo,
|
|
31809
|
+
method : "DELETE",
|
|
31810
|
+
url : "Artists(ArtistID='10.1',IsActiveEntity=false)"
|
|
31811
|
+
});
|
|
31812
|
+
|
|
31813
|
+
await Promise.all([
|
|
31814
|
+
// code under test
|
|
31815
|
+
oBeta.delete(),
|
|
31816
|
+
// code under test
|
|
31817
|
+
oBeth.delete(),
|
|
31818
|
+
// code under test
|
|
31819
|
+
oGimel.delete(),
|
|
31820
|
+
this.waitForChanges(assert, "delete all moved")
|
|
31821
|
+
]);
|
|
31822
|
+
|
|
31823
|
+
await this.checkAllContexts("after delete all moved", assert, oListBinding,
|
|
31824
|
+
["@$ui5.node.isExpanded", "@$ui5.node.level", "ArtistID", "Name"], [
|
|
31825
|
+
[true, 1, "0", "Alpha"],
|
|
31826
|
+
[undefined, 2, "2", "Zeta"],
|
|
31827
|
+
[true, 2, "3", "Eta"],
|
|
31828
|
+
[undefined, 3, "3.1", "Theta"],
|
|
31829
|
+
[undefined, 3, "3.2", "Iota"],
|
|
31830
|
+
[undefined, 3, "3.3", "Kappa"],
|
|
31831
|
+
[undefined, 2, "4", "Lambda"],
|
|
31832
|
+
[undefined, 1, "9", "Aleph"]
|
|
31833
|
+
]);
|
|
31834
|
+
});
|
|
31835
|
+
});
|
|
31836
|
+
});
|
|
31837
|
+
|
|
30408
31838
|
//*********************************************************************************************
|
|
30409
31839
|
// Scenario: Show the first level of a recursive hierarchy ("Alpha", "Omega"), expand "Alpha".
|
|
30410
31840
|
// Scroll to "Delta". Request side effects for the list binding. The parent node will not
|
|
@@ -30412,7 +31842,8 @@ sap.ui.define([
|
|
|
30412
31842
|
// Determine the parent node of "Delta" with #getParent. It is not available at the moment.
|
|
30413
31843
|
// Try to request the parent node of "Alpha" and "Delta".
|
|
30414
31844
|
// JIRA: CPOUI5ODATAV4-2342
|
|
30415
|
-
QUnit.test("
|
|
31845
|
+
QUnit.test("Recursive Hierarchy: getParent/requestParent after requestSideEffects",
|
|
31846
|
+
async function (assert) {
|
|
30416
31847
|
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
30417
31848
|
const sView = `
|
|
30418
31849
|
<t:Table id="table" rows="{path : '/EMPLOYEES',
|
|
@@ -30587,6 +32018,164 @@ sap.ui.define([
|
|
|
30587
32018
|
], 6);
|
|
30588
32019
|
});
|
|
30589
32020
|
|
|
32021
|
+
//*********************************************************************************************
|
|
32022
|
+
// Scenario: Determine the parent of a node in a hierarchy where a preceding sibling is not
|
|
32023
|
+
// yet loaded, but the parent is found. Determine the parent of a node where the parent is not
|
|
32024
|
+
// yet loaded and request this parent.
|
|
32025
|
+
// JIRA: CPOUI5ODATAV4-2378
|
|
32026
|
+
QUnit.test("Recursive Hierarchy: getParent/requestParent with expandTo > 1",
|
|
32027
|
+
async function (assert) {
|
|
32028
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
32029
|
+
const sView = `
|
|
32030
|
+
<t:Table id="table" rows="{path : '/EMPLOYEES',
|
|
32031
|
+
parameters : {
|
|
32032
|
+
$$aggregation : {
|
|
32033
|
+
expandTo : 3,
|
|
32034
|
+
hierarchyQualifier : 'OrgChart'}
|
|
32035
|
+
}}" threshold="0" visibleRowCount="2">
|
|
32036
|
+
<Text text="{= %{@$ui5.node.isExpanded} }"/>
|
|
32037
|
+
<Text text="{= %{@$ui5.node.level} }"/>
|
|
32038
|
+
<Text text="{ID}"/>
|
|
32039
|
+
<Text text="{Name}"/>
|
|
32040
|
+
</t:Table>`;
|
|
32041
|
+
|
|
32042
|
+
// 0 Alpha
|
|
32043
|
+
// 1 Beta
|
|
32044
|
+
// 2 Gamma // not loaded
|
|
32045
|
+
// 3 Delta
|
|
32046
|
+
// 4 Epsilon
|
|
32047
|
+
// 5 Zeta // not loaded
|
|
32048
|
+
// 6 Eta
|
|
32049
|
+
// 7 Theta
|
|
32050
|
+
|
|
32051
|
+
this.expectRequest("EMPLOYEES?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
32052
|
+
+ "HierarchyNodes=$root/EMPLOYEES,HierarchyQualifier='OrgChart'"
|
|
32053
|
+
+ ",NodeProperty='ID',Levels=3)"
|
|
32054
|
+
+ "&$select=DescendantCount,DistanceFromRoot,DrillState,ID,Name"
|
|
32055
|
+
+ "&$count=true&$skip=0&$top=2", {
|
|
32056
|
+
"@odata.count" : "8",
|
|
32057
|
+
value : [{
|
|
32058
|
+
DescendantCount : "7",
|
|
32059
|
+
DistanceFromRoot : "0",
|
|
32060
|
+
DrillState : "expanded",
|
|
32061
|
+
ID : "0",
|
|
32062
|
+
Name : "Alpha"
|
|
32063
|
+
}, {
|
|
32064
|
+
DescendantCount : "3",
|
|
32065
|
+
DistanceFromRoot : "1",
|
|
32066
|
+
DrillState : "expanded",
|
|
32067
|
+
ID : "1",
|
|
32068
|
+
Name : "Beta"
|
|
32069
|
+
}]
|
|
32070
|
+
});
|
|
32071
|
+
|
|
32072
|
+
await this.createView(assert, sView, oModel);
|
|
32073
|
+
|
|
32074
|
+
const oTable = this.oView.byId("table");
|
|
32075
|
+
checkTable("initial page", assert, oTable, [
|
|
32076
|
+
"/EMPLOYEES('0')",
|
|
32077
|
+
"/EMPLOYEES('1')"
|
|
32078
|
+
], [
|
|
32079
|
+
[true, 1, "0", "Alpha"],
|
|
32080
|
+
[true, 2, "1", "Beta"]
|
|
32081
|
+
], 8);
|
|
32082
|
+
const oBeta = oTable.getRows()[1].getBindingContext();
|
|
32083
|
+
|
|
32084
|
+
this.expectRequest("EMPLOYEES?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
32085
|
+
+ "HierarchyNodes=$root/EMPLOYEES,HierarchyQualifier='OrgChart'"
|
|
32086
|
+
+ ",NodeProperty='ID',Levels=3)"
|
|
32087
|
+
+ "&$select=DescendantCount,DistanceFromRoot,DrillState,ID,Name"
|
|
32088
|
+
+ "&$skip=3&$top=2", {
|
|
32089
|
+
value : [{
|
|
32090
|
+
DescendantCount : "0",
|
|
32091
|
+
DistanceFromRoot : "2",
|
|
32092
|
+
DrillState : "leaf",
|
|
32093
|
+
ID : "3",
|
|
32094
|
+
Name : "Delta"
|
|
32095
|
+
}, {
|
|
32096
|
+
DescendantCount : "0",
|
|
32097
|
+
DistanceFromRoot : "2",
|
|
32098
|
+
DrillState : "leaf",
|
|
32099
|
+
ID : "4",
|
|
32100
|
+
Name : "Epsilon"
|
|
32101
|
+
}]
|
|
32102
|
+
});
|
|
32103
|
+
|
|
32104
|
+
oTable.setFirstVisibleRow(3);
|
|
32105
|
+
|
|
32106
|
+
await this.waitForChanges(assert, "scroll to 3 (Delta)");
|
|
32107
|
+
|
|
32108
|
+
checkTable("after scroll to 3 (Delta)", assert, oTable, [
|
|
32109
|
+
"/EMPLOYEES('0')",
|
|
32110
|
+
"/EMPLOYEES('1')",
|
|
32111
|
+
"/EMPLOYEES('3')",
|
|
32112
|
+
"/EMPLOYEES('4')"
|
|
32113
|
+
], [
|
|
32114
|
+
[undefined, 3, "3", "Delta"],
|
|
32115
|
+
[undefined, 3, "4", "Epsilon"]
|
|
32116
|
+
], 8);
|
|
32117
|
+
const oDelta = oTable.getRows()[0].getBindingContext();
|
|
32118
|
+
|
|
32119
|
+
// code under test
|
|
32120
|
+
assert.strictEqual(oDelta.getParent(), oBeta);
|
|
32121
|
+
|
|
32122
|
+
this.expectRequest("EMPLOYEES?$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels("
|
|
32123
|
+
+ "HierarchyNodes=$root/EMPLOYEES,HierarchyQualifier='OrgChart'"
|
|
32124
|
+
+ ",NodeProperty='ID',Levels=3)"
|
|
32125
|
+
+ "&$select=DescendantCount,DistanceFromRoot,DrillState,ID,Name"
|
|
32126
|
+
+ "&$skip=6&$top=2", {
|
|
32127
|
+
value : [{
|
|
32128
|
+
DescendantCount : "0",
|
|
32129
|
+
DistanceFromRoot : "2",
|
|
32130
|
+
DrillState : "leaf",
|
|
32131
|
+
ID : "6",
|
|
32132
|
+
Name : "Eta"
|
|
32133
|
+
}, {
|
|
32134
|
+
DescendantCount : "0",
|
|
32135
|
+
DistanceFromRoot : "2",
|
|
32136
|
+
DrillState : "leaf",
|
|
32137
|
+
ID : "7",
|
|
32138
|
+
Name : "Theta"
|
|
32139
|
+
}]
|
|
32140
|
+
});
|
|
32141
|
+
|
|
32142
|
+
oTable.setFirstVisibleRow(6);
|
|
32143
|
+
|
|
32144
|
+
await this.waitForChanges(assert, "scroll to 6 (Eta)");
|
|
32145
|
+
|
|
32146
|
+
checkTable("after scroll to 6 (Eta)", assert, oTable, [
|
|
32147
|
+
"/EMPLOYEES('0')",
|
|
32148
|
+
"/EMPLOYEES('1')",
|
|
32149
|
+
"/EMPLOYEES('3')",
|
|
32150
|
+
"/EMPLOYEES('4')",
|
|
32151
|
+
"/EMPLOYEES('6')",
|
|
32152
|
+
"/EMPLOYEES('7')"
|
|
32153
|
+
], [
|
|
32154
|
+
[undefined, 3, "6", "Eta"],
|
|
32155
|
+
[undefined, 3, "7", "Theta"]
|
|
32156
|
+
], 8);
|
|
32157
|
+
const oEta = oTable.getRows()[0].getBindingContext();
|
|
32158
|
+
|
|
32159
|
+
// code under test
|
|
32160
|
+
assert.strictEqual(oEta.getParent(), undefined);
|
|
32161
|
+
|
|
32162
|
+
this.expectRequest("EMPLOYEES?$apply=ancestors("
|
|
32163
|
+
+ "$root/EMPLOYEES,OrgChart,ID,filter(ID eq '6'),1)"
|
|
32164
|
+
+ "&$select=ID,Name", {
|
|
32165
|
+
value : [{
|
|
32166
|
+
ID : "5",
|
|
32167
|
+
Name : "Zeta"
|
|
32168
|
+
}]
|
|
32169
|
+
});
|
|
32170
|
+
|
|
32171
|
+
// code under test
|
|
32172
|
+
const oZeta = await oEta.requestParent();
|
|
32173
|
+
|
|
32174
|
+
assert.strictEqual(oZeta.getPath(), "/EMPLOYEES('5')");
|
|
32175
|
+
assert.deepEqual(oZeta.getObject(), {ID : "5", Name : "Zeta"});
|
|
32176
|
+
assert.strictEqual(oZeta.getIndex(), undefined);
|
|
32177
|
+
});
|
|
32178
|
+
|
|
30590
32179
|
//*********************************************************************************************
|
|
30591
32180
|
// Scenario: Show the single root node of a recursive hierarchy and expand it. Not all children
|
|
30592
32181
|
// are loaded, but some placeholders remain. Create two new child nodes underneath the root.
|
|
@@ -30862,7 +32451,7 @@ sap.ui.define([
|
|
|
30862
32451
|
return that.waitForChanges(assert, "scroll to top");
|
|
30863
32452
|
}).then(function () {
|
|
30864
32453
|
const oCreatedPersisted = oTable.getRows()[1].getBindingContext();
|
|
30865
|
-
assert
|
|
32454
|
+
checkCreatedPersisted(assert, oCreatedPersisted);
|
|
30866
32455
|
|
|
30867
32456
|
that.expectChange("id", [, "11", "1"])
|
|
30868
32457
|
.expectChange("name", [, "First new child", "Beta"])
|
|
@@ -30897,6 +32486,96 @@ sap.ui.define([
|
|
|
30897
32486
|
});
|
|
30898
32487
|
});
|
|
30899
32488
|
|
|
32489
|
+
//*********************************************************************************************
|
|
32490
|
+
// Scenario: Paging with prefetch (threshold is 5, intentionally odd). Set first visible row to
|
|
32491
|
+
// 30. Then consequetively increase resp. decrease it by one and see that requests only occur
|
|
32492
|
+
// after threshold/2 has been surmounted.
|
|
32493
|
+
// JIRA: CPOUI5ODATAV4-2432
|
|
32494
|
+
[false, true].forEach(function (bAggregation) {
|
|
32495
|
+
const sTitle = "CPOUI5ODATAV4-2432: " + (bAggregation ? "Recursive Hierarchy: " : "")
|
|
32496
|
+
+ "Paging w/ Prefetch";
|
|
32497
|
+
QUnit.test(sTitle, async function (assert) {
|
|
32498
|
+
var oTable;
|
|
32499
|
+
|
|
32500
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
32501
|
+
const sParameters = bAggregation
|
|
32502
|
+
? "{$$aggregation : {hierarchyQualifier : 'OrgChart'}}"
|
|
32503
|
+
: "{$count : true}";
|
|
32504
|
+
const sBaseQuery = bAggregation
|
|
32505
|
+
? "$apply=com.sap.vocabularies.Hierarchy.v1.TopLevels"
|
|
32506
|
+
+ "(HierarchyNodes=$root/EMPLOYEES,HierarchyQualifier='OrgChart'"
|
|
32507
|
+
+ ",NodeProperty='ID',Levels=1)&$select=DrillState,ID"
|
|
32508
|
+
: "$count=true&$select=ID";
|
|
32509
|
+
const sView = `
|
|
32510
|
+
<t:Table id="table" rows="{path : '/EMPLOYEES', parameters : ${sParameters}}"
|
|
32511
|
+
threshold="5" visibleRowCount="3">
|
|
32512
|
+
<Text id="id" text="{ID}"/>
|
|
32513
|
+
</t:Table>`;
|
|
32514
|
+
let bCount = bAggregation;
|
|
32515
|
+
|
|
32516
|
+
/**
|
|
32517
|
+
* Expects request (if iSkip and iTop are given) and change events.
|
|
32518
|
+
*
|
|
32519
|
+
* @param {number} iRow - The first visible row
|
|
32520
|
+
* @param {number} [iSkip] - $skip for the request; no request if undefined
|
|
32521
|
+
* @param {number} [iTop] - $top for the request
|
|
32522
|
+
*/
|
|
32523
|
+
const expect = (iRow, iSkip, iTop) => {
|
|
32524
|
+
if (iSkip !== undefined) {
|
|
32525
|
+
const aElements = [];
|
|
32526
|
+
for (let i = 0; i < iTop; i += 1) {
|
|
32527
|
+
aElements.push({DrillState : "leaf", ID : `E${iSkip + i}`});
|
|
32528
|
+
}
|
|
32529
|
+
|
|
32530
|
+
const sQuery = sBaseQuery + (bCount ? "&$count=true" : "");
|
|
32531
|
+
bCount = false;
|
|
32532
|
+
this.expectRequest(`EMPLOYEES?${sQuery}&$skip=${iSkip}&$top=${iTop}`, {
|
|
32533
|
+
"@odata.count" : "1000",
|
|
32534
|
+
value : aElements
|
|
32535
|
+
});
|
|
32536
|
+
}
|
|
32537
|
+
for (let i = 0; i < 3; i += 1) {
|
|
32538
|
+
this.expectChange("id", `E${iRow + i}`, iRow + i);
|
|
32539
|
+
}
|
|
32540
|
+
};
|
|
32541
|
+
|
|
32542
|
+
/**
|
|
32543
|
+
* Scrolls the table to the given row, expects request and change events and waits for them.
|
|
32544
|
+
*
|
|
32545
|
+
* @param {number} iRow - The new first visible row
|
|
32546
|
+
* @param {number} [iSkip] - $skip for the request; no request if undefined
|
|
32547
|
+
* @param {number} [iTop] - $top for the request
|
|
32548
|
+
*/
|
|
32549
|
+
const scroll = async (iRow, iSkip, iTop) => {
|
|
32550
|
+
expect(iRow, iSkip, iTop);
|
|
32551
|
+
oTable.setFirstVisibleRow(iRow);
|
|
32552
|
+
|
|
32553
|
+
await this.waitForChanges(assert, `scroll to ${iRow}`);
|
|
32554
|
+
};
|
|
32555
|
+
|
|
32556
|
+
expect(0, 0, 8); // 3 visible, 5 after
|
|
32557
|
+
|
|
32558
|
+
await this.createView(assert, sView, oModel);
|
|
32559
|
+
|
|
32560
|
+
oTable = this.oView.byId("table");
|
|
32561
|
+
await scroll(30, 25, 13); // 5 before, 3 visible, 5 after
|
|
32562
|
+
// forward
|
|
32563
|
+
await scroll(31);
|
|
32564
|
+
await scroll(32);
|
|
32565
|
+
await scroll(33, 38, 3); // 3 after (> threshold/2)
|
|
32566
|
+
await scroll(34);
|
|
32567
|
+
await scroll(35);
|
|
32568
|
+
await scroll(36, 41, 3); // 3 after
|
|
32569
|
+
// backward
|
|
32570
|
+
await scroll(29);
|
|
32571
|
+
await scroll(28);
|
|
32572
|
+
await scroll(27, 22, 3); // 3 before
|
|
32573
|
+
await scroll(26);
|
|
32574
|
+
await scroll(25);
|
|
32575
|
+
await scroll(24, 19, 3); // 3 before
|
|
32576
|
+
});
|
|
32577
|
+
});
|
|
32578
|
+
|
|
30900
32579
|
//*********************************************************************************************
|
|
30901
32580
|
// Scenario: Application tries to overwrite client-side instance annotations.
|
|
30902
32581
|
// JIRA: CPOUI5UISERVICESV3-1220
|
|
@@ -42610,6 +44289,10 @@ sap.ui.define([
|
|
|
42610
44289
|
// not is async.
|
|
42611
44290
|
// Resetting pending changes works synchronously.
|
|
42612
44291
|
// JIRA: CPOUI5UISERVICESV3-1981, CPOUI5UISERVICESV3-1994
|
|
44292
|
+
//
|
|
44293
|
+
// CPOUI5UISERVICESV3-1994 is obsolete now because the cache promise remains resolved and
|
|
44294
|
+
// resetChangesForPath can always run synchronously
|
|
44295
|
+
// BCP: 2370141835
|
|
42613
44296
|
[
|
|
42614
44297
|
// late dependent binding does not influence hasPendingChanges for a parent list binding with a
|
|
42615
44298
|
// persisted created entity.
|
|
@@ -42625,14 +44308,12 @@ sap.ui.define([
|
|
|
42625
44308
|
return this.waitForChanges(assert);
|
|
42626
44309
|
},
|
|
42627
44310
|
// modify a persisted created entity; hasPendingChanges is not influenced by late properties;
|
|
42628
|
-
// resetChanges reverts changes
|
|
44311
|
+
// resetChanges reverts changes synchronously (BCP: 2370141835)
|
|
42629
44312
|
function (assert, oModel, oBinding, oCreatedContext) {
|
|
42630
44313
|
var oPropertyBinding = oModel.bindProperty("Note", oCreatedContext);
|
|
42631
44314
|
|
|
42632
|
-
this.expectChange("note", "Modified");
|
|
42633
|
-
|
|
42634
44315
|
oPropertyBinding.initialize();
|
|
42635
|
-
oPropertyBinding.setValue("Modified"); // change event; reset is done
|
|
44316
|
+
oPropertyBinding.setValue("Modified"); // no change event; reset is done synchronously
|
|
42636
44317
|
this.oView.byId("form").setBindingContext(oCreatedContext);
|
|
42637
44318
|
|
|
42638
44319
|
// code under test
|
|
@@ -45565,6 +47246,50 @@ sap.ui.define([
|
|
|
45565
47246
|
});
|
|
45566
47247
|
});
|
|
45567
47248
|
|
|
47249
|
+
//*********************************************************************************************
|
|
47250
|
+
// Scenario: List binding with a navigation property using a context binding. Create three rows
|
|
47251
|
+
// at once. See that the third context is not destroyed during this process.
|
|
47252
|
+
// BCP: 2370141835
|
|
47253
|
+
QUnit.test("BCP: 2370141835", async function (assert) {
|
|
47254
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
47255
|
+
const sView = `
|
|
47256
|
+
<Table id="table" items="{/EMPLOYEES}">
|
|
47257
|
+
<Text text="{ID}"/>
|
|
47258
|
+
<Text binding="{EMPLOYEE_2_MANAGER}" id="managerId" text="{ID}"/>
|
|
47259
|
+
</Table>`;
|
|
47260
|
+
|
|
47261
|
+
this.expectRequest("EMPLOYEES?$select=ID&$expand=EMPLOYEE_2_MANAGER($select=ID)"
|
|
47262
|
+
+ "&$skip=0&$top=100", {value : []})
|
|
47263
|
+
.expectChange("managerId", []);
|
|
47264
|
+
|
|
47265
|
+
await this.createView(assert, sView, oModel);
|
|
47266
|
+
|
|
47267
|
+
this.expectChange("managerId", ["", "", ""])
|
|
47268
|
+
.expectRequest({method : "POST", url : "EMPLOYEES", payload : {}}, {ID : "0"})
|
|
47269
|
+
.expectRequest({method : "POST", url : "EMPLOYEES", payload : {}}, {ID : "1"})
|
|
47270
|
+
.expectRequest({method : "POST", url : "EMPLOYEES", payload : {}}, {ID : "2"})
|
|
47271
|
+
.expectRequest("EMPLOYEES('0')?$select=ID&$expand=EMPLOYEE_2_MANAGER($select=ID)",
|
|
47272
|
+
{ID : "0", EMPLOYEE_2_MANAGER : {ID : "10"}})
|
|
47273
|
+
.expectRequest("EMPLOYEES('1')?$select=ID&$expand=EMPLOYEE_2_MANAGER($select=ID)",
|
|
47274
|
+
{ID : "1", EMPLOYEE_2_MANAGER : {ID : "11"}})
|
|
47275
|
+
.expectRequest("EMPLOYEES('2')?$select=ID&$expand=EMPLOYEE_2_MANAGER($select=ID)",
|
|
47276
|
+
{ID : "2", EMPLOYEE_2_MANAGER : {ID : "12"}})
|
|
47277
|
+
.expectChange("managerId", ["12", "11", "10"]);
|
|
47278
|
+
|
|
47279
|
+
const oBinding = this.oView.byId("table").getBinding("items");
|
|
47280
|
+
// code under test
|
|
47281
|
+
const oContext0 = oBinding.create();
|
|
47282
|
+
const oContext1 = oBinding.create();
|
|
47283
|
+
const oContext2 = oBinding.create();
|
|
47284
|
+
|
|
47285
|
+
await Promise.all([
|
|
47286
|
+
oContext0.created(),
|
|
47287
|
+
oContext1.created(),
|
|
47288
|
+
oContext2.created(),
|
|
47289
|
+
this.waitForChanges(assert, "create")
|
|
47290
|
+
]);
|
|
47291
|
+
});
|
|
47292
|
+
|
|
45568
47293
|
//*********************************************************************************************
|
|
45569
47294
|
// Scenario: Multiple creation rows, grid table
|
|
45570
47295
|
// (1) create three creation rows immediately after setContext
|
|
@@ -45939,6 +47664,426 @@ sap.ui.define([
|
|
|
45939
47664
|
});
|
|
45940
47665
|
});
|
|
45941
47666
|
|
|
47667
|
+
//*********************************************************************************************
|
|
47668
|
+
// Scenario: Apply the filter for messages on a table with persisted and inactive rows, but only
|
|
47669
|
+
// messages for inactive rows. See that the persisted rows disappear w/o a request, and see that
|
|
47670
|
+
// selected APIs do not trigger requests afterwards.
|
|
47671
|
+
// Run each test with a grid table, a responsive table, and a responsive table with growing
|
|
47672
|
+
// enablement. Check that #setAggregation does not work with Filter.NONE, download URL is null,
|
|
47673
|
+
// and #requestContexts (with Filter.NONE) returns transient rows only without a GET request.
|
|
47674
|
+
// (1) Add two inline creation rows, keep one persisted context alive.
|
|
47675
|
+
// (2) Change a property of the first creation row, the activation fails with a message
|
|
47676
|
+
// (3) Call #requestFilterForMessages, see that it is Filter.NONE, apply it, and see that only
|
|
47677
|
+
// the transient and kept-alive contexts remain w/o a request
|
|
47678
|
+
// (4) Call #requestSideEffects, see that all rows remain
|
|
47679
|
+
// (5) Call the given API function and see that nothing happens (except refresh for the kept-
|
|
47680
|
+
// alive context)
|
|
47681
|
+
// (6) Create another kept-alive context via getKeepAliveContext
|
|
47682
|
+
// (7) Activate and persist the first row, create a new inactive row, fail to activate it, and
|
|
47683
|
+
// release the kept-alive contexts
|
|
47684
|
+
// (8) Call #requestSideEffects, see that all rows remain, including the created persisted one
|
|
47685
|
+
// (9) Call the given API function again and see that the created persisted row disappears
|
|
47686
|
+
// (10) Remove the filter and see that data is requested from the server
|
|
47687
|
+
// JIRA: CPOUI5ODATAV4-2321
|
|
47688
|
+
[
|
|
47689
|
+
{desc : "grid table", table : "t:Table", parameters : "", rows : "rows", top : 110},
|
|
47690
|
+
{desc : "responsive table", table : "Table", parameters : "", rows : "items", top : 100},
|
|
47691
|
+
{desc : "growing table", table : "Table", parameters : 'growing="true"', rows : "items",
|
|
47692
|
+
top : 20}
|
|
47693
|
+
].forEach((o) => {
|
|
47694
|
+
[
|
|
47695
|
+
"changeParameters", "filter", "refresh", "resume", "sort"
|
|
47696
|
+
].forEach((sMethod) => {
|
|
47697
|
+
QUnit.test(`Filter.NONE & ${sMethod}, ${o.desc}`, async function (assert) {
|
|
47698
|
+
const oModel = this.createSalesOrdersModel({autoExpandSelect : true});
|
|
47699
|
+
const sView = `
|
|
47700
|
+
<${o.table} id="table" ${o.parameters} ${o.rows}="{path : '/SalesOrderList',
|
|
47701
|
+
parameters : {$count : true, $filter : 'SalesOrderID ne \\'0\\'', $$ownRequest : true}}">
|
|
47702
|
+
<Text text="{SalesOrderID}"/>
|
|
47703
|
+
<Input value="{Note}"/>
|
|
47704
|
+
</${o.table}>`;
|
|
47705
|
+
|
|
47706
|
+
const createActivateCallback = (oEvent) => {
|
|
47707
|
+
const oCreatedContext = oEvent.getParameter("context");
|
|
47708
|
+
|
|
47709
|
+
if (oCreatedContext.getProperty("Note").length <= 3) {
|
|
47710
|
+
this.expectMessages([{
|
|
47711
|
+
message : "Note must be longer than 3 chars",
|
|
47712
|
+
target : "/SalesOrderList($uid=...)/Note",
|
|
47713
|
+
type : "Error"
|
|
47714
|
+
}]);
|
|
47715
|
+
Messaging.addMessages(new Message({
|
|
47716
|
+
message : "Note must be longer than 3 chars",
|
|
47717
|
+
processor : oModel,
|
|
47718
|
+
target : oCreatedContext.getPath() + "/Note",
|
|
47719
|
+
type : "Error"
|
|
47720
|
+
}));
|
|
47721
|
+
oEvent.preventDefault();
|
|
47722
|
+
} else {
|
|
47723
|
+
Messaging.removeAllMessages(); // there can only be one message at a time
|
|
47724
|
+
this.expectMessages([]);
|
|
47725
|
+
}
|
|
47726
|
+
};
|
|
47727
|
+
|
|
47728
|
+
this.expectRequest("SalesOrderList?$count=true&$filter=SalesOrderID ne '0'"
|
|
47729
|
+
+ "&$select=Note,SalesOrderID&$skip=0&$top=" + o.top, {
|
|
47730
|
+
"@odata.count" : "2",
|
|
47731
|
+
value : [
|
|
47732
|
+
{Note : "Note 42", SalesOrderID : "42"},
|
|
47733
|
+
{Note : "Note 43", SalesOrderID : "43"}
|
|
47734
|
+
]
|
|
47735
|
+
});
|
|
47736
|
+
|
|
47737
|
+
await this.createView(assert, sView, oModel);
|
|
47738
|
+
|
|
47739
|
+
const oTable = this.oView.byId("table");
|
|
47740
|
+
const oBinding = oTable.getBinding("rows") ?? oTable.getBinding("items");
|
|
47741
|
+
|
|
47742
|
+
checkTable("after creating view", assert, oTable, [
|
|
47743
|
+
"/SalesOrderList('42')",
|
|
47744
|
+
"/SalesOrderList('43')"
|
|
47745
|
+
], [
|
|
47746
|
+
["42", "Note 42"],
|
|
47747
|
+
["43", "Note 43"]
|
|
47748
|
+
]);
|
|
47749
|
+
assert.strictEqual(oBinding.getCount(), 2);
|
|
47750
|
+
|
|
47751
|
+
const oKeptAliveContext0 = oBinding.getCurrentContexts()[0];
|
|
47752
|
+
oKeptAliveContext0.setKeepAlive(true);
|
|
47753
|
+
|
|
47754
|
+
oBinding.attachCreateActivate(createActivateCallback);
|
|
47755
|
+
|
|
47756
|
+
const oContext0 = oBinding.create(undefined, true, true, true);
|
|
47757
|
+
const oContext1 = oBinding.create({Note : "bar"}, true, true, true);
|
|
47758
|
+
|
|
47759
|
+
await resolveLater(); // table update takes a moment
|
|
47760
|
+
|
|
47761
|
+
checkTable("create inline creation rows", assert, oTable, [
|
|
47762
|
+
"/SalesOrderList($uid=...)",
|
|
47763
|
+
"/SalesOrderList($uid=...)",
|
|
47764
|
+
"/SalesOrderList('42')",
|
|
47765
|
+
"/SalesOrderList('43')"
|
|
47766
|
+
], [
|
|
47767
|
+
["42", "Note 42"],
|
|
47768
|
+
["43", "Note 43"],
|
|
47769
|
+
["", ""],
|
|
47770
|
+
["", "bar"]
|
|
47771
|
+
]);
|
|
47772
|
+
assert.strictEqual(oBinding.getCount(), 2);
|
|
47773
|
+
|
|
47774
|
+
oContext0.setProperty("Note", "foo");
|
|
47775
|
+
|
|
47776
|
+
await resolveLater(); // table update takes a moment
|
|
47777
|
+
|
|
47778
|
+
checkTable("set property, fail activation", assert, oTable, [
|
|
47779
|
+
"/SalesOrderList($uid=...)",
|
|
47780
|
+
"/SalesOrderList($uid=...)",
|
|
47781
|
+
"/SalesOrderList('42')",
|
|
47782
|
+
"/SalesOrderList('43')"
|
|
47783
|
+
], [
|
|
47784
|
+
["42", "Note 42"],
|
|
47785
|
+
["43", "Note 43"],
|
|
47786
|
+
["", "foo"],
|
|
47787
|
+
["", "bar"]
|
|
47788
|
+
]);
|
|
47789
|
+
assert.strictEqual(oBinding.getCount(), 2);
|
|
47790
|
+
|
|
47791
|
+
// code under test
|
|
47792
|
+
assert.strictEqual(await oBinding.requestFilterForMessages(), Filter.NONE);
|
|
47793
|
+
oBinding.filter(Filter.NONE);
|
|
47794
|
+
|
|
47795
|
+
assert.strictEqual(oBinding.getCount(), undefined, "cache not ready");
|
|
47796
|
+
|
|
47797
|
+
await resolveLater(); // table update takes a moment
|
|
47798
|
+
|
|
47799
|
+
checkTable("Filter.NONE set", assert, oTable, [
|
|
47800
|
+
"/SalesOrderList($uid=...)",
|
|
47801
|
+
"/SalesOrderList($uid=...)",
|
|
47802
|
+
"/SalesOrderList('42')" // kept-alive
|
|
47803
|
+
], [
|
|
47804
|
+
["", "foo"],
|
|
47805
|
+
["", "bar"]
|
|
47806
|
+
], 2);
|
|
47807
|
+
assert.strictEqual(oBinding.getCount(), 0);
|
|
47808
|
+
|
|
47809
|
+
// code under test
|
|
47810
|
+
const aContexts = await oBinding.requestContexts();
|
|
47811
|
+
assert.deepEqual(aContexts.map(getNormalizedPath), [
|
|
47812
|
+
"/SalesOrderList($uid=...)",
|
|
47813
|
+
"/SalesOrderList($uid=...)"
|
|
47814
|
+
], "requestContexts");
|
|
47815
|
+
|
|
47816
|
+
// code under test
|
|
47817
|
+
assert.strictEqual(oBinding.getDownloadUrl(), null);
|
|
47818
|
+
assert.strictEqual(await oBinding.requestDownloadUrl(), null);
|
|
47819
|
+
|
|
47820
|
+
assert.throws(() => {
|
|
47821
|
+
// code under test
|
|
47822
|
+
oBinding.setAggregation({hierarchyQualifier : "X"});
|
|
47823
|
+
}, new Error("Cannot combine Filter.NONE with $$aggregation"));
|
|
47824
|
+
|
|
47825
|
+
this.expectRequest("SalesOrderList?$filter=SalesOrderID eq '42'"
|
|
47826
|
+
+ "&$select=Note,SalesOrderID",
|
|
47827
|
+
{value : [{Note : "Note 42", SalesOrderID : "42"}]});
|
|
47828
|
+
|
|
47829
|
+
// code under test
|
|
47830
|
+
oBinding.getHeaderContext().requestSideEffects([""]);
|
|
47831
|
+
|
|
47832
|
+
await this.waitForChanges(assert, "requestSideEffects");
|
|
47833
|
+
|
|
47834
|
+
checkTable(sMethod, assert, oTable, [
|
|
47835
|
+
"/SalesOrderList($uid=...)",
|
|
47836
|
+
"/SalesOrderList($uid=...)",
|
|
47837
|
+
"/SalesOrderList('42')"
|
|
47838
|
+
], [
|
|
47839
|
+
["", "foo"],
|
|
47840
|
+
["", "bar"]
|
|
47841
|
+
], 2);
|
|
47842
|
+
assert.strictEqual(oBinding.getCount(), 0);
|
|
47843
|
+
|
|
47844
|
+
switch (sMethod) {
|
|
47845
|
+
case "changeParameters":
|
|
47846
|
+
// code under test
|
|
47847
|
+
oBinding.changeParameters({$search : "covfefe"});
|
|
47848
|
+
break;
|
|
47849
|
+
|
|
47850
|
+
case "filter":
|
|
47851
|
+
// code under test
|
|
47852
|
+
oBinding.filter(new Filter("Note", FilterOperator.NE, "4711"), FilterType.Control);
|
|
47853
|
+
break;
|
|
47854
|
+
|
|
47855
|
+
case "resume":
|
|
47856
|
+
// code under test
|
|
47857
|
+
oBinding.suspend();
|
|
47858
|
+
oBinding.sort(new Sorter("SalesOrderID"));
|
|
47859
|
+
oBinding.filter(new Filter("Note", FilterOperator.NE, "4711"), FilterType.Control);
|
|
47860
|
+
oBinding.changeParameters({$search : "covfefe"});
|
|
47861
|
+
oBinding.resume();
|
|
47862
|
+
break;
|
|
47863
|
+
|
|
47864
|
+
case "sort":
|
|
47865
|
+
// code under test
|
|
47866
|
+
oBinding.sort(new Sorter("SalesOrderID"));
|
|
47867
|
+
break;
|
|
47868
|
+
|
|
47869
|
+
case "refresh":
|
|
47870
|
+
this.expectRequest("SalesOrderList?$filter=SalesOrderID eq '42'"
|
|
47871
|
+
+ "&$select=Note,SalesOrderID",
|
|
47872
|
+
{value : [{Note : "Note 42", SalesOrderID : "42"}]});
|
|
47873
|
+
|
|
47874
|
+
// code under test
|
|
47875
|
+
oBinding.refresh();
|
|
47876
|
+
break;
|
|
47877
|
+
|
|
47878
|
+
// no default
|
|
47879
|
+
}
|
|
47880
|
+
|
|
47881
|
+
await this.waitForChanges(assert, "test API " + sMethod);
|
|
47882
|
+
|
|
47883
|
+
// no change expected
|
|
47884
|
+
checkTable(sMethod, assert, oTable, [
|
|
47885
|
+
"/SalesOrderList($uid=...)",
|
|
47886
|
+
"/SalesOrderList($uid=...)",
|
|
47887
|
+
"/SalesOrderList('42')"
|
|
47888
|
+
], [
|
|
47889
|
+
["", "foo"],
|
|
47890
|
+
["", "bar"]
|
|
47891
|
+
], 2);
|
|
47892
|
+
assert.strictEqual(oBinding.getCount(), 0);
|
|
47893
|
+
|
|
47894
|
+
this.expectRequest("SalesOrderList('43')?$select=SalesOrderID", {SalesOrderID : "43"});
|
|
47895
|
+
|
|
47896
|
+
// code under test
|
|
47897
|
+
const oKeptAliveContext1 = oBinding.getKeepAliveContext("/SalesOrderList('43')");
|
|
47898
|
+
|
|
47899
|
+
await this.waitForChanges(assert, "getKeepAliveContext");
|
|
47900
|
+
|
|
47901
|
+
checkTable("getKeepAliveContext", assert, oTable, [
|
|
47902
|
+
"/SalesOrderList($uid=...)",
|
|
47903
|
+
"/SalesOrderList($uid=...)",
|
|
47904
|
+
"/SalesOrderList('42')",
|
|
47905
|
+
"/SalesOrderList('43')"
|
|
47906
|
+
], [
|
|
47907
|
+
["", "foo"],
|
|
47908
|
+
["", "bar"]
|
|
47909
|
+
], 2);
|
|
47910
|
+
assert.strictEqual(oBinding.getCount(), 0);
|
|
47911
|
+
assert.strictEqual(oKeptAliveContext1.getIndex(), undefined);
|
|
47912
|
+
|
|
47913
|
+
this.expectRequest({
|
|
47914
|
+
method : "POST",
|
|
47915
|
+
url : "SalesOrderList",
|
|
47916
|
+
payload : {Note : "foobar"}
|
|
47917
|
+
}, {
|
|
47918
|
+
Note : "foobar*",
|
|
47919
|
+
SalesOrderID : "44"
|
|
47920
|
+
});
|
|
47921
|
+
|
|
47922
|
+
// code under test (activate first row)
|
|
47923
|
+
oContext0.setProperty("Note", "foobar");
|
|
47924
|
+
assert.strictEqual(oBinding.getCount(), 1);
|
|
47925
|
+
|
|
47926
|
+
const oContext2 = oBinding.create(undefined, true, true, true);
|
|
47927
|
+
// activation fails
|
|
47928
|
+
oContext2.setProperty("Note", "baz");
|
|
47929
|
+
|
|
47930
|
+
// code under test (release kept contexts)
|
|
47931
|
+
oKeptAliveContext0.setKeepAlive(false);
|
|
47932
|
+
oKeptAliveContext1.setKeepAlive(false);
|
|
47933
|
+
|
|
47934
|
+
await Promise.all([
|
|
47935
|
+
oContext0.created(),
|
|
47936
|
+
this.waitForChanges(assert, "activate first row and add a new inactive one")
|
|
47937
|
+
]);
|
|
47938
|
+
|
|
47939
|
+
checkTable("third inline creation row added, first row persisted", assert, oTable, [
|
|
47940
|
+
"/SalesOrderList($uid=...)",
|
|
47941
|
+
"/SalesOrderList($uid=...)",
|
|
47942
|
+
"/SalesOrderList('44')"
|
|
47943
|
+
], [
|
|
47944
|
+
["44", "foobar*"],
|
|
47945
|
+
["", "bar"],
|
|
47946
|
+
["", "baz"]
|
|
47947
|
+
]);
|
|
47948
|
+
assert.strictEqual(oBinding.getCount(), 1);
|
|
47949
|
+
|
|
47950
|
+
this.expectRequest("SalesOrderList?$filter=SalesOrderID eq '44'&$select=Note,SalesOrderID",
|
|
47951
|
+
{value : [{Note : "foobar**", SalesOrderID : "44"}]});
|
|
47952
|
+
|
|
47953
|
+
await Promise.all([
|
|
47954
|
+
// code under test
|
|
47955
|
+
oBinding.getHeaderContext().requestSideEffects([""]),
|
|
47956
|
+
this.waitForChanges(assert, "requestSideEffects")
|
|
47957
|
+
]);
|
|
47958
|
+
|
|
47959
|
+
checkTable("after requestSideEffects", assert, oTable, [
|
|
47960
|
+
"/SalesOrderList($uid=...)",
|
|
47961
|
+
"/SalesOrderList($uid=...)",
|
|
47962
|
+
"/SalesOrderList('44')"
|
|
47963
|
+
], [
|
|
47964
|
+
["44", "foobar**"],
|
|
47965
|
+
["", "bar"],
|
|
47966
|
+
["", "baz"]
|
|
47967
|
+
]);
|
|
47968
|
+
assert.strictEqual(oBinding.getCount(), 1);
|
|
47969
|
+
|
|
47970
|
+
let sFilter = "SalesOrderID ne '0'";
|
|
47971
|
+
let sOptions = "";
|
|
47972
|
+
|
|
47973
|
+
switch (sMethod) {
|
|
47974
|
+
case "changeParameters":
|
|
47975
|
+
sOptions = "&$search=fefecov";
|
|
47976
|
+
// code under test
|
|
47977
|
+
oBinding.changeParameters({$search : "fefecov"});
|
|
47978
|
+
break;
|
|
47979
|
+
|
|
47980
|
+
case "filter":
|
|
47981
|
+
sFilter = `Note ne '1174' and (${sFilter})`;
|
|
47982
|
+
// code under test
|
|
47983
|
+
oBinding.filter(new Filter("Note", FilterOperator.NE, "1174"), FilterType.Control);
|
|
47984
|
+
break;
|
|
47985
|
+
|
|
47986
|
+
case "resume":
|
|
47987
|
+
sFilter = `Note ne '1174' and (${sFilter})`;
|
|
47988
|
+
sOptions = "&$search=fefecov&$orderby=SalesOrderID desc";
|
|
47989
|
+
// code under test
|
|
47990
|
+
oBinding.suspend();
|
|
47991
|
+
oBinding.sort(new Sorter("SalesOrderID", true));
|
|
47992
|
+
oBinding.filter(new Filter("Note", FilterOperator.NE, "1174"), FilterType.Control);
|
|
47993
|
+
oBinding.changeParameters({$search : "fefecov"});
|
|
47994
|
+
oBinding.resume();
|
|
47995
|
+
break;
|
|
47996
|
+
|
|
47997
|
+
case "sort":
|
|
47998
|
+
sOptions = "&$orderby=SalesOrderID desc";
|
|
47999
|
+
// code under test
|
|
48000
|
+
oBinding.sort(new Sorter("SalesOrderID", true));
|
|
48001
|
+
break;
|
|
48002
|
+
|
|
48003
|
+
case "refresh":
|
|
48004
|
+
// code under test
|
|
48005
|
+
oBinding.refresh();
|
|
48006
|
+
break;
|
|
48007
|
+
|
|
48008
|
+
// no default
|
|
48009
|
+
}
|
|
48010
|
+
|
|
48011
|
+
await resolveLater(); // table update takes a moment
|
|
48012
|
+
|
|
48013
|
+
checkTable("created persisted row gets removed", assert, oTable, [
|
|
48014
|
+
"/SalesOrderList($uid=...)",
|
|
48015
|
+
"/SalesOrderList($uid=...)"
|
|
48016
|
+
], [
|
|
48017
|
+
["", "bar"],
|
|
48018
|
+
["", "baz"]
|
|
48019
|
+
]);
|
|
48020
|
+
assert.strictEqual(oBinding.getCount(), 0);
|
|
48021
|
+
|
|
48022
|
+
this.expectRequest("SalesOrderList?$count=true&$filter=" + sFilter
|
|
48023
|
+
+ "&$select=Note,SalesOrderID" + sOptions + "&$skip=0&$top=" + o.top, {
|
|
48024
|
+
"@odata.count" : "3",
|
|
48025
|
+
value : [
|
|
48026
|
+
{Note : "Note 42", SalesOrderID : "42"},
|
|
48027
|
+
{Note : "Note 43", SalesOrderID : "43"},
|
|
48028
|
+
{Note : "foobar*", SalesOrderID : "44"}
|
|
48029
|
+
]
|
|
48030
|
+
});
|
|
48031
|
+
|
|
48032
|
+
// code under test
|
|
48033
|
+
oBinding.filter();
|
|
48034
|
+
|
|
48035
|
+
await this.waitForChanges(assert, "remove filter");
|
|
48036
|
+
|
|
48037
|
+
checkTable("remove filter", assert, oTable, [
|
|
48038
|
+
"/SalesOrderList($uid=...)",
|
|
48039
|
+
"/SalesOrderList($uid=...)",
|
|
48040
|
+
"/SalesOrderList('42')",
|
|
48041
|
+
"/SalesOrderList('43')",
|
|
48042
|
+
"/SalesOrderList('44')"
|
|
48043
|
+
], [
|
|
48044
|
+
["42", "Note 42"],
|
|
48045
|
+
["43", "Note 43"],
|
|
48046
|
+
["44", "foobar*"],
|
|
48047
|
+
["", "bar"],
|
|
48048
|
+
["", "baz"]
|
|
48049
|
+
]);
|
|
48050
|
+
assert.strictEqual(oBinding.getCount(), 3);
|
|
48051
|
+
|
|
48052
|
+
assert.strictEqual(oContext1.isInactive(), true);
|
|
48053
|
+
assert.strictEqual(oContext2.isInactive(), 1);
|
|
48054
|
+
});
|
|
48055
|
+
});
|
|
48056
|
+
});
|
|
48057
|
+
|
|
48058
|
+
//*********************************************************************************************
|
|
48059
|
+
// Scenario: Nested list binding w/o own cache. Filter it with Filter.NONE so it creates an
|
|
48060
|
+
// own cache. Persisted rows disappear.
|
|
48061
|
+
QUnit.test("Filter.NONE w/o cache", async function (assert) {
|
|
48062
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true, updateGroupId : "update"});
|
|
48063
|
+
const sView = `
|
|
48064
|
+
<FlexBox binding="{/TEAMS('1')}">
|
|
48065
|
+
<Table id="table" items="{TEAM_2_EMPLOYEES}">
|
|
48066
|
+
<Text id="id" text="{ID}"/>
|
|
48067
|
+
</Table>
|
|
48068
|
+
</FlexBox>`;
|
|
48069
|
+
|
|
48070
|
+
this.expectRequest("TEAMS('1')?$select=Team_Id&$expand=TEAM_2_EMPLOYEES($select=ID)",
|
|
48071
|
+
{Team_Id : "1", TEAM_2_EMPLOYEES : [{ID : "10"}, {ID : "20"}]})
|
|
48072
|
+
.expectChange("id", ["10", "20"]);
|
|
48073
|
+
|
|
48074
|
+
await this.createView(assert, sView, oModel);
|
|
48075
|
+
const oBinding = this.oView.byId("table").getBinding("items");
|
|
48076
|
+
|
|
48077
|
+
assert.strictEqual(oBinding.getLength(), 2);
|
|
48078
|
+
|
|
48079
|
+
// code under test
|
|
48080
|
+
oBinding.filter(Filter.NONE);
|
|
48081
|
+
|
|
48082
|
+
assert.strictEqual(oBinding.getLength(), 0);
|
|
48083
|
+
|
|
48084
|
+
await this.waitForChanges(assert);
|
|
48085
|
+
});
|
|
48086
|
+
|
|
45942
48087
|
//*********************************************************************************************
|
|
45943
48088
|
// Scenario: relative ODLB w/o own cache; switch binding context via setContext with transient
|
|
45944
48089
|
// rows present. Switch back and expect that transient rows survived.
|
|
@@ -48167,7 +50312,7 @@ sap.ui.define([
|
|
|
48167
50312
|
|
|
48168
50313
|
/*
|
|
48169
50314
|
* Resolves the list report and expects the corresponding request and changes.
|
|
48170
|
-
|
|
50315
|
+
* @param {number} iBatchNo - The number of the $batch for the request
|
|
48171
50316
|
*/
|
|
48172
50317
|
function initializeList(iBatchNo) {
|
|
48173
50318
|
that.expectRequest({
|
|
@@ -48643,7 +50788,7 @@ sap.ui.define([
|
|
|
48643
50788
|
oTable,
|
|
48644
50789
|
sView = '\
|
|
48645
50790
|
<Table id="list" items="{path : \'Artists\', parameters : {$$getKeepAliveContext : true,\
|
|
48646
|
-
|
|
50791
|
+
$$ownRequest : true, foo : \'bar\', $count : true}}">\
|
|
48647
50792
|
<Text id="listName" text="{Name}"/>\
|
|
48648
50793
|
<Text id="defaultChannel" text="{defaultChannel}"/>\
|
|
48649
50794
|
</Table>\
|
|
@@ -48877,7 +51022,7 @@ sap.ui.define([
|
|
|
48877
51022
|
var oModel = this.createSpecialCasesModel({autoExpandSelect : true}),
|
|
48878
51023
|
sView = '\
|
|
48879
51024
|
<Table id="list" growing="true" growingThreshold="1" items="{path : \'Artists\',\
|
|
48880
|
-
|
|
51025
|
+
parameters : {$$getKeepAliveContext : true, $$ownRequest : true}}">\
|
|
48881
51026
|
<Text id="id" text="{ArtistID}"/>\
|
|
48882
51027
|
<Text id="isActiveEntity" text="{IsActiveEntity}"/>\
|
|
48883
51028
|
<Text id="listName" text="{Name}"/>\
|
|
@@ -54088,7 +56233,7 @@ sap.ui.define([
|
|
|
54088
56233
|
sView = '\
|
|
54089
56234
|
<Text id="employeeCount" text="{$count}"/>\
|
|
54090
56235
|
<' + sTable + ' id="employees" ' + sItems + '="{path : \'TEAM_2_EMPLOYEES\',\
|
|
54091
|
-
|
|
56236
|
+
parameters : {$$ownRequest : true, $count : true}}">\
|
|
54092
56237
|
<Text id="employeeName" text="{Name}"/>\
|
|
54093
56238
|
<List items="{path : \'EMPLOYEE_2_EQUIPMENTS\', \
|
|
54094
56239
|
parameters : {$count : true' + sOwnRequest + '}, templateShareable : false}">\
|
|
@@ -56748,6 +58893,44 @@ sap.ui.define([
|
|
|
56748
58893
|
});
|
|
56749
58894
|
});
|
|
56750
58895
|
|
|
58896
|
+
//*********************************************************************************************
|
|
58897
|
+
// Scenario: When working with group $auto, first call ODLB#create and then immediately call
|
|
58898
|
+
// ODM#submitBatch. Expect that the latter's promise does not resolve before the create request
|
|
58899
|
+
// is completed.
|
|
58900
|
+
// BCP: 2370151708
|
|
58901
|
+
QUnit.test("BCP: 2370151708 - submitBatch includes create ($auto)", async function (assert) {
|
|
58902
|
+
const oModel = this.createTeaBusiModel({autoExpandSelect : true});
|
|
58903
|
+
await this.createView(assert, "", oModel);
|
|
58904
|
+
|
|
58905
|
+
let fnResolveCreate;
|
|
58906
|
+
this.expectRequest({
|
|
58907
|
+
method : "POST",
|
|
58908
|
+
payload : {},
|
|
58909
|
+
url : "EMPLOYEES"
|
|
58910
|
+
}, new Promise(function (resolve) {
|
|
58911
|
+
fnResolveCreate = resolve.bind(null, {/* response does not matter here */});
|
|
58912
|
+
}));
|
|
58913
|
+
|
|
58914
|
+
const oBinding = oModel.bindList("/EMPLOYEES");
|
|
58915
|
+
const oContext = oBinding.create({}, true);
|
|
58916
|
+
let bSubmitBatchCompleted = false;
|
|
58917
|
+
|
|
58918
|
+
// code under test
|
|
58919
|
+
const oSubmitPromise = oModel.submitBatch("$auto").then(() => {
|
|
58920
|
+
bSubmitBatchCompleted = true;
|
|
58921
|
+
});
|
|
58922
|
+
|
|
58923
|
+
await this.waitForChanges(assert, "create+submitBatch");
|
|
58924
|
+
|
|
58925
|
+
assert.strictEqual(bSubmitBatchCompleted, false);
|
|
58926
|
+
|
|
58927
|
+
fnResolveCreate();
|
|
58928
|
+
|
|
58929
|
+
await Promise.all([oContext.created(), oSubmitPromise]);
|
|
58930
|
+
|
|
58931
|
+
assert.strictEqual(bSubmitBatchCompleted, true);
|
|
58932
|
+
});
|
|
58933
|
+
|
|
56751
58934
|
//*********************************************************************************************
|
|
56752
58935
|
// Scenario: Dependent ContextBinding below a dependent ListBinding, below of an absolute
|
|
56753
58936
|
// ListBinding, all w/ own cache. Set a row context of the absolute ListBinding as parent
|