Hi all,
The following tests are successful if I run either alone, but when I run both, the second one fails. I use database_cleaner and this is my first time experiencing this despite running js:true tests in other parts of my app:
require 'spec_helper'
feature 'Users can manage profiles' do
scenario "User can unsubscribe from email notifications", js:true do
sign_in_default
click_view_profile_link
click_edit_profile #this initiates a modal
find('#user_receive_notifications').should be_checked
find('#user_receive_notifications').set false
click_button('Update')
click_view_profile_link
click_edit_profile
find('#user_receive_notifications').should_not be_checked # this fails if I run this test second
end
scenario "User can update his bio", js:true do
sign_in_default
click_view_profile_link
find('[data-role="bio_content"]').should have_content('')
click_edit_profile
fill_in 'user_note', :with => 'Updated bio' #Only types in "U" before submitting
click_button('Update')
click_view_profile_link
find('[data-role="bio_content"]').should have_content('Updated bio') # this fails if I run this test second
end
Any ideas? Thank you