<commit_before>require_relative "../rails_helper.rb"

describe 'user signup', :type => :feature do
  include LoginHelper
  it 'successfully signs up as non-admin' do
    # see app/spec/support/login_helper.rb
    user_signup
  end
  it 'successfully logs in as non-admin' do
    # see app/spec/support/login_helper.rb
    user_login
  end
  it 'successfully signs up as non-admin' do
    # see app/spec/support/login_helper.rb
    admin_signup
  end
  it 'successfully logs in as non-admin' do
    # see app/spec/support/login_helper.rb
    admin_login
  end
end

# describe 'go on ride', :type => :feature do

#   before :each do 
#     @rollercoaster = Attraction.create(
#       :name => "<NAME>",
#       :tickets => 5,
#       :nausea_rating => 2,
#       :happiness_rating => 4,
#       :min_height => 32
#     )
#     @ferriswheel = Attraction.create(
#       :name => "<NAME>",
#       :tickets => 2,
#       :nausea_rating => 2,
#       :happiness_rating => 1,
#       :min_height => 28
#     )
#   end

#   it 'has a link from the user show page to the attractions index page' do
#     user_signup
#     expect(page).to have_content("See rides")
#     click_link('See rides')
#   end

#   it 'links from the user show page to the attractions index page' do
#     user_signup
#     click_link('See rides')
#     expect(current_path).to eq('/attractions')
#   end

#   it 'has titles of the rides on the attractions index page' do
#     user_signup
#     click_link('See rides')
#     expect(page).to have_content("#{@ferriswheel.name}")
#     expect(page).to have_content("#{@rollercoaster.name}")
#   end

#   it "has links on the attractions index page to the attractions' show pages" do
#     user_signup
#     click_link('See rides')
#     expect(page).to have_content("Go on #{@ferriswheel.name}")
#     expect(page).to have_content("Go on #{@rollercoaster.name}")
#   end

#   it "links from the attractions index page to the attractions' show pages" do
#     user_signup
#     click_link('See rides')
#     click_link("Go on #{@ferriswheel.name}")
#     expect(current_path).to eq("/attractions/#{@ferriswheel.id}"
#   end
# end<commit_msg>ends parenthesis<commit_after>require_relative "../rails_helper.rb"

describe 'user signup', :type => :feature do
  include LoginHelper
  it 'successfully signs up as non-admin' do
    # see app/spec/support/login_helper.rb
    user_signup
  end
  it 'successfully logs in as non-admin' do
    # see app/spec/support/login_helper.rb
    user_login
  end
  it 'successfully signs up as non-admin' do
    # see app/spec/support/login_helper.rb
    admin_signup
  end
  it 'successfully logs in as non-admin' do
    # see app/spec/support/login_helper.rb
    admin_login
  end
end

describe 'go on ride', :type => :feature do

  before :each do 
    @rollercoaster = Attraction.create(
      :name => "<NAME>",
      :tickets => 5,
      :nausea_rating => 2,
      :happiness_rating => 4,
      :min_height => 32
    )
    @ferriswheel = Attraction.create(
      :name => "<NAME>",
      :tickets => 2,
      :nausea_rating => 2,
      :happiness_rating => 1,
      :min_height => 28
    )
  end

  it 'has a link from the user show page to the attractions index page' do
    user_signup
    expect(page).to have_content("See rides")
    click_link('See rides')
  end

  it 'links from the user show page to the attractions index page' do
    user_signup
    click_link('See rides')
    expect(current_path).to eq('/attractions')
  end

  it 'has titles of the rides on the attractions index page' do
    user_signup
    click_link('See rides')
    expect(page).to have_content("#{@ferriswheel.name}")
    expect(page).to have_content("#{@rollercoaster.name}")
  end

  it "has links on the attractions index page to the attractions' show pages" do
    user_signup
    click_link('See rides')
    expect(page).to have_content("Go on #{@ferriswheel.name}")
    expect(page).to have_content("Go on #{@rollercoaster.name}")
  end

  it "links from the attractions index page to the attractions' show pages" do
    user_signup
    click_link('See rides')
    click_link("Go on #{@ferriswheel.name}")
    expect(current_path).to eq("/attractions/2")
  end
end
{'fraction_non_alphanumeric': 0.1188495364868077, 'fraction_numerical': 0.004991680532445923, 'mean_word_length': 3.081474296799224, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 31, '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': '3728730', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1377, 'n_words': 400}