<commit_before>require 'rails_helper'

describe 'Request an invite', js: true do

  before(:all) do
    Persona.destroy_all

    I18n.locale = :en
    create(:persona)
  end

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

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

      within '#new-invite' do
        fill_in 'invite[name]', with: '<NAME>'
        fill_in 'invite[email]', with: '<EMAIL>'
        select 'Entrepreneur', from: 'invite_persona'
        fill_in 'invite[address]', with: '544 Madison Ave, Albany, NY 12208, USA'
        sleep 5
        click_button 'Confirm'
      end

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

end<commit_msg>#DEV31: Adjust in capybara test<commit_after>require 'rails_helper'

describe 'Request an invite', js: true do

  before(:all) do
    Persona.destroy_all

    I18n.locale = :en
    create(:persona)
  end

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

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

      within '#new-invite' do
        fill_in 'invite[name]', with: '<NAME>'
        fill_in 'invite[email]', with: '<EMAIL>'
        check 'Entrepreneur'
        fill_in 'invite[address]', with: '544 Madison Ave, Albany, NY 12208, USA'
        sleep 5
        click_button 'Confirm'
      end

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

end
{'fraction_non_alphanumeric': 0.11965811965811966, 'fraction_numerical': 0.018408941485864562, 'mean_word_length': 2.8337531486146097, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6526559', 'n_tokens_mistral': 533, 'n_tokens_neox': 492, 'n_words': 145}