<commit_before>require 'rails_helper'

describe 'Cohorts page' do
  before do
    sign_in(create(:admin))
  end

  it 'See users count per month' do
    2.times { create(:user) }

    visit instance_statistics_cohorts_path

    expect(page).to have_content("#{Time.now.strftime('%b %Y')} 3 0")
  end
end<commit_msg>Add test for usage ping js in cohorts_spec<commit_after>require 'rails_helper'

describe 'Cohorts page' do
  before do
    sign_in(create(:admin))
  end

  it 'See users count per month' do
    2.times { create(:user) }

    visit instance_statistics_cohorts_path

    expect(page).to have_content("#{Time.now.strftime('%b %Y')} 3 0")
  end

  it 'shows usage data', :js do
    visit instance_statistics_cohorts_path

    wait_for_requests

    expect(find('.js-syntax-highlight').text).not_to eq('')
  end
end
{'fraction_non_alphanumeric': 0.11515151515151516, 'fraction_numerical': 0.007272727272727273, 'mean_word_length': 3.9759036144578315, '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': '819594', 'n_tokens_mistral': 307, 'n_tokens_neox': 279, 'n_words': 74}