pest
pest copied to clipboard
[Bug]: Browser test screenshots are not generated (even with `--headed`)
What Happened
When adding a Browser test, no screenshots are generated, even when running with the --headed flag.
Expected: screenshots to appear under tests/Browser/Screenshots.
Actual: no screenshots are saved, and when I manually create tests/Browser/Screenshots, the directory is deleted after running ./vendor/bin/pest.
How to Reproduce
Reproduce on an existing Laravel project or from a fresh starter with nunomaduro/laravel-starter-kit
- Install dependencies and set up Laravel as usual
- Install dependencies and set up Laravel as usual
- run:
npx playwright install
- Run the tests with Pest
-
./vendor/bin/pest; or -
sail pest
- Observe:
- No screenshots are produced in tests/Browser/Screenshots.
- If the Screenshots folder existed beforehand, it gets removed after the run.
Sample Repository
No response
Pest Version
4.1.2
PHP Version
8.4.13
Operation System
macOS
Notes
Environments where I reproduced it:
- Local (host): macOS
- Local (container): Laravel Sail
- CI: GitHub Actions (ubuntu-latest)