diff --git a/app/views/dashboard/show.html.erb b/app/views/dashboard/show.html.erb
index f698f1ca1..d76cd9f7b 100644
--- a/app/views/dashboard/show.html.erb
+++ b/app/views/dashboard/show.html.erb
@@ -13,8 +13,9 @@
<% end %>
<% if can?(:publish, proposal) %>
- <%= link_to t("dashboard.index.publish"),
- publish_proposal_dashboard_path(proposal),
- class: "button success",
- method: :patch %>
+ <%= button_to t("dashboard.index.publish"),
+ publish_proposal_dashboard_path(proposal),
+ class: "button success",
+ form_class: "button_to inline",
+ method: :patch %>
<% end %>
diff --git a/spec/system/dashboard/dashboard_spec.rb b/spec/system/dashboard/dashboard_spec.rb
index b318c1dc7..379478cec 100644
--- a/spec/system/dashboard/dashboard_spec.rb
+++ b/spec/system/dashboard/dashboard_spec.rb
@@ -10,17 +10,17 @@ describe "Proposal's dashboard" do
expect(page).to have_link("Edit my proposal")
expect(page).to have_link("Edit proposal")
expect(page).to have_link("Withdraw proposal")
- expect(page).to have_link("Publish proposal")
+ expect(page).to have_button("Publish proposal")
expect(page).to have_link("Polls")
expect(page).to have_link("E-mail")
expect(page).to have_link("Poster")
end
- scenario "Publish link dissapears after proposal's publication" do
+ scenario "Publish button dissapears after proposal's publication" do
visit proposal_dashboard_path(proposal)
- click_link "Publish proposal"
+ click_button "Publish proposal"
- expect(page).not_to have_link("Publish proposal")
+ expect(page).not_to have_button("Publish proposal")
end
scenario "Dashboard progress shows current goal" do