<commit_before>require 'rails_helper'

feature 'View person audit' do
  let(:super_admin_email)  { '<EMAIL>' }
  let!(:super_admin)  { create(:super_admin, email: super_admin_email) }

  let(:description)  { 'The best person' }
  let(:phone_number) { '55555555555' }
  let!(:person)      { with_versioning { create(:person) } }
  let(:profile_page) { Pages::Profile.new }

  let(:sample_image) {
    File.open(File.join(Engine.root, 'spec', 'fixtures', 'placeholder.png'))
  }

  let(:author) { create(:person) }

  context 'modern versioning' do
    before do
      with_versioning do
        PaperTrail.whodunnit = author.id
        person.update description: description
        person.update primary_phone_number: phone_number
        person.update image: sample_image
      end
    end

    context 'as an admin user' do
      before do<commit_msg>Correct fixture path for non-engine<commit_after>require 'rails_helper'

feature 'View person audit' do
  let(:super_admin_email)  { '<EMAIL>' }
  let!(:super_admin)  { create(:super_admin, email: super_admin_email) }

  let(:description)  { 'The best person' }
  let(:phone_number) { '55555555555' }
  let!(:person)      { with_versioning { create(:person) } }
  let(:profile_page) { Pages::Profile.new }

  let(:sample_image) {
    File.open(File.join(Rails.root, 'spec', 'fixtures', 'placeholder.png'))
  }

  let(:author) { create(:person) }

  context 'modern versioning' do
    before do
      with_versioning do
        PaperTrail.whodunnit = author.id
        person.update description: description
        person.update primary_phone_number: phone_number
        person.update image: sample_image
      end
    end

    context 'as an admin user' do
      before do
{'fraction_non_alphanumeric': 0.11986103068905617, 'fraction_numerical': 0.012738853503184714, 'mean_word_length': 3.5235602094240837, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2957680', 'n_tokens_mistral': 573, 'n_tokens_neox': 539, 'n_words': 123}