diff --git a/app/views/admin/poll/booths/_booth.html.erb b/app/views/admin/poll/booths/_booth.html.erb index 921361c4a..6bef50aae 100644 --- a/app/views/admin/poll/booths/_booth.html.erb +++ b/app/views/admin/poll/booths/_booth.html.erb @@ -10,7 +10,8 @@ <%= link_to t("admin.booths.booth.shifts"), new_admin_booth_shift_path(booth), class: "button hollow" %> - <%= link_to t("admin.actions.edit"), + <% else %> + <%= link_to t("admin.booths.booth.edit"), edit_admin_booth_path(booth), class: "button hollow" %> <% end %> diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 442c93727..69f388887 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -664,6 +664,7 @@ en: location: "Location" booth: shifts: "Manage shifts" + edit: "Edit booth" officials: edit: destroy: Remove 'Official' status diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 5b6393b1b..dca6c123f 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -666,6 +666,7 @@ es: location: "Ubicación" booth: shifts: "Asignar turnos" + edit: "Editar urna" officials: edit: destroy: Eliminar condición de 'Cargo Público' diff --git a/spec/features/admin/poll/booths_spec.rb b/spec/features/admin/poll/booths_spec.rb index 22b77b397..4eeb81cb6 100644 --- a/spec/features/admin/poll/booths_spec.rb +++ b/spec/features/admin/poll/booths_spec.rb @@ -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_incoming_poll.name expect(page).to_not have_content booth_for_expired_poll.name + expect(page).to_not have_link "Edit booth" end scenario 'Show' do @@ -91,10 +92,11 @@ feature 'Admin booths' do booth = create(:poll_booth) assignment = create(:poll_booth_assignment, poll: poll, booth: booth) - visit available_admin_booths_path + visit admin_booths_path within("#booth_#{booth.id}") do - click_link "Edit" + expect(page).to_not have_link "Manage shifts" + click_link "Edit booth" end fill_in "poll_booth_name", with: "Next booth"