diff --git a/spec/features/officing/results_spec.rb b/spec/features/officing/results_spec.rb index 1d67cc1a6..75735a497 100644 --- a/spec/features/officing/results_spec.rb +++ b/spec/features/officing/results_spec.rb @@ -16,6 +16,7 @@ feature "Officing Results", :with_frozen_time do create(:poll_question_answer, title: "Tomorrow", question: @question_2) login_as(@poll_officer.user) + set_officing_booth(@officer_assignment.booth) end scenario "Only polls where user is officer for results are accessible" do @@ -32,8 +33,6 @@ feature "Officing Results", :with_frozen_time do expect(page).to have_content("Poll officing") - set_officing_booth(@officer_assignment.booth) - within("#side_menu") do click_link "Total recounts and results" end diff --git a/spec/features/officing/voters_spec.rb b/spec/features/officing/voters_spec.rb index 1e39ec2d7..924096f82 100644 --- a/spec/features/officing/voters_spec.rb +++ b/spec/features/officing/voters_spec.rb @@ -12,13 +12,12 @@ feature "Voters" do create(:poll_shift, officer: officer, booth: booth, date: Date.current, task: :vote_collection) booth_assignment = create(:poll_booth_assignment, poll: poll, booth: booth) create(:poll_officer_assignment, officer: officer, booth_assignment: booth_assignment) + set_officing_booth(booth) end scenario "Can vote", :js do create(:poll_officer_assignment, officer: officer) - officer_assignment = create(:poll_officer_assignment, officer: officer) - set_officing_booth(officer_assignment.booth) visit new_officing_residence_path officing_verify_residence @@ -40,11 +39,10 @@ feature "Voters" do scenario "Already voted", :js do poll2 = create(:poll, :current) booth_assignment = create(:poll_booth_assignment, poll: poll2, booth: booth) - officer_assignment = create(:poll_officer_assignment, officer: officer, booth_assignment: booth_assignment) + create(:poll_officer_assignment, officer: officer, booth_assignment: booth_assignment) user = create(:user, :level_two) voter = create(:poll_voter, poll: poll, user: user) - set_officing_booth(officer_assignment.booth) visit new_officing_voter_path(id: voter.user.id)