diff --git a/packages/components/cypress/support/e2e.ts b/packages/components/cypress/support/e2e.ts index f7cc1d7f63..c066d64926 100644 --- a/packages/components/cypress/support/e2e.ts +++ b/packages/components/cypress/support/e2e.ts @@ -27,3 +27,17 @@ Cypress.on('uncaught:exception', err => { return false; } }); + +// cypress is inserting scripts into the html file to execute its tests, but the script is blocked by the csp, so we remove the csp for the tests. +beforeEach(() => { + cy.intercept('/*', (req) => { + req.continue((res) => { + if (res.headers['content-type'] && res.headers['content-type'].includes('text/html')) { + res.body = res.body.replace( + //g, + '' + ); + } + }) + }) +}) \ No newline at end of file diff --git a/packages/documentation/.storybook/preview-head.html b/packages/documentation/.storybook/preview-head.html index 4499ef2eed..1ac0516b03 100644 --- a/packages/documentation/.storybook/preview-head.html +++ b/packages/documentation/.storybook/preview-head.html @@ -11,10 +11,24 @@ - + +