Posted over 9 years ago. Visible to the public.
Test meta-refresh redirects with Cucumber
The step definition below allows you to write:
CopyThen I should see an HTML redirect to "http://www.makandracards.com" in the page head
Capybara
CopyThen /^I should see an HTML redirect to "([^\"]*)" in the page head$/ do |redirect_url| page.should have_xpath("//meta[@http-equiv=\"refresh\" and contains(@content, \"#{redirect_url}\")]") end
To find meta
tags with Capybara, you can also use page.find('meta', visible: false)
.
Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.