Rewriting tests to fit capybara syntax