<commit_before>require 'spec_helper'

RSpec.feature "managing categories", type: feature do
  include LoginHelper
    
  before do
    login_admin
  end

  scenario "create, update and destroy a category" do
    click_link 'Category'
    click_link 'New'

    fill_in 'Name', with: 'Bags'
    click_button 'Save and Close'

    click_link 'Bags'
    fill_in 'Name', with: 'Shoes'
    click_button 'Save and Close'

    fill_in 'Keyword...', with: 'non-existing'
    click_button 'Search'
    expect(page).to_not have_content 'Shoes'

    fill_in 'Keyword...', with: 'sho'
    click_button 'Search'
    expect(page).to have_content 'Shoes'

    first('.delete').click
    expect(page).to_not have_content 'Shoes'
  end
end<commit_msg>Admin Category test: renaming category<commit_after>require 'spec_helper'

RSpec.feature "managing categories", type: feature do
  include LoginHelper
    
  before do
    login_admin
  end

  scenario "create, update and destroy a category" do
    click_link 'Category'
    click_link 'New'

    fill_in 'Name', with: 'Bags'
    click_button 'Save and Close'

    click_link 'Bags'
    fill_in 'Name', with: 'Shirts'
    click_button 'Save and Close'

    fill_in 'Keyword...', with: 'non-existing'
    click_button 'Search'
    expect(page).to_not have_content 'Shirts'

    fill_in 'Keyword...', with: 'shi'
    click_button 'Search'
    expect(page).to have_content 'Shirts'

    first('.delete').click
    expect(page).to_not have_content 'Shirts'
  end
end
{'fraction_non_alphanumeric': 0.10635451505016723, 'fraction_numerical': 0.0, 'mean_word_length': 3.4391691394658754, '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': '3090643', 'n_tokens_mistral': 497, 'n_tokens_neox': 489, 'n_words': 139}