add testcode and delete capybara logic