Added test using have_content before selecting DNI or passport, the existence of the container is assured because have_conten waits for js to finish loading before checking
This commit is contained in:
@@ -152,6 +152,8 @@ feature 'Poll Officing' do
|
||||
expect(page).to have_content("Here you can validate user documents and store voting results")
|
||||
|
||||
visit new_officing_residence_path
|
||||
expect(page).to have_selector('#residence_document_type')
|
||||
|
||||
select 'DNI', from: 'residence_document_type'
|
||||
fill_in 'residence_document_number', with: "12345678Z"
|
||||
fill_in 'residence_year_of_birth', with: '1980'
|
||||
@@ -169,6 +171,8 @@ feature 'Poll Officing' do
|
||||
expect(page).to have_content("Here you can validate user documents and store voting results")
|
||||
|
||||
visit new_officing_residence_path
|
||||
expect(page).to have_selector('#residence_document_type')
|
||||
|
||||
select 'DNI', from: 'residence_document_type'
|
||||
fill_in 'residence_document_number', with: "12345678Y"
|
||||
fill_in 'residence_year_of_birth', with: '1980'
|
||||
|
||||
Reference in New Issue
Block a user