<commit_before>require 'rails_helper'

feature "User navigating to the home page" do
  let!(:user) {create(:user)}

  scenario "when user visits homepage user can navigate to login/signup" do
    visit root_path
    expect(page).to have_content("LOG IN")
    expect(page).to have_content("SIGN UP")
  end

  scenario "when user clicks on login it will redirect to the login page" do
    visit root_path
    click_link("LOG IN")
    expect(page).to have_content("Email")
    expect(page).to have_content("Password")
  end

  scenario "when user enters information in the login form they are redirected to my teams" do
    visit "/login"
    fill_in "Email", :with => user.email
    fill_in "Password", :with => <PASSWORD>
    click_button("Log in")
    expect(page).to have_content("MY TEAMS")
    expect(page).to have_content("LOG OUT")
  end

  scenario "when user enters information in the login form they are redirected to my teams" do
    visit "/login"
    fill_in "Email", :with => user.email
    fill_in "Password", :with => "<PASSWORD>"
    click_button("Log in")
    expect(page).to have_content("Email")
    expect(page).to have_content("Password")
  end

end<commit_msg>finished user/sessions functionality<commit_after>require 'rails_helper'

feature "User navigating to the home page" do
  let!(:user) {create(:user)}

  scenario "when user visits homepage user can navigate to login/signup" do
    visit root_path
    expect(page).to have_content("LOG IN")
    expect(page).to have_content("SIGN UP")
  end

  scenario "when user clicks on login it will redirect to the login page" do
    visit root_path
    click_link("LOG IN")
    expect(page).to have_content("Email")
    expect(page).to have_content("Password")
  end

  scenario "when user enters information in the login form they are redirected to my teams" do
    visit "/login"
    fill_in "Email", :with => user.email
    fill_in "Password", :with => <PASSWORD>
    click_button("Log in")
    expect(page).to have_content("MY TEAMS")
    expect(page).to have_content("LOG OUT")
  end

  scenario "when user enters information in the login screen incorrectly content stays the same" do
    visit "/login"
    fill_in "Email", :with => user.email
    fill_in "Password", :with => "<PASSWORD>"
    click_button("Log in")
    expect(page).to have_content("Email")
    expect(page).to have_content("Password")
  end

  scenario "when a user logs out they are redirected back home" do
    visit "/login"
    fill_in "Email", :with => user.email
    fill_in "Password", :with => <PASSWORD>
    click_button("Log in")
    click_link("LOG OUT")
    expect(page).to have_content("LOG IN")
    expect(page).to have_content("SIGN UP")
  end
end
{'fraction_non_alphanumeric': 0.11267085334318434, 'fraction_numerical': 0.0, 'mean_word_length': 3.888086642599278, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 18, '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': '4793011', 'n_tokens_mistral': 822, 'n_tokens_neox': 813, 'n_words': 281}