Writes archives to the playwright-created directory (test-results by default, the value of outputDir if specified in the playwright.config.js).
Previously we wrote to the test-archives storybook, putting tests in a timestamped folder and symlinking the latest timestamped folder to /latest. However, if tests didn't all run at the same time, they'd end up in different timestamped folders, thus /latest wouldn't have all of the archives (and thus the storybook wouldn't be complete).
Since the playwright-managed test-results directory is destroyed at the beginning of each test run, we can be sure any archives written there are from the same run.
We put these archives in test-results/chromatic-archives (so the archives aren't rummaged in whatever playwright is creating/reading from at the test-results level).
This needs to release at the same time as the corresponding archive-storybookchange.
How to test
On an e2e project depending on this library:
Create multiple tests in multiple files
Run yarn playwright test
Verify that the archives are written to test-results/chromatic-archives directory
Verify that that folder contains the archives/DOM representations of all the tests
In playwright.config.js, tell Playwright to write test results to a custom directory (outputDiroption)
Run yarn playwright test
Verify that the archives are written to this custom directory instead
Change Type
[ ] maintenance
[ ] documentation
[x] patch
[ ] minor
[ ] major
📦 Published PR as canary version: 0.0.21--canary.17.ec4768b.0
:sparkles: Test out this PR locally via:
```bash
npm install @chromaui/test-archiver@0.0.21--canary.17.ec4768b.0
# or
yarn add @chromaui/test-archiver@0.0.21--canary.17.ec4768b.0
```
What Changed
Writes archives to the playwright-created directory (
test-results
by default, the value ofoutputDir
if specified in theplaywright.config.js
).Previously we wrote to the
test-archives
storybook, putting tests in a timestamped folder and symlinking the latest timestamped folder to/latest
. However, if tests didn't all run at the same time, they'd end up in different timestamped folders, thus/latest
wouldn't have all of the archives (and thus the storybook wouldn't be complete).Since the playwright-managed
test-results
directory is destroyed at the beginning of each test run, we can be sure any archives written there are from the same run.We put these archives in
test-results/chromatic-archives
(so the archives aren't rummaged in whatever playwright is creating/reading from at thetest-results
level).This needs to release at the same time as the corresponding
archive-storybook
change.How to test
On an e2e project depending on this library:
yarn playwright test
test-results/chromatic-archives
directoryplaywright.config.js
, tell Playwright to write test results to a custom directory (outputDir
option)yarn playwright test
Change Type
maintenance
documentation
patch
minor
major
📦 Published PR as canary version:
0.0.21--canary.17.ec4768b.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/test-archiver@0.0.21--canary.17.ec4768b.0 # or yarn add @chromaui/test-archiver@0.0.21--canary.17.ec4768b.0 ```