<commit_before>describe 'Root page' do
  let(:root_page) { CGTest::RootPage.new(@br) }

  before(:each) do
    root_page.goto
  end

  it 'should have posts that contain text' do
    posts = root_page.posts
    posts.each do |post|
      puts "Data post ID: #{post.data_post_id}"
      expect(post.post_truncated_content.text.empty?).to be false
    end
  end
end<commit_msg>Add in root page title test<commit_after>describe 'Root page' do
  let(:root_page) { CGTest::RootPage.new(@br) }

  before(:each) do
    root_page.goto
  end

  def check_posts
    posts = root_page.posts
    posts.each do |post|
      puts "Data post ID: #{post.data_post_id}"
      yield post
    end
  end

  it 'should have posts that contain titles' do
    check_posts { |post| expect(post.post_title.text.empty?).to be false }
  end

  it 'should have posts that contain text' do
    check_posts { |post| expect(post.post_truncated_content.text.empty?).to be false }
  end
end
{'fraction_non_alphanumeric': 0.10344827586206896, 'fraction_numerical': 0.0, 'mean_word_length': 3.295964125560538, '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': '7175025', 'n_tokens_mistral': 334, 'n_tokens_neox': 320, 'n_words': 93}