refactor capybara step helper