<commit_before>require 'spec_helper'

describe 'Filter issues', js: true do
  include FilteredSearchHelpers

  let(:project) { create(:project) }
  let(:user) { create(:user) }

  let!(:bug_label) { create(:label, project: project, title: 'bug') }
  let!(:caps_sensitive_label) { create(:label, project: project, title: 'CaPs') }
  let!(:multiple_words_label) { create(:label, project: project, title: "Two words") }
  let!(:milestone) { create(:milestone, title: "8", project: project, start_date: 2.days.ago) }

  def expect_no_issues_list
    page.within '.issues-list' do
      expect(page).to have_no_selector('.issue')
    end<commit_msg>Turns out that short name was important, who knew!<commit_after>require 'spec_helper'

describe 'Filter issues', js: true do
  include FilteredSearchHelpers

  let(:project) { create(:project) }

  # NOTE: The short name here is actually important
  #
  # When the name is longer, the filtered search input can end up scrolling
  # horizontally, and PhantomJS can't handle it.
  let(:user) { create(:user, name: 'Ann') }

  let!(:bug_label) { create(:label, project: project, title: 'bug') }
  let!(:caps_sensitive_label) { create(:label, project: project, title: 'CaPs') }
  let!(:multiple_words_label) { create(:label, project: project, title: "Two words") }
  let!(:milestone) { create(:milestone, title: "8", project: project, start_date: 2.days.ago) }

  def expect_no_issues_list
    page.within '.issues-list' do
      expect(page).to have_no_selector('.issue')
    end
{'fraction_non_alphanumeric': 0.14407894736842106, 'fraction_numerical': 0.002631578947368421, 'mean_word_length': 4.988188976377953, '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': '5560926', 'n_tokens_mistral': 499, 'n_tokens_neox': 478, 'n_words': 134}