Reputation: 39
Using Rails 5.1.2 Creating a system test and using the take_screenshot method.
How do i change the location these screenshots are created at?
Upvotes: 1
Views: 286
Reputation: 22731
If you want to do this on CI, here's the solution I came up with. In my setup I already had a "test-runner.sh" script, with the rspec invocation at the end. There's probably also some sort of after_script:
setting in the yml config also available, but I didn't look into it.
rspec ......
status=$?
# /tmp/test-results is where CircleCI looks for "artifacts" which it makes
# available for download after a test run
[ -d "tmp/screenshots" ] && cp -a tmp/screenshots /tmp/test-results/
exit $status
Upvotes: 0
Reputation: 11035
Looks like the image path is hardcoded in, so you won't be able to change it currently. Probably wouldn't be too difficult to change if you wanted to open an issue over there or create a pull request for them.
Upvotes: 1