It's not critical that it follow Capybara.save_path (although it is counterintuitive that it doesn't), but it would be nice if there was some way to configure where these go.
System configuration
Rails version: 6.0.3.5, but 6.1.3.1 (linked above) has the same code (as does main, at least as of this writing)
Steps to reproduce
capybara
andselenium-webdriver
for system tests.Capybara.save_path
to some directory, e.g.ci-artifacts/screenshots
Expected behavior
Actual behavior
tmp/screenshots
Notes
The issue is in ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper#absolute_path, which hard-codes the screenshot directory to
tmp/screenshots
.It's not critical that it follow
Capybara.save_path
(although it is counterintuitive that it doesn't), but it would be nice if there was some way to configure where these go.System configuration
Rails version: 6.0.3.5, but 6.1.3.1 (linked above) has the same code (as does
main
, at least as of this writing)Ruby version: 2.7.2