Remove redundant code to prevent double submission

As mentioned in commit 7f30d0c6, Rails already does it automatically.
This commit is contained in:
Javi Martín
2020-08-13 15:31:38 +02:00
parent 373661025c
commit 38ebfed6ea
5 changed files with 9 additions and 65 deletions

View File

@@ -360,11 +360,9 @@ describe "Commenting debates" do
fill_in "Leave your comment", with: "Testing submit button!"
click_button "Publish comment"
# The button"s text should now be "..."
# This should be checked before the Ajax request is finished
expect(page).not_to have_button "Publish comment"
expect(page).to have_content("Testing submit button!")
expect(page).to have_button "Publish comment", disabled: true
expect(page).to have_content "Testing submit button!"
expect(page).to have_button "Publish comment", disabled: false
end
describe "Moderators" do

View File

@@ -377,11 +377,9 @@ describe "Commenting legislation questions" do
fill_in "Leave your comment", with: "Testing submit button!"
click_button "Publish comment"
# The button's text should now be "..."
# This should be checked before the Ajax request is finished
expect(page).not_to have_button "Publish comment"
expect(page).to have_content("Testing submit button!")
expect(page).to have_button "Publish comment", disabled: true
expect(page).to have_content "Testing submit button!"
expect(page).to have_button "Publish comment", disabled: false
end
describe "Moderators" do

View File

@@ -339,11 +339,9 @@ describe "Commenting legislation questions" do
fill_in "Leave your answer", with: "Testing submit button!"
click_button "Publish answer"
# The button's text should now be "..."
# This should be checked before the Ajax request is finished
expect(page).not_to have_button "Publish answer"
expect(page).to have_content("Testing submit button!")
expect(page).to have_button "Publish answer", disabled: true
expect(page).to have_content "Testing submit button!"
expect(page).to have_button "Publish answer", disabled: false
end
describe "Moderators" do