add capybara test, use macros and shared examples