sap.ui.qunit.utils.nextUIUpdate
and waitForThemeApplied
recommended as replacements, but not exposed
#4074
Labels
sap.ui.qunit.utils.nextUIUpdate
and waitForThemeApplied
recommended as replacements, but not exposed
#4074
Prior to UI5 2.0, a couple of methods were deprecated. The jsdoc in OpenUI5, and thus TypeScript types as well as the UI5 linter expose the deprecation notices with hints to replace with alternatives from
sap.ui.qunit.utils
, i.e.openui5/src/sap.ui.core/src/sap/ui/core/Core.js
Lines 2309 to 2310 in 4950f1d
Core.applyChanges()
suggestsnextUIUpdate
openui5/src/sap.ui.core/src/sap/ui/qunit/QUnitUtils.js
Line 122 in 4950f1d
QUtils.delayTestStart()
suggestswaitForThemeApplied
Indeed, those two methods are really useful when writing tests for custom controls. However, these methods are not exposed properly.
nextUIUpdate
is marked as@public
, butwaitForThemeApplied
is not. Both are not shown on https://ui5.sap.com, and don't appear in the generated types, presumably due to deliberate exclusion atopenui5/src/sap.ui.core/src/sap/ui/core/.library
Line 125 in 4950f1d
This discussion started at SAP/ui5-typescript#459, but I was redirected here as the types are generated correctly, but the issue is the JSDoc and library configuration. Also, it was noted there that (until now) the two functions were deliberately not released (yet).
Thus, please consider properly exposing the two methods to end users, both in JSDoc as well as in TypeScript and https://ui5.sap.com.
Thank you very much for your support!
Lukas
The text was updated successfully, but these errors were encountered: