Skip to content

Commit 6ec7887

Browse files
webui: Disable web security in tests
Fixes webui tests on AP: ``` 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. Related: https://pagure.io/freeipa/issue/9329 Signed-off-by: Stanislav Levin <[email protected]>
1 parent 8d92546 commit 6ec7887

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

install/ui/Gruntfile.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ module.exports = function(grunt) {
44
options: {}
55
},
66
qunit: {
7+
options: {
8+
puppeteer: {
9+
ignoreDefaultArgs: true,
10+
args: [
11+
"--headless",
12+
"--disable-web-security"
13+
]
14+
},
15+
},
716
all: [
817
'test/all_tests.html'
918
]

0 commit comments

Comments
 (0)