Open ArnaudBuchholz opened 11 months ago
As a side note, it appears that this problem is quite common with UI5 apps, I had to tweak ui5-test-runner
to be less strict on that issue. I also observed that the karma
runner doesn't care about this problem.
Easy-Ui5 version:
Latest version
OS/version:
Not relevant
Browser/version (+device/version):
Not relevant
Steps to reproduce the problem:
easy-ui5
What is the expected result?
Tests are executed (and they are)
What happens instead?
Depending on the server used, the The console log shows an error about QUnit being called on start while the tests are already started.![image](https://github.com/ui5-community/generator-ui5-project/assets/4194952/9e3bbd91-8958-4525-82eb-1dd49ac7b295)
Any other information? (attach screenshot if possible)
The problem comes from the asynchronous loading of the
unitTests.qunit
module that happens asynchronously after qunit is loaded. Hence it does not prevent the startup soon enough.https://github.com/ui5-community/generator-ui5-app/blob/95ee595678d06576ccd6a3732349e158bd987796/generators/app/templates/webapp/test/unit/unitTests.qunit.html#L17
I would recommend inserting a small script file that synchronously prevents the tests to start like in : https://github.com/ArnaudBuchholz/training-ui5con18-opa/blob/main/webapp/test/qunit.autostart.js
If you agree with it, I can submit a PR.