<commit_before>require 'rails_helper'

RSpec.feature "Learning objectives" do
  it "shows learning objectives page" do
    visit('/learning_objectives')
    expect(page.body).to have_css(".objectives")
  end

  #we need a form with 2 input fields

  it "shows a form with two inputs" do
    visit('/learning_objectives')
    fill_in("Title", with:  "Jory's cheat sheet")
    fill_in("Description", with:  "capybara has a cool cheat sheet")
    click_button('submit')

    expect(page).to have_content("Jory's cheat sheet")
    expect(page).to have_content("capybara has a cool cheat sheet")

  end

  it "clicks submit button and takes to new page" do
    visit('/learning_objectives')
    click_button('submit')
    expect(page.body).to have_content('Success')
  end

#I want to see form info on the view_objectives page
end<commit_msg>Refactor manage_learning_objectives_spec<commit_after>require 'rails_helper'

RSpec.feature "Learning objectives" do

  before do
    visit learning_objectives_path
  end

  it "shows learning objectives page" do
    expect(page.body).to have_css(".objectives")
  end

  it "shows a form with two inputs" do
    fill_in("Title", with:  "Jory's cheat sheet")
    fill_in("Description", with:  "capybara has a cool cheat sheet")
    click_button('submit')

    expect(page).to have_content("Jory's cheat sheet")
    expect(page).to have_content("capybara has a cool cheat sheet")
  end

  it "clicks submit button and takes to new page" do
    click_button('submit')
    expect(page.body).to have_content('Success')
  end
end
{'fraction_non_alphanumeric': 0.10192307692307692, 'fraction_numerical': 0.000641025641025641, 'mean_word_length': 4.203333333333333, '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': '4901174', 'n_tokens_mistral': 505, 'n_tokens_neox': 475, 'n_words': 154}