<commit_before>Given(/^the following articles with votes exist:$/) do |table|
  table.hashes.each do |raw_hash|
    hash = {}
    raw_hash.each_pair { |k, v| hash[k.to_s.downcase.squish.gsub(/\s+/, '_')] = v }
    votes = hash['votevalue']
    hash.except! 'votevalue'
    unique_value = hash['uniquevalue']
    hash.except! 'uniquevalue'
    if hash['author'].present?
      u = User.find_by_first_name hash['author']
      hash.except! ('author')
      article = u.articles.new hash
    else
      article = default_test_author.articles.new hash
    end
    article.save!

    votes.to_i.abs.times do |n|
      # create a voter so that a vote can be cast
      user_email = 'avoter_' + unique_value + n.to_i.to_s + '@example.com'
      create_test_user(:email => user_email)
      u = User.find_by_email user_email
      votes.to_i >= 0 ? article.upvote_from( u ) : article.downvote_from( u )
    end
  end

end

Then(/^I should see a Vote value of "(.*?)"$/) do |vote_value|
  page.should have_text 'Vote value: ' + vote_value
end<commit_msg>Fixed finding Votes: on page after UI change.<commit_after>Given(/^the following articles with votes exist:$/) do |table|
  table.hashes.each do |raw_hash|
    hash = {}
    raw_hash.each_pair { |k, v| hash[k.to_s.downcase.squish.gsub(/\s+/, '_')] = v }
    votes = hash['votevalue']
    hash.except! 'votevalue'
    unique_value = hash['uniquevalue']
    hash.except! 'uniquevalue'
    if hash['author'].present?
      u = User.find_by_first_name hash['author']
      hash.except! ('author')
      article = u.articles.new hash
    else
      article = default_test_author.articles.new hash
    end
    article.save!

    votes.to_i.abs.times do |n|
      # create a voter so that a vote can be cast
      user_email = 'avoter_' + unique_value + n.to_i.to_s + '@example.com'
      create_test_user(:email => user_email)
      u = User.find_by_email user_email
      votes.to_i >= 0 ? article.upvote_from( u ) : article.downvote_from( u )
    end
  end

end

Then(/^I should see a Vote value of "(.*?)"$/) do |vote_value|
  page.should have_text 'Votes: ' + vote_value
end
{'fraction_non_alphanumeric': 0.1341521020311762, 'fraction_numerical': 0.000944733112895607, 'mean_word_length': 3.0113636363636362, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5556184', 'n_tokens_mistral': 770, 'n_tokens_neox': 758, 'n_words': 181}