<commit_before>require 'spec_helper'

describe "new user signup" do
  it 'allows the user to fill out the form and sign up' do
    visit root_path
    find('[rel="signup"]').click
    fill_in "account_name", :with => "Helpful"
    fill_in "person_name", :with => "<NAME>"
    fill_in "user_email", :with => "<EMAIL>"
    fill_in "user_password", :with => "<PASSWORD>"
    click_on "Sign up and start inviting your team!"
    expect(page).to have_selector('h1', text: "Invite your whole team.")
  end

  context "when filling out the form with something invalid" do
    it 'returns the user to the page with an error message' do
      visit root_path
      find('[rel="signup"]').click
      fill_in "account_name", :with => "Helpful"
      fill_in "person_name", :with => "<NAME>"
      fill_in "user_email", :with => "<EMAIL>"
      fill_in "user_password", :with => "<PASSWORD>"
      click_on "Sign up and start inviting your team!"
      expect(page).to have_selector("h2", text: "1 error prohibited this record from being saved")
      expect(page).to have_selector("body", "Password is too short (minimum is 8 characters)")
    end
  end
end<commit_msg>Update error message<commit_after>require 'spec_helper'

describe "new user signup" do
  it 'allows the user to fill out the form and sign up' do
    visit root_path
    find('[rel="signup"]').click
    fill_in "account_name", :with => "Helpful"
    fill_in "person_name", :with => "<NAME>"
    fill_in "user_email", :with => "<EMAIL>"
    fill_in "user_password", :with => "<PASSWORD>"
    click_on "Sign up and start inviting your team!"
    expect(page).to have_selector('h1', text: "Invite your whole team.")
  end

  context "when filling out the form with something invalid" do
    it 'returns the user to the page with an error message' do
      visit root_path
      find('[rel="signup"]').click
      fill_in "account_name", :with => "Helpful"
      fill_in "person_name", :with => "<NAME>"
      fill_in "user_email", :with => "<EMAIL>"
      fill_in "user_password", :with => "<PASSWORD>"
      click_on "Sign up and start inviting your team!"
      expect(page).to have_selector(".panel-title", text: "Oops! Something went wrong.")
      expect(page).to have_selector("body", "Password is too short (minimum is 8 characters)")
    end
  end
end
{'fraction_non_alphanumeric': 0.13131749460043196, 'fraction_numerical': 0.002591792656587473, 'mean_word_length': 3.707317073170732, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4911368', 'n_tokens_mistral': 725, 'n_tokens_neox': 709, 'n_words': 253}