Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fixes failing signup system test on travis" #8464

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions test/system/signup_form_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require "application_system_test_case"

class SignupFormTest < ApplicationSystemTestCase
def setup
visit "/"
end

test "the signup form is validated on page reload" do
visit "/signup"

#Signs up with registered email
fill_in("username-signup", with: "abc")
fill_in("email", with: "[email protected]")
fill_in("password1", with: "secretive")
fill_in("password-confirmation", with: "secretive")

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

fill_in("username-signup", with: "abc")
fill_in("email", with: "[email protected]")
fill_in("password1", with: "secretive")
fill_in("password-confirmation", with: "secretive")
#Checks if submit button is enabled
find_button("signup-button")
end
end