You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to start using embedded images because I like the idea of not have screenshots building up everywhere. However when using this code I ran into a problem with the feature template.
This works for me but it would be nice if instead of appending the images/ to everything in the features template it was appended in the HTML file here with the scenario image file name.
def embed(src, mime_type, label)
case(mime_type)
when /^image\/(png|gif|jpg|jpeg)/
embed_image(src, label)
end
end
def embed_image(src, label)
@report.current_scenario.image = src.split(separator).last
@report.current_scenario.image_label = label
@report.current_scenario.image_id = "img_#{@img_id}"
@img_id += 1
filename = "#{File.dirname(@path)}#{separator}images"
FileUtils.cp src, filename
end
It looks as though it would be possible to account for embedded images here and either apply the "images/" to the front or not.
Thanks,
Adam
The text was updated successfully, but these errors were encountered:
I'm going to start using embedded images because I like the idea of not have screenshots building up everywhere. However when using this code I ran into a problem with the feature template.
Based on the feature template the resulting HTML is as follows.
In order to get the embedded image to display I had to remove "images/" from the feature template.
This works for me but it would be nice if instead of appending the images/ to everything in the features template it was appended in the HTML file here with the scenario image file name.
It looks as though it would be possible to account for embedded images here and either apply the "images/" to the front or not.
Thanks,
Adam
The text was updated successfully, but these errors were encountered: