Explicitly disable JavaScript with honeypot fields

These fields are hidden for users with a browser supporting CSS and is
only there to fool bots, so we're testing the case of an attack by bots
using browsers with no CSS support.
This commit is contained in:
Javi Martín
2021-03-27 00:49:34 +01:00
parent 38edc51e3f
commit 45f2abcb1c
4 changed files with 4 additions and 4 deletions

View File

@@ -501,7 +501,7 @@ describe "Budget Investments" do
context "Phase I - Accepting" do context "Phase I - Accepting" do
before { budget.update(phase: "accepting") } before { budget.update(phase: "accepting") }
scenario "Create with invisible_captcha honeypot field" do scenario "Create with invisible_captcha honeypot field", :no_js do
login_as(author) login_as(author)
visit new_budget_investment_path(budget) visit new_budget_investment_path(budget)

View File

@@ -219,7 +219,7 @@ describe "Debates" do
expect(page).to have_content I18n.l(Debate.last.created_at.to_date) expect(page).to have_content I18n.l(Debate.last.created_at.to_date)
end end
scenario "Create with invisible_captcha honeypot field" do scenario "Create with invisible_captcha honeypot field", :no_js do
author = create(:user) author = create(:user)
login_as(author) login_as(author)

View File

@@ -22,7 +22,7 @@ describe "Organizations" do
expect(user.organization).not_to be_verified expect(user.organization).not_to be_verified
end end
scenario "Create with invisible_captcha honeypot field" do scenario "Create with invisible_captcha honeypot field", :no_js do
visit new_organization_registration_path visit new_organization_registration_path
fill_in "user_organization_attributes_name", with: "robot" fill_in "user_organization_attributes_name", with: "robot"

View File

@@ -392,7 +392,7 @@ describe "Proposals" do
expect(page).to have_content I18n.l(Proposal.last.created_at.to_date) expect(page).to have_content I18n.l(Proposal.last.created_at.to_date)
end end
scenario "Create with invisible_captcha honeypot field" do scenario "Create with invisible_captcha honeypot field", :no_js do
author = create(:user) author = create(:user)
login_as(author) login_as(author)