Makes capybara exact. Should fix some randomly-failing specs

This commit is contained in:
kikito
2015-09-02 18:05:43 +02:00
parent c7b44485b3
commit e3cbae4f02
5 changed files with 7 additions and 6 deletions

View File

@@ -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