From b9bd121655ad9b775a8c577658c643769feb77af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Fuentes?= Date: Thu, 15 Mar 2018 10:29:42 +0100 Subject: [PATCH] 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 --- spec/features/officing_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/features/officing_spec.rb b/spec/features/officing_spec.rb index 889dfa902..b2ead66f2 100644 --- a/spec/features/officing_spec.rb +++ b/spec/features/officing_spec.rb @@ -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'