2011-06-29 12:00:26 +00:00
|
|
|
When /^I follow image link "([^"]*)"$/ do |img_alt|
|
|
|
|
find(:xpath, "//img[@alt = '#{img_alt}']/parent::a").click()
|
2011-07-04 13:25:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
Then /^I should get a download with the filename "([^\"]*)"$/ do |filename|
|
|
|
|
page.response_headers['Content-Disposition'].should include("filename=\"#{filename}\"")
|
2011-06-29 12:00:26 +00:00
|
|
|
end
|