diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index a9755e38e..60bfe0fb0 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -442,6 +442,14 @@ .button { font-weight: bold; } + + button { + cursor: pointer; + + &:hover { + text-decoration: underline; + } + } } .community-poll { diff --git a/app/views/dashboard/polls/_poll.html.erb b/app/views/dashboard/polls/_poll.html.erb index 26fe74c28..4c3eca69d 100644 --- a/app/views/dashboard/polls/_poll.html.erb +++ b/app/views/dashboard/polls/_poll.html.erb @@ -27,10 +27,10 @@ <% end %>
<%= t("dashboard.polls.poll.show_results_help") %>
- <%= link_to t("dashboard.polls.poll.delete"), - proposal_dashboard_poll_path(proposal, poll), - method: :delete, - "data-confirm": t("dashboard.polls.poll.alert_notice"), - class: "delete" %> + <%= button_to t("dashboard.polls.poll.delete"), + proposal_dashboard_poll_path(proposal, poll), + method: :delete, + "data-confirm": t("dashboard.polls.poll.alert_notice"), + class: "delete" %> diff --git a/spec/system/dashboard/polls_spec.rb b/spec/system/dashboard/polls_spec.rb index 0f7d3d61b..0620cdcf3 100644 --- a/spec/system/dashboard/polls_spec.rb +++ b/spec/system/dashboard/polls_spec.rb @@ -199,7 +199,7 @@ describe "Polls" do visit proposal_dashboard_polls_path(proposal) within("#poll_#{poll.id}") do - accept_confirm { click_link "Delete survey" } + accept_confirm { click_button "Delete survey" } end expect(page).to have_content("Survey deleted successfully") @@ -214,7 +214,7 @@ describe "Polls" do visit proposal_dashboard_polls_path(proposal) within("#poll_#{poll.id}") do - accept_confirm { click_link "Delete survey" } + accept_confirm { click_button "Delete survey" } end expect(page).to have_content("You cannot destroy a survey that has responses")