mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Merge branch 'main' into 2481-landing-page-standalone-without-api
This commit is contained in:
@@ -20,14 +20,14 @@ def test_owasp_useful_headers_set(
|
||||
assert search(
|
||||
r"script-src 'self' static\.example\.com 'unsafe-eval' https:\/\/js-agent\.new"
|
||||
r"relic\.com https:\/\/gov-bam\.nr-data\.net https:\/\/www\.googletagmanager\."
|
||||
r"com https:\/\/www\.google-analytics\."
|
||||
r"com https:\/\/dap\.digitalgov\."
|
||||
r"gov 'nonce-.*';",
|
||||
r"com https:\/\/www\.google-analytics\.com https:\/\/dap\.digitalgov\.gov "
|
||||
r"https:\/\/cdn\.socket\.io",
|
||||
csp,
|
||||
)
|
||||
assert search(r"'nonce-[^']+';", csp)
|
||||
assert search(
|
||||
r"connect-src 'self' https:\/\/gov-bam.nr-data\.net https:\/\/www\.google-analytics\."
|
||||
r"com;",
|
||||
r"connect-src 'self' https:\/\/gov-bam\.nr-data\.net https:\/\/www\.google-analytics\."
|
||||
r"com http:\/\/localhost:6011 ws:\/\/localhost:6011;",
|
||||
csp,
|
||||
)
|
||||
assert search(r"style-src 'self' static\.example\.com 'nonce-.*';", csp)
|
||||
|
||||
@@ -18,6 +18,12 @@ Object.defineProperty(HTMLElement.prototype, 'clientWidth', {
|
||||
});
|
||||
|
||||
// beforeAll hook to set up the DOM and load D3.js script
|
||||
beforeAll(() => {
|
||||
jest.spyOn(Intl, 'DateTimeFormat').mockImplementation(() => ({
|
||||
resolvedOptions: () => ({ timeZone: 'UTC' })
|
||||
}));
|
||||
});
|
||||
|
||||
beforeAll(done => {
|
||||
// Set up the DOM with the D3 script included
|
||||
document.body.innerHTML = `
|
||||
|
||||
Reference in New Issue
Block a user