<commit_before># frozen_string_literal: true

require 'rails_helper'

describe "Conversations", :js do
  let(:sender)    { create :member                        }
  let(:recipient) { create :member, login_name: 'beyonce' }

  before do
    sender.send_message(recipient, "this is the body", "something i want to say")
    login_as recipient
  end

  describe 'view conversation thread' do
    before do
      visit root_path
      click_link 'Your Stuff'
      click_link 'Inbox'
      click_link 'something i want to say'
    end

    it { expect(page).to have_content 'this is the body' }
    it { expect(page).to have_link sender.login_name }
    it { Percy.snapshot(page, name: 'conversations#show') }

    describe 'Replying to the conversation' do
      before do
        fill_in :body, with: 'i like this too'
        click_button 'Send'
      end
      it { expect(page).to have_content "i like this too" }
    end
  end
end
<commit_msg>Fixed menu link label in another spec<commit_after># frozen_string_literal: true

require 'rails_helper'

describe "Conversations", :js do
  let(:sender)    { create :member                        }
  let(:recipient) { create :member, login_name: 'beyonce' }

  before do
    sender.send_message(recipient, "this is the body", "something i want to say")
    login_as recipient
  end

  describe 'view conversation thread' do
    before do
      visit root_path
      click_link member.login_name
      click_link 'Inbox'
      click_link 'something i want to say'
    end

    it { expect(page).to have_content 'this is the body' }
    it { expect(page).to have_link sender.login_name }
    it { Percy.snapshot(page, name: 'conversations#show') }

    describe 'Replying to the conversation' do
      before do
        fill_in :body, with: 'i like this too'
        click_button 'Send'
      end
      it { expect(page).to have_content "i like this too" }
    end
  end
end

{'fraction_non_alphanumeric': 0.0859822824387702, 'fraction_numerical': 0.0, 'mean_word_length': 2.7573385518590996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3093026', 'n_tokens_mistral': 599, 'n_tokens_neox': 582, 'n_words': 197}