<commit_before>module CapybaraExt
  def page!
    save_and_open_page
  end

  # A hack so that we can test select2 things within our integration tests
  def select2(within, value)
    script = %Q{
      $('#{within} .select2-search-field input').val('#{value}')
      $('#{within} .select2-search-field input').keydown();
      $('#{within} .select2-highlighted').mouseup();
    }
    page.execute_script(script)
  end
end

RSpec.configure do |c|
  c.include CapybaraExt
end
<commit_msg>Remove scoping from select2-highlighted query<commit_after>module CapybaraExt
  def page!
    save_and_open_page
  end

  # A hack so that we can test select2 things within our integration tests
  def select2(within, value)
    script = %Q{
      $('#{within} .select2-search-field input').val('#{value}')
      $('#{within} .select2-search-field input').keydown();
    }
    page.execute_script(script)
    page.execute_script("$('.select2-highlighted').mouseup();")
  end
end

RSpec.configure do |c|
  c.include CapybaraExt
end

{'fraction_non_alphanumeric': 0.13470993117010815, 'fraction_numerical': 0.010816125860373648, 'mean_word_length': 3.712962962962963, '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': '6064576', 'n_tokens_mistral': 344, 'n_tokens_neox': 336, 'n_words': 85}