[TASK] Prepare ImmediateActionElementTest for ES6 modules
In ES6 mode Viewport.Topbar and ModuleMenu.App properties cannot be overwritten (in order to be substituted with a call spy), as they reference other JavaScript modules. The properties of ES6 models are readonly ("frozen") and can therefore not be overwritten in a test setup. Therefore the test is adapted to overwrite the references in Viewport and ModuleMenu instead. Also a timeout is added as await import('TYPO3/CMS/Backend/ModuleMenu') does not guarantee a loading order between modules in ES6, which causes test asserts to be executed too early. Releases: main Resolves: #96396 Related #96323 Change-Id: I5c213b70e43c5e1256e91ffe0d9f12f96dbb6615 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72736 Tested-by:core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- Build/Sources/TypeScript/backend/Tests/Element/ImmediateActionElementTest.ts 31 additions, 27 deletions...cript/backend/Tests/Element/ImmediateActionElementTest.ts
- typo3/sysext/backend/Tests/JavaScript/Element/ImmediateActionElementTest.js 1 addition, 1 deletion...nd/Tests/JavaScript/Element/ImmediateActionElementTest.js
Please register or sign in to comment