Allows users to specify which external (to the site being tested) domains whose resources will be archived. This is done by specifying the allowedArchiveDomains value in the user's playwright.config.js file.
I've updated the calling code from Cypress to still work, but it doesn't pass this config option through yet.
I've also inlined more of the test's expected values, both to limit how much test-specific logic we have and to make it more explicit what the test expects.
How it works
We now (internally) make note of what URL the test is being run against. We then compare URLs against our external-domain-allow-list and archive resources from the origins that match.
When archiving other-domain URLs, we prepend their file path with the host.
How to test
Use this version of the package in your Playwright test
Create a test that references multiple assets (like images) from another domain
In the playwright.config.js file, specify one of these domains
Run npx playwright test
Verify that the asset at this domain has been archived
Run archive-storybook
Verify that the asset loads in as expected
Change Type
[ ] maintenance
[ ] documentation
[x] patch
[ ] minor
[ ] major
📦 Published PR as canary version: 0.0.39--canary.37.88cfa0f.0
:sparkles: Test out this PR locally via:
```bash
npm install @chromaui/test-archiver@0.0.39--canary.37.88cfa0f.0
# or
yarn add @chromaui/test-archiver@0.0.39--canary.37.88cfa0f.0
```
Issue: #CAP-1124
What Changed
Allows users to specify which external (to the site being tested) domains whose resources will be archived. This is done by specifying the
allowedArchiveDomains
value in the user'splaywright.config.js
file.I've updated the calling code from Cypress to still work, but it doesn't pass this config option through yet.
I've also inlined more of the test's expected values, both to limit how much test-specific logic we have and to make it more explicit what the test expects.
How it works
We now (internally) make note of what URL the test is being run against. We then compare URLs against our external-domain-allow-list and archive resources from the origins that match.
When archiving other-domain URLs, we prepend their file path with the host.
How to test
playwright.config.js
file, specify one of these domainsnpx playwright test
archive-storybook
Change Type
maintenance
documentation
patch
minor
major
📦 Published PR as canary version:
0.0.39--canary.37.88cfa0f.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/test-archiver@0.0.39--canary.37.88cfa0f.0 # or yarn add @chromaui/test-archiver@0.0.39--canary.37.88cfa0f.0 ```