When we need to rewrite an asset path, we're currently only updating the src attribute on DOM nodes. If an asset loaded from a CSS file or style attribute was rewritten, it will fail to load because the CSS will reference the old path when the snapshot is rendered.
This goes through the contents of style attributes and style elements and replaces any url references as needed.
There's still one empty box in the E2E Storybook due to a missing asset, but that's due to CAP-1194. I believe getting rid of the rrweb fork, which can be a follow up to this, will resolve that.
How to test
Run canary against some test projects
Check out Chromatic build
Change Type
[ ] maintenance
[ ] documentation
[x] patch
[ ] minor
[ ] major
📦 Published PR as canary version: 0.0.37--canary.33.f9c5b5b.0
:sparkles: Test out this PR locally via:
```bash
npm install @chromaui/test-archiver@0.0.37--canary.33.f9c5b5b.0
# or
yarn add @chromaui/test-archiver@0.0.37--canary.33.f9c5b5b.0
```
Issue: CAP-1329
What Changed
When we need to rewrite an asset path, we're currently only updating the
src
attribute on DOM nodes. If an asset loaded from a CSS file orstyle
attribute was rewritten, it will fail to load because the CSS will reference the old path when the snapshot is rendered.This goes through the contents of
style
attributes andstyle
elements and replaces anyurl
references as needed.There's still one empty box in the E2E Storybook due to a missing asset, but that's due to CAP-1194. I believe getting rid of the rrweb fork, which can be a follow up to this, will resolve that.
How to test
Change Type
maintenance
documentation
patch
minor
major
📦 Published PR as canary version:
0.0.37--canary.33.f9c5b5b.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/test-archiver@0.0.37--canary.33.f9c5b5b.0 # or yarn add @chromaui/test-archiver@0.0.37--canary.33.f9c5b5b.0 ```