-
Notifications
You must be signed in to change notification settings - Fork 10
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
Upgrade USWDS to 3.8.0 #10333
Comments
Wow, this was bizarre. The issue has nothing to do with any of the things listed above. After some trial and error, I discovered the root of the problem is that there are new SVG icons bundled with USWDS that are interfering with how Cypress injects styles into the DOM snapshots. Here is an example of such an SVG icon: The When I clean these SVGs up using svgo, the Cypress snapshot issues are resolved. One way to fix this issue, then, is to use svgo, which is already a dependency of uswds, and clean up the images upon
where the && portion is new. I've verified this works locally. I am not yet sure this is the best solution. |
I opened an issue with USDWS ("Clean up your SVGs, please!") and will ask the team if they have a better solution than the one I posted above. |
A quick finding: While everything I said above still holds, I have been investigating what is happening on our end (e.g., when we bundle) that might be contributing to the issue (i.e., trying to answer the question "why are there not more reports of this error from other teams?"). Somehow, it seems the issue with Cypress styles and these SVGs has to do with the fact that they are loaded inline via our esbuild:
If I switch from |
Still waiting on USWDS, but there has been an update. |
Finally, an update!: uswds/uswds#6011. Looks like we should be able to update when they next release. |
Acceptance Criteria
Pain Avoided/Frustration Saved
Breadth/Pervasiveness of Problem
Complexity of Problem (Low, Medium, High) and Why it's Complex
Notes
The text was updated successfully, but these errors were encountered: