<commit_before>class AdminDashboardPage < Page
  def self.path
    "/admin"
  end

  def self.visit
    page.visit path
    new
  end

  def self.page_header
    "Journals"
  end

  def initialize(*args)
    super
    synchronize_content! self.class.page_header
  end

  def journal_names
    all('.journal-name').map &:text
  end

  def journal_descriptions
    all('.journal-thumbnail-show p').map &:text
  end

  def journal_paper_counts
    all('.journal-paper-count').map { |el| el.text.split(' ')[0].to_i }
  end

  def edit_journal(journal_name)
    all('.journal').detect { |j| j.text =~ /#{journal_name}/ }.hover
    all('.edit-icon').first.click
    EditJournalFragment.new(find('.journal-thumbnail-edit-form'))
  end

  def visit_journal(journal)
    click_link(journal.name)
    JournalPage.new('.edit-form')<commit_msg>fix failing specs<commit_after>class AdminDashboardPage < Page
  def self.path
    "/admin"
  end

  def self.visit
    page.visit path
    new
  end

  def self.page_header
    "Journals"
  end

  def initialize(*args)
    super
    synchronize_content! self.class.page_header
  end

  def journal_names
    all('.journal-name').map &:text
  end

  def journal_descriptions
    all('.journal-thumbnail-show p').map &:text
  end

  def journal_paper_counts
    all('.journal-paper-count').map { |el| el.text.split(' ')[0].to_i }
  end

  def edit_journal(journal_name)
    all('.journal').detect { |j| j.text =~ /#{journal_name}/ }.hover
    all('.edit-icon').first.click
    EditJournalFragment.new(find('.journal-thumbnail-edit-form'))
  end

  def visit_journal(journal)
    click_link(journal.name)
    JournalPage.new
{'fraction_non_alphanumeric': 0.13059250302297462, 'fraction_numerical': 0.0012091898428053204, 'mean_word_length': 3.189873417721519, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7578059', 'n_tokens_mistral': 573, 'n_tokens_neox': 561, 'n_words': 111}