Not display :year_of_birth when :date_of_birth is present

This commit is contained in:
taitus
2019-04-25 16:29:02 +02:00
committed by Javi Martín
parent 3e383d7c1f
commit 230d1a4e9d
2 changed files with 21 additions and 3 deletions

View File

@@ -149,6 +149,21 @@ describe "Residence", :with_frozen_time do
expect(page).not_to have_css("#residence_postal_code")
end
scenario "with all custom census not display year_of_birth" do
Setting["remote_census.request.date_of_birth"] = "some.value"
Setting["remote_census.request.postal_code"] = "some.value"
within("#side_menu") do
click_link "Validate document"
end
expect(page).to have_css("#residence_document_type")
expect(page).to have_css("#residence_document_number")
expect(page).to have_content("Date of birth")
expect(page).to have_css("#residence_postal_code")
expect(page).not_to have_css("#residence_year_of_birth")
end
end
scenario "can verify voter with date_of_birth and postal_code fields" do