#9329 Azure test: WebUI_Unit_Tests are failing
Closed: fixed by frenaud. Opened by frenaud.

The azure pipeline is failing for WebUI_Unit_Tests. See for instance in PR #6688

Logs available at https://dev.azure.com/freeipa/dd9bf4ec-d636-4558-8f6e-ee17af87f33b/_apis/build/builds/12473/logs/396:

Running WebUI unit tests
sed                     \
    -e 's|@API_VERSION[@]|2.251|g'      \
    -e 's|@NUM_VERSION[@]|41100|g'      \
Loading "Gruntfile.js" tasks...OK
+ test
Running tasks: test
Running "test" task
Running "qunit_junit" task
Options: dest="_build/test-reports", fileNamer=undefined, classNamer=undefined, testNamer=undefined
>> XML reports will be written to _build/test-reports
Running "qunit" task
Running "qunit:all" (qunit) task
Verifying property qunit.all exists in config...OK
Files: test/all_tests.html -> all
Options: timeout=5000, inject="/__w/1/s/install/ui/node_modules/grunt-contrib-qunit/chrome/bridge.js", urls=[], force=false, console, httpBase=false, summaryOnly=false
Testing test/all_tests.html 
Access to XMLHttpRequest at 'file:///__w/1/s/install/ui/test/qunit.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, https, chrome-untrusted.
Failed to load resource: net::ERR_FAILED
Access to XMLHttpRequest at 'file:///__w/1/s/install/ui/test/data/i18n_messages.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, https, chrome-untrusted.
Failed to load resource: net::ERR_FAILED
>> Error: Error: Couldn't receive translations
>>     at file:///__w/1/s/install/ui/js/freeipa/translations.js:67:11
>>     at runFactory (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:17157)
>>     at execModule (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19541)
>>     at execModule (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19369)
>>     at execModule (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19369)
>>     at execModule (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19369)
>>     at execModule (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19369)
>>     at execModule (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19369)
>>     at file:///__w/1/s/install/ui/js/dojo/dojo.js:1:20002
>>     at guardCheckComplete (file:///__w/1/s/install/ui/js/dojo/dojo.js:1:19707)
Writing _build/test-reports/TEST-all_tests.xml...OK
>> Chrome timed out, possibly due to:
>> - QUnit is not loaded correctly.
>> - A missing QUnit start() call.
>> - Or, a misconfiguration of this task.
>> There was an error with headless chrome
Fatal error: test/all_tests.html
##[error]Bash exited with code '1'.
    Finishing: WebUI Unit Tests

I faced this issue on GHA:
https://github.com/stanislavlevin/freeipa/commit/1ac8143cc1c325128de75827929ef0ee35ebe013

Let's see if it helps:
https://github.com/freeipa/freeipa/pull/6690

master:

  • 5c35405e78cc5cf00f824acde1c5cf85d685a306 tests: webui: Allow file access from files in tests
  • a7e13f9719223f04ed1bceb7c7c91d5a04a7d761 tests: webui: Load qunit only once
  • 8d634d8abf296f52b5c348e582c19bb4bdce2983 AP: webui: List installed nodejs packages
  • 64fa6b7241eec2547b2c427fbdb9225cf9153721 tests: webui: Update vendored qunit

ipa-4-9:

  • a9f29047ab352757ddfeb5cda9701fee0a06032a tests: webui: Allow file access from files in tests
  • 958a3958b4835fc2454e8bd71797638dcef9c460 tests: webui: Load qunit only once
  • 1ec521d9aea95fa212f3a8acf966a9eca32c257f AP: webui: List installed nodejs packages
  • 9b15dca6095a44589c55aa6f8ef8c7646341d4d8 tests: webui: Update vendored qunit

ipa-4-10:

  • 450e78f5f3be3064d7ee1c6be5103dfae2ebaf87 tests: webui: Allow file access from files in tests
  • 425cad6f114c981bfe41a30c7ad626164ac29be4 tests: webui: Load qunit only once
  • 8fe8b262232ce65dddea8c92838200a1c5121f13 AP: webui: List installed nodejs packages
  • 9b8e8edc22ade3027a5c3da487783f598e0732fd tests: webui: Update vendored qunit

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata