|
|
|
@@ -5,7 +5,7 @@ feature "Booth" do
|
|
|
|
scenario "Officer with no booth assignments today" do
|
|
|
|
scenario "Officer with no booth assignments today" do
|
|
|
|
officer = create(:poll_officer)
|
|
|
|
officer = create(:poll_officer)
|
|
|
|
|
|
|
|
|
|
|
|
login_through_form_as(officer.user)
|
|
|
|
login_through_form_as_officer(officer.user)
|
|
|
|
|
|
|
|
|
|
|
|
expect(page).to have_content "You don't have officing shifts today"
|
|
|
|
expect(page).to have_content "You don't have officing shifts today"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@@ -14,7 +14,7 @@ feature "Booth" do
|
|
|
|
officer = create(:poll_officer)
|
|
|
|
officer = create(:poll_officer)
|
|
|
|
create(:poll_officer_assignment, officer: officer, date: 1.day.from_now)
|
|
|
|
create(:poll_officer_assignment, officer: officer, date: 1.day.from_now)
|
|
|
|
|
|
|
|
|
|
|
|
login_through_form_as(officer.user)
|
|
|
|
login_through_form_as_officer(officer.user)
|
|
|
|
|
|
|
|
|
|
|
|
expect(page).to have_content "You don't have officing shifts today"
|
|
|
|
expect(page).to have_content "You don't have officing shifts today"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@@ -28,7 +28,7 @@ feature "Booth" do
|
|
|
|
booth_assignment = create(:poll_booth_assignment, poll: poll, booth: booth)
|
|
|
|
booth_assignment = create(:poll_booth_assignment, poll: poll, booth: booth)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: booth_assignment, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: booth_assignment, date: Date.today)
|
|
|
|
|
|
|
|
|
|
|
|
login_through_form_as(officer.user)
|
|
|
|
login_through_form_as_officer(officer.user)
|
|
|
|
|
|
|
|
|
|
|
|
within("#officing-booth") do
|
|
|
|
within("#officing-booth") do
|
|
|
|
expect(page).to have_content "You are officing the booth located at #{booth.location}."
|
|
|
|
expect(page).to have_content "You are officing the booth located at #{booth.location}."
|
|
|
|
@@ -48,9 +48,8 @@ feature "Booth" do
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba1, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba1, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba2, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba2, date: Date.today)
|
|
|
|
|
|
|
|
|
|
|
|
login_through_form_as(officer.user)
|
|
|
|
login_through_form_as_officer(officer.user)
|
|
|
|
|
|
|
|
|
|
|
|
expect(page).to have_content "You have been signed in successfully."
|
|
|
|
|
|
|
|
expect(page).to have_content "Choose your booth"
|
|
|
|
expect(page).to have_content "Choose your booth"
|
|
|
|
|
|
|
|
|
|
|
|
select booth2.location, from: "booth_id"
|
|
|
|
select booth2.location, from: "booth_id"
|
|
|
|
@@ -78,9 +77,8 @@ feature "Booth" do
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba2, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba2, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba3, date: Date.today)
|
|
|
|
create(:poll_officer_assignment, officer: officer, booth_assignment: ba3, date: Date.today)
|
|
|
|
|
|
|
|
|
|
|
|
login_through_form_as(officer.user)
|
|
|
|
login_through_form_as_officer(officer.user)
|
|
|
|
|
|
|
|
|
|
|
|
expect(page).to have_content "You have been signed in successfully."
|
|
|
|
|
|
|
|
expect(page).to have_content "Choose your booth"
|
|
|
|
expect(page).to have_content "Choose your booth"
|
|
|
|
|
|
|
|
|
|
|
|
expect(page).to have_select("booth_id", options: [booth1.location, booth2.location])
|
|
|
|
expect(page).to have_select("booth_id", options: [booth1.location, booth2.location])
|
|
|
|
|