<commit_before>require 'rails_helper'

describe 'Request an invite' do

  before(:all) do
    DatabaseCleaner.clean
    create(:persona)
  end

  context 'when user filled the valid data' do
    it 'should request a invite with success' do
      visit '/en'

      find('.invite.hidden-xs').click

      fill_in 'Name', with: '<NAME>'
      fill_in 'Email', with: '<EMAIL>'
      select 'Entrepreneur', from: 'invite_persona'
      fill_in 'Address', with: '544 Madison Ave, Albany, NY 12208, USA'

      click_button 'Confirm'

      expect(page).to have_content(I18n.t('invite_create.valid', user_name: 'John'))
    end
  end

  context 'when user DO NOT filled the valid data' do
    it 'should request a invite with success' do
      visit '/en'

      find('.invite.hidden-xs').click

      fill_in 'Name', with: '<NAME>'
      # fill_in 'Email', with: '<EMAIL>'
      select 'Entrepreneur', from: 'invite_persona'
      fill_in 'Address', with: '544 Madison Ave, Albany, NY 12208, USA'

      click_button 'Confirm'

      expect(page).to have_content(I18n.t('invite_create.invalid'))
    end
  end

  after(:all) do
    DatabaseCleaner.clean
  end

end<commit_msg>test: make a test to see if have a SnapCI conflict<commit_after># require 'rails_helper'
#
# describe 'Request an invite' do
#
#   before(:all) do
#     DatabaseCleaner.clean
#     create(:persona)
#   end
#
#   context 'when user filled the valid data' do
#     it 'should request a invite with success' do
#       visit '/en'
#
#       find('.invite.hidden-xs').click
#
#       fill_in 'Name', with: '<NAME>'
#       fill_in 'Email', with: '<EMAIL>'
#       select 'Entrepreneur', from: 'invite_persona'
#       fill_in 'Address', with: '544 Madison Ave, Albany, NY 12208, USA'
#
#       click_button 'Confirm'
#
#       expect(page).to have_content(I18n.t('invite_create.valid', user_name: 'John'))
#     end
#   end
#
#   context 'when user DO NOT filled the valid data' do
#     it 'should request a invite with success' do
#       visit '/en'
#
#       find('.invite.hidden-xs').click
#
#       fill_in 'Name', with: '<NAME>'
#       # fill_in 'Email', with: '<EMAIL>'
#       select 'Entrepreneur', from: 'invite_persona'
#       fill_in 'Address', with: '544 Madison Ave, Albany, NY 12208, USA'
#
#       click_button 'Confirm'
#
#       expect(page).to have_content(I18n.t('invite_create.invalid'))
#     end
#   end
#
#   after(:all) do
#     DatabaseCleaner.clean
#   end
#
# end
{'fraction_non_alphanumeric': 0.13449817147501017, 'fraction_numerical': 0.016253555465258026, 'mean_word_length': 2.977382875605816, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3419068', 'n_tokens_mistral': 867, 'n_tokens_neox': 814, 'n_words': 240}