From 14c9cb5d29915316876a94e49714d0ac3fef95e7 Mon Sep 17 00:00:00 2001 From: Cess Date: Tue, 6 Oct 2020 21:10:04 +0300 Subject: [PATCH] Fixes failing signup system test on travis (#8461) * assert correct request url * check validation text * check the flash includes spam detection exception * assert full spam detection text * remove assertions --- test/system/signup_form_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/system/signup_form_test.rb b/test/system/signup_form_test.rb index c14eda9e53..8b232241fe 100644 --- a/test/system/signup_form_test.rb +++ b/test/system/signup_form_test.rb @@ -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: "abc@publiclab.org")