Merge pull request #2049 from consul/booth-edit-button

Edit booth button
This commit is contained in:
BertoCQ
2017-10-11 20:32:55 +02:00
committed by GitHub
4 changed files with 8 additions and 3 deletions

View File

@@ -10,7 +10,8 @@
<%= link_to t("admin.booths.booth.shifts"), <%= link_to t("admin.booths.booth.shifts"),
new_admin_booth_shift_path(booth), new_admin_booth_shift_path(booth),
class: "button hollow" %> class: "button hollow" %>
<%= link_to t("admin.actions.edit"), <% else %>
<%= link_to t("admin.booths.booth.edit"),
edit_admin_booth_path(booth), edit_admin_booth_path(booth),
class: "button hollow" %> class: "button hollow" %>
<% end %> <% end %>

View File

@@ -664,6 +664,7 @@ en:
location: "Location" location: "Location"
booth: booth:
shifts: "Manage shifts" shifts: "Manage shifts"
edit: "Edit booth"
officials: officials:
edit: edit:
destroy: Remove 'Official' status destroy: Remove 'Official' status

View File

@@ -666,6 +666,7 @@ es:
location: "Ubicación" location: "Ubicación"
booth: booth:
shifts: "Asignar turnos" shifts: "Asignar turnos"
edit: "Editar urna"
officials: officials:
edit: edit:
destroy: Eliminar condición de 'Cargo Público' destroy: Eliminar condición de 'Cargo Público'

View File

@@ -60,6 +60,7 @@ feature 'Admin booths' do
expect(page).to have_content booth_for_current_poll.name expect(page).to have_content booth_for_current_poll.name
expect(page).to have_content booth_for_incoming_poll.name expect(page).to have_content booth_for_incoming_poll.name
expect(page).to_not have_content booth_for_expired_poll.name expect(page).to_not have_content booth_for_expired_poll.name
expect(page).to_not have_link "Edit booth"
end end
scenario 'Show' do scenario 'Show' do
@@ -91,10 +92,11 @@ feature 'Admin booths' do
booth = create(:poll_booth) booth = create(:poll_booth)
assignment = create(:poll_booth_assignment, poll: poll, booth: booth) assignment = create(:poll_booth_assignment, poll: poll, booth: booth)
visit available_admin_booths_path visit admin_booths_path
within("#booth_#{booth.id}") do within("#booth_#{booth.id}") do
click_link "Edit" expect(page).to_not have_link "Manage shifts"
click_link "Edit booth"
end end
fill_in "poll_booth_name", with: "Next booth" fill_in "poll_booth_name", with: "Next booth"