mattheworiordan / capybara-screenshot

Automatically save screen shots when a Capybara scenario fails
MIT License
1.02k stars 168 forks source link

Fix embedding screenshots into cucumber HTML reports #288

Closed vojtad closed 2 years ago

vojtad commented 2 years ago

This PR fixes embedding screenshots using #attach method into Cucumber HTML reports for Cucumber v4+.

#attach method automatically encodes data using base64 encoding. Without this PR data are encoded twice and embedded screenshots don't work.

This should also fix #279 because #attach handles setting the right type for attached data.

andrii-rymar commented 2 years ago

I confirm it fixes #279

mattheworiordan commented 2 years ago

Thanks, I appreciate the contribution. I will merge shortly and do a release.