diff --git a/spec/system/admin/site_customization/pages_spec.rb b/spec/system/admin/site_customization/pages_spec.rb index ff9039c37..63ea0c8d4 100644 --- a/spec/system/admin/site_customization/pages_spec.rb +++ b/spec/system/admin/site_customization/pages_spec.rb @@ -14,13 +14,13 @@ describe "Admin custom pages", :admin do slugs = %w[accessibility conditions faq privacy welcome_not_verified welcome_level_two_verified welcome_level_three_verified] - visit admin_site_customization_pages_path - expect(SiteCustomization::Page.count).to be 7 slugs.each do |slug| expect(SiteCustomization::Page.find_by(slug: slug).status).to eq "published" end + visit admin_site_customization_pages_path + expect(all("[id^='site_customization_page_']").count).to be 7 slugs.each do |slug| expect(page).to have_content slug diff --git a/spec/system/officing/residence_spec.rb b/spec/system/officing/residence_spec.rb index db9e30353..9ccee04ed 100644 --- a/spec/system/officing/residence_spec.rb +++ b/spec/system/officing/residence_spec.rb @@ -114,14 +114,15 @@ describe "Residence", :with_frozen_time do context "With remote census configuration", :remote_census do before do create(:poll_officer_assignment, officer: officer) - login_through_form_as_officer(officer.user) - visit officing_root_path end describe "Display form fields according to the remote census configuration" do scenario "by default (without custom census) not display date_of_birth and postal_code" do Setting["feature.remote_census"] = false + login_through_form_as_officer(officer.user) + visit officing_root_path + within("#side_menu") do click_link "Validate document" end @@ -134,6 +135,9 @@ describe "Residence", :with_frozen_time do end scenario "with all custom census not display year_of_birth" do + login_through_form_as_officer(officer.user) + visit officing_root_path + within("#side_menu") do click_link "Validate document" end @@ -149,6 +153,9 @@ describe "Residence", :with_frozen_time do scenario "can verify voter with date_of_birth and postal_code fields" do mock_valid_remote_census_response + login_through_form_as_officer(officer.user) + visit officing_root_path + within("#side_menu") do click_link "Validate document" end