chromaui / chromatic-e2e

Archive end-to-end tests to be replayed in Storybook and Chromatic
MIT License
21 stars 4 forks source link

Fix mapping of CSS URLs #33

Closed tevanoff closed 10 months ago

tevanoff commented 11 months ago

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 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

Change Type

📦 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 ```
thafryer commented 10 months ago

:rocket: PR was released in v0.0.37 :rocket: