<commit_before>describe 'add TA', js: true do
  before(:each) do
    @course = create(:course, name: 'TA course')
    ta_role = Role.create(name: "Teaching Assistant")
    ta_role.save
  end

  it "check to see if TA can be added and removed" do
    student = create(:student)
    login_as('instructor6')
    visit "/courses/view_teaching_assistants?id=#{@course.id}&model=Courses"
    fill_in 'user_name', with: student.name

    expect do
      click_button 'Add TA'
      wait_for_ajax
    end.to change { TaMapping.count }.by(1)

    visit "/courses/view_teaching_assistants?id=#{@course.id}&model=Courses"

    expect do
      first(:link, 'Delete').click
      wait_for_ajax
    end.to change { TaMapping.count }.by(-1)
  end

  it "should display newly created course" do
    login_as('instructor6')
    visit "/courses/view_teaching_assistants?id=#{@course.id}&model=Course"

    expect(page).to have_content("TA course")
  end
end<commit_msg>Pluralized last link in course_creation_spec<commit_after>describe 'add TA', js: true do
  before(:each) do
    @course = create(:course, name: 'TA course')
    ta_role = Role.create(name: "Teaching Assistant")
    ta_role.save
  end

  it "check to see if TA can be added and removed" do
    student = create(:student)
    login_as('instructor6')
    visit "/courses/view_teaching_assistants?id=#{@course.id}&model=Courses"
    fill_in 'user_name', with: student.name

    expect do
      click_button 'Add TA'
      wait_for_ajax
    end.to change { TaMapping.count }.by(1)

    visit "/courses/view_teaching_assistants?id=#{@course.id}&model=Courses"

    expect do
      first(:link, 'Delete').click
      wait_for_ajax
    end.to change { TaMapping.count }.by(-1)
  end

  it "should display newly created course" do
    login_as('instructor6')
    visit "/courses/view_teaching_assistants?id=#{@course.id}&model=Courses"

    expect(page).to have_content("TA course")
  end
end
{'fraction_non_alphanumeric': 0.12202688728024819, 'fraction_numerical': 0.004136504653567736, 'mean_word_length': 3.685230024213075, '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': '2122490', 'n_tokens_mistral': 674, 'n_tokens_neox': 649, 'n_words': 157}