Skip to content

Commit

Permalink
gha: webui: Disable web security in tests
Browse files Browse the repository at this point in the history
Fixes webui tests on gha:
```
Testing test/all_tests.html
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
Access to XMLHttpRequest at 'file:///__w/freeipa/freeipa/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, chrome-untrusted, https.
Failed to load resource: net::ERR_FAILED
Access to XMLHttpRequest at 'file:///__w/freeipa/freeipa/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, chrome-untrusted, https.
Failed to load resource: net::ERR_FAILED
>> Error: Error: Couldn't receive translations
```

See gruntjs/grunt-contrib-qunit#158 for details.
  • Loading branch information
stanislavlevin committed Jul 1, 2022
1 parent 6288217 commit 048225b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions install/ui/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ module.exports = function(grunt) {
options: {}
},
qunit: {
options: {
puppeteer: {
ignoreDefaultArgs: true,
args: [
"--headless",
"--disable-web-security"
]
},
},
all: [
'test/all_tests.html'
]
Expand Down

0 comments on commit 048225b

Please sign in to comment.