chromaui / chromatic-e2e

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

Consolidate asset path modifications and mappings #28

Closed tevanoff closed 11 months ago

tevanoff commented 11 months ago

Issue: AP-3777 & AP-3725

What Changed

This takes a different approach for fixing issues with asset paths and mapping them to the captured DOM. The most notable change is that the file paths are modified and the source map created when iterating through the captured archive files in write-archive. This only happens once, no matter how many times takeArchive is called, and it does away with the need for the first DOM traversal.

Additionally, all the asset path modifications -- truncation, query string encoding, adding an extension, etc -- have been consolidated into one class.

How to test

Change Type

📦 Published PR as canary version: 0.0.32--canary.28.47c0c67.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/test-archiver@0.0.32--canary.28.47c0c67.0 # or yarn add @chromaui/test-archiver@0.0.32--canary.28.47c0c67.0 ```
thafryer commented 11 months ago

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