implemented Capybara testing