Replace link with button in Proposal created

This commit is contained in:
cyrillefr
2025-04-16 11:51:18 +02:00
parent ddd34d5cd0
commit d4b7939d2c
4 changed files with 15 additions and 15 deletions

View File

@@ -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 %>
</div>
</div>

View File

@@ -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!"

View File

@@ -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

View File

@@ -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"