-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests failing due to bug in GTM.js #4
Comments
Fixed by adding check to jest.setup.js for GTM error |
I wanted to fix the build process by preventing errors not raised by locally hosted scripts from propogating, but this wasn't so straightforward so for now I'm leaving it as-is and will come back to it in the future. The tests pass locally |
Not quite sure how to fix this, seems I've opened a question on SO: https://stackoverflow.com/questions/78844702/jest-puppeteer-how-can-i-prevent-javascript-errors-from-third-party-scripts-fro EDIT: Deleted it as it spent more time being pointlessly edited by internet point chasers |
It's passing now, presumably GTM.js has been updated by Google, but to prevent this in the future we'll need to somehow ignore page errors except for self-hosted ones. I've attempted this with a few methods and not got anywhere, javascript errors are baked in as test failures so it's hard to avoid this, even with replacing window.onerror. gov UK design system repo uses request interception to mock response to avoid these kind of issues, which might be what we need to do: |
v0.3.18 CI tests fail due to:
This is a bug in Google Tag Manager's gtm.js:
https://support.google.com/tagmanager/thread/288419928/error-failed-to-execute-getvalue-on-cookiedeprecationlabel?hl=en
Will remove once builds sort themselves out when they presumably push out a fix as it only started happening a few days ago. GTM.js is only used in the sandbox, but we use the sandbox for integration tests.
The text was updated successfully, but these errors were encountered: