diff --git a/spec/features/admin/officials_spec.rb b/spec/features/admin/officials_spec.rb index e57da3c03..926f6681e 100644 --- a/spec/features/admin/officials_spec.rb +++ b/spec/features/admin/officials_spec.rb @@ -29,7 +29,7 @@ feature 'Admin officials' do expect(page).to have_content @official.email fill_in 'user_official_position', with: 'School Teacher' - select '3', from: 'user_official_level' + select '3', from: 'user_official_level', exact: false click_button 'Update User' expect(page).to have_content 'Official position saved!' @@ -52,7 +52,7 @@ feature 'Admin officials' do click_link @citizen.name fill_in 'user_official_position', with: 'Hospital manager' - select '4', from: 'user_official_level' + select '4', from: 'user_official_level', exact: false click_button 'Update User' expect(page).to have_content 'Official position saved!' @@ -75,4 +75,4 @@ feature 'Admin officials' do expect(page).to_not have_content @citizen.name expect(page).to_not have_content @official.name end -end \ No newline at end of file +end diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb index c40863534..3761e2679 100644 --- a/spec/features/comments_spec.rb +++ b/spec/features/comments_spec.rb @@ -31,7 +31,7 @@ feature 'Comments' do expect(page).to have_content("1") expect(page).to have_content("2") expect(page).to_not have_content("3") - click_link "Next" + click_link "Next", exact: false end expect(page).to have_css('.comment', count: 2) diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index f6e07b844..4d56817b6 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -28,7 +28,7 @@ feature 'Debates' do expect(page).to have_content("1") expect(page).to have_content("2") expect(page).to_not have_content("3") - click_link "Next" + click_link "Next", exact: false end expect(page).to have_selector('#debates .debate', count: 2) diff --git a/spec/features/organizations_spec.rb b/spec/features/organizations_spec.rb index dcbaaab51..a710b0646 100644 --- a/spec/features/organizations_spec.rb +++ b/spec/features/organizations_spec.rb @@ -32,7 +32,7 @@ feature 'Organizations' do scenario 'Shared links' do visit new_user_registration_path - expect(page).to have_link "Sign up as an organization" + expect(page).to have_link "Sign up as an organization / collective" visit new_organization_registration_path expect(page).to have_link "Sign up" diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index c2f5db0fe..b0257d60c 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -22,5 +22,6 @@ RSpec.configure do |config| end Capybara.javascript_driver = :poltergeist +Capybara.exact = true OmniAuth.config.test_mode = true