diff --git a/app/views/proposals/created.html.erb b/app/views/proposals/created.html.erb index 1c9ed9fae..d51e5f1c1 100644 --- a/app/views/proposals/created.html.erb +++ b/app/views/proposals/created.html.erb @@ -13,9 +13,9 @@ <% end %> <% if can?(:publish, @proposal) %> - <%= link_to t("proposals.created.publish"), - publish_proposal_path(@proposal), - method: :patch, class: "button" %> + <%= button_to t("proposals.created.publish"), + publish_proposal_path(@proposal), + method: :patch, class: "button", form_class: "inline" %> <% end %> diff --git a/spec/system/multitenancy_spec.rb b/spec/system/multitenancy_spec.rb index 57777ac15..695cb1a48 100644 --- a/spec/system/multitenancy_spec.rb +++ b/spec/system/multitenancy_spec.rb @@ -53,7 +53,7 @@ describe "Multitenancy", :seed_tenants do expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" expect(page).to have_content "You've created a proposal!" diff --git a/spec/system/proposals_spec.rb b/spec/system/proposals_spec.rb index dc9912e05..fbe86eecd 100644 --- a/spec/system/proposals_spec.rb +++ b/spec/system/proposals_spec.rb @@ -356,7 +356,7 @@ describe "Proposals" do expect(page).to have_content "Help refugees" expect(page).not_to have_content "You can also see more information about improving your campaign" - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" expect(page).to have_content "Improve your campaign and get more support" click_link "Not now, go to my proposal" @@ -424,7 +424,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" click_link "Dashboard" @@ -450,7 +450,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_css "h1", exact_text: "Help refugees" @@ -481,7 +481,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_content "Testing an attack" @@ -504,7 +504,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_content "Testing auto link" @@ -528,7 +528,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_content "Testing auto link" @@ -568,7 +568,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" within "#geozone" do @@ -613,7 +613,7 @@ describe "Proposals" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" within "#geozone" do diff --git a/spec/system/tags/proposals_spec.rb b/spec/system/tags/proposals_spec.rb index f87f41be3..240bb7c22 100644 --- a/spec/system/tags/proposals_spec.rb +++ b/spec/system/tags/proposals_spec.rb @@ -74,7 +74,7 @@ describe "Tags" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_content "Economía" @@ -99,7 +99,7 @@ describe "Tags" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_css "h1", exact_text: "Help refugees" @@ -144,7 +144,7 @@ describe "Tags" do click_button "Create proposal" expect(page).to have_content "Proposal created successfully." - click_link "No, I want to publish the proposal" + click_button "No, I want to publish the proposal" click_link "Not now, go to my proposal" expect(page).to have_content "user_id1"