Makes capybara exact. Should fix some randomly-failing specs
This commit is contained in:
@@ -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
|
||||
end
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -22,5 +22,6 @@ RSpec.configure do |config|
|
||||
end
|
||||
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
Capybara.exact = true
|
||||
|
||||
OmniAuth.config.test_mode = true
|
||||
|
||||
Reference in New Issue
Block a user