Skip to content

Commit

Permalink
Fixes failing signup system test on travis (publiclab#8461)
Browse files Browse the repository at this point in the history
* assert correct request url

* check validation text

* check the flash includes spam detection exception

* assert full spam detection text

* remove assertions
  • Loading branch information
cesswairimu authored and reginaalyssa committed Oct 16, 2021
1 parent f358e28 commit 14c9cb5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/system/signup_form_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ def setup

find("#create-form #signup-button").click()
path = URI.parse(current_url).request_uri
assert_equal path, "/register"
assert_equal path, "/signup"
#Searches for error
assert_selector("#error-message #errorExplanation", text: "Email")
# error_msg = find("#errorExplanation li").text.gsub('×', '').strip()

# assert_includes(error_msg, "Spam detection -- It doesn't seem like you are a real person!" )
# assert_selector("#error-message #errorExplanation", text: "Email")
# assert_selector("#errorExplanation li", text: "Spam detection -- It doesn't seem like you are a real person! If you disagree or are having trouble, please see https://publiclab.org/registration-test.")

fill_in("username-signup", with: "abc")
fill_in("email", with: "[email protected]")
Expand Down

0 comments on commit 14c9cb5

Please sign in to comment.