You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openig-ui: the QUnit runner is effectively dead (grunt qunit / PhantomJS times out, task commented out of build) #175
The JavaScript test suite of openig-ui is not executed by the build, and cannot be run locally either.
Symptoms
Gruntfile.js: the qunit task is commented out of the build task (//"qunit", line 282), which is what the Maven build runs (frontend-maven-plugin → grunt build). It is still listed in build-dev, but that task is not used by CI.
Running it directly fails:
$ ./node/node node_modules/grunt-cli/bin/grunt qunit
Running "qunit:all" (qunit) task
Testing target/test/qunit.html
>> PhantomJS timed out, possibly due to:
>> - QUnit is not loaded correctly.
>> - A missing QUnit start() call.
>> - Or, a misconfiguration of this task.
Warning: 1 tests completed with 1 failed, 0 skipped, and 0 todo.
The toolchain is grunt-contrib-qunit 1.3.0 + phantomjs-prebuilt (package.json); PhantomJS has been unmaintained since 2018 and does not support the ES2015+ code the app now ships (src/test/js/run.js even carries a Function.prototype.bind polyfill "until upgrade to newer phantomjs").
Consequences
src/test/js/tests/*.js (OpenIGValidatorsTests, TransformServiceTests, DataFilterTests, getLoggedUser) give no signal: a regression in any of them is invisible to CI. Concretely, the validator bug fixed in #174 (route ids accepting commas) had a test file right next to it that nobody could run.
Proposed fix
Replace grunt-contrib-qunit 1.x / PhantomJS with a headless-Chrome runner (grunt-contrib-qunit ≥ 3 uses Puppeteer; or drop grunt for tests and run QUnit via qunit CLI / karma).
Make target/test/qunit.html load in that runner (run.js waits for EVENT_APP_INITIALIZED through the full app bootstrap — check that this still completes without a backend, or slim the harness down to the modules under test).
Put qunit back into the build task so mvn verify fails on a JS test failure.
Activity