Allow 3rd parties to configure the ARTIFACTS_PATH defined in the custom e2e test environment configured at jest-environment-puppeteer #34797
Labels
[Package] E2E Tests
/packages/e2e-tests
[Type] Help Request
Help with setup, implementation, or "How do I?" questions.
What problem does this address?
I'm in the process of upgrading my testing suites (which use
@wordpress/scripts
for e2e testing) to stop using jasmine in favor of jest-cicrus for the test runner. I had implemented a screenshot reporter that takes screenshots when a spec fails and uploads them to an s3 bucket.Since
@wordpress/scripts
v16.0.0 this functionality is redundant as of the introduction of the same functionality (but a bit better with the HTML included, thanks <3).For my current process I store the screenshots in a custom directory (for my projects it's
tmp/e2e-screenshots
in the root of the project). I'd like to completely remove my custom reporter in favor of the one in the jest-puppeteer-environment/index.js, but in doing so I'll have to update several repos to.gitignore
theartifacts/
dir and additionally rework our existing CI tooling to upload to s3 from a new directory. None of this is a huge deal but...What is your proposed solution?
If the
ARTIFACTS_PATH
was configurable, say through an ENV var, I wouldn't have to update much and could, instead, just pass a new path in a bootstrap file (shared between my projects), more precisely, I'd propose:gutenberg/packages/scripts/config/jest-environment-puppeteer/index.js
Line 46 in e48adc4
be converted to:
I've tested this locally on my projects and it satisfies my request without breaking anything. If this seems like an acceptable addition I'd be happy to submit a PR.
Thanks!
The text was updated successfully, but these errors were encountered: