Read more

Capybara: A step for finding images with filename and extension

Emanuel
January 05, 2018Software engineer at makandra GmbH

This cucumber step is useful for testing an image (looking at the src of the image).

Then(/^I should see the image "([^"]*)"$/) do |filename_with_extension|
  expect(page).to have_css("img[src*='#{filename_with_extension}']")
end
Then I should see the image "placeholder.png"

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Outline: Read more about how to test a uploaded file here, e.g. file downloads.

Posted by Emanuel to makandra dev (2018-01-05 09:56)