<commit_before>require 'rails_helper'
include ViewHelpers

RSpec.feature 'User views a sorted sponsors list by clicking the table headers', :type => :feature do
  background do
    an_unordered_list_of_sponsors_exists
    i_sign_in_as_admin
  end

  scenario 'User can sort the sponsors list' do
    visit hq_sponsors_path

    i_should_see_sponsors_ordered_as ["Carl", "Aaron", "Tom", "John", "Bob"]
    and_i_click_link "Name"
    i_should_see_sponsors_ordered_as ["Aaron", "Bob", "Carl", "John", "Tom"]
    and_i_click_link "Name"
    i_should_see_sponsors_ordered_as ["Tom", "John", "Carl", "Bob", "Aaron"]

    and_i_click_link "Start Date"
    i_should_see_sponsors_ordered_as ["John", "Tom", "Bob", "Carl", "Aaron"]
    and_i_click_link "Start Date"
    i_should_see_sponsors_ordered_as ["Aaron", "Carl", "Bob", "Tom", "John"]
    and_i_click_link "Start Date"<commit_msg>removes test: visiting sponsor index sh shows an ordered list of sponsors. The order here is irelevant<commit_after>require 'rails_helper'
include ViewHelpers

RSpec.feature 'User views a sorted sponsors list by clicking the table headers', :type => :feature do
  background do
    an_unordered_list_of_sponsors_exists
    i_sign_in_as_admin
  end

  scenario 'User can sort the sponsors list' do
    visit hq_sponsors_path

    and_i_click_link "Name"
    i_should_see_sponsors_ordered_as ["Aaron", "Bob", "Carl", "John", "Tom"]
    and_i_click_link "Name"
    i_should_see_sponsors_ordered_as ["Tom", "John", "Carl", "Bob", "Aaron"]

    and_i_click_link "Start Date"
    i_should_see_sponsors_ordered_as ["John", "Tom", "Bob", "Carl", "Aaron"]
    and_i_click_link "Start Date"
    i_should_see_sponsors_ordered_as ["Aaron", "Carl", "Bob", "Tom", "John"]
    and_i_click_link "Start Date"
{'fraction_non_alphanumeric': 0.11073446327683616, 'fraction_numerical': 0.0, 'mean_word_length': 5.149305555555555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '126033', 'n_tokens_mistral': 659, 'n_tokens_neox': 618, 'n_words': 163}