- Your experience implementing
I chose to feature test by using webkit. Adding wait for ajax and database cleaner was relatively painless. Lot's of small issues, but once I got the syntax right and in the right place it was fine.
- Were you successful?
I was successfull
- Links to commits on Github or copy and pasted code snippits of a test
require "rails_helper"
feature "user can add idea", :js => true do
scenario "the page displays the idea" do
visit "/"
expect(page).to_not have_content("Cool Title")
expect(page).to_not have_content("Cool Body")
expect(page).to have_selector('li', count: 0)
fill_in 'Title', with: "Cool Title"
fill_in 'Body', with: "Cool Body"
click_on('Save')
wait_for_ajax
expect(page).to have_content('Cool Title')
expect(page).to have_content('Cool Body')
expect(page).to have_selector('li', count: 1)
end
end