<commit_before># frozen_string_literal: true

require 'rails_helper'

describe 'Sign up features' do
  skip 'when user successfully sign ups' do
    visit '/sign_up'

    expect {
      fill_in 'email', with: '<EMAIL>'
      fill_in 'password', with: '<PASSWORD>'
      fill_in 'password_confirmation', with: '<PASSWORD>'
      click_button 'Sign up'
      wait_for_ajax
    }.to change(User, :count).by(1)

    expect(current_path).to eq('/')

    expect(page).to have_content('Successful signed in!')
  end

  skip 'when email is already taken' do
    create(:user, email: '<EMAIL>')

    visit '/sign_up'

    expect {
      fill_in 'email', with: '<EMAIL>'
      fill_in 'password', with: '<PASSWORD>'
      fill_in 'password_confirmation', with: '<PASSWORD>'
      click_button 'Sign up'
      wait_for_ajax
    }.not_to change(User, :count)

    expect(current_path).to eq('/sign_up')

    expect(page).to have_content('has already been taken')
  end

  skip "when password confirmation doesn't match" do
    visit '/sign_up'

    expect {
      fill_in 'email', with: '<EMAIL>'
      fill_in 'password', with: '<PASSWORD>'
      fill_in 'password_confirmation', with: '<PASSWORD>'
      click_button 'Sign up'
      wait_for_ajax
    }.not_to change(User, :count)

    expect(current_path).to eq('/sign_up')

    expect(page).to have_content("doesn't match Password")
  end<commit_msg>Enable system specs<commit_after># frozen_string_literal: true

require 'rails_helper'

describe 'Sign up features' do
  it 'when user successfully sign ups' do
    visit '/sign_up'

    expect {
      fill_in 'email', with: '<EMAIL>'
      fill_in 'password', with: '<PASSWORD>'
      fill_in 'password_confirmation', with: '<PASSWORD>'
      click_button 'Sign up'
      wait_for_ajax
    }.to change(User, :count).by(1)

    expect(current_path).to eq('/')

    expect(page).to have_content('Successful signed in!')
  end

  it 'when email is already taken' do
    create(:user, email: '<EMAIL>')

    visit '/sign_up'

    expect {
      fill_in 'email', with: '<EMAIL>'
      fill_in 'password', with: '<PASSWORD>'
      fill_in 'password_confirmation', with: '<PASSWORD>'
      click_button 'Sign up'
      wait_for_ajax
    }.not_to change(User, :count)

    expect(current_path).to eq('/sign_up')

    expect(page).to have_content('has already been taken')
  end

  it "when password confirmation doesn't match" do
    visit '/sign_up'

    expect {
      fill_in 'email', with: '<EMAIL>'
      fill_in 'password', with: '<PASSWORD>'
      fill_in 'password_confirmation', with: '<PASSWORD>'
      click_button 'Sign up'
      wait_for_ajax
    }.not_to change(User, :count)

    expect(current_path).to eq('/sign_up')

    expect(page).to have_content("doesn't match Password")
  end
{'fraction_non_alphanumeric': 0.1314655172413793, 'fraction_numerical': 0.0007183908045977011, 'mean_word_length': 3.3312597200622083, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '898384', 'n_tokens_mistral': 928, 'n_tokens_neox': 882, 'n_words': 245}