<commit_before>require 'spec_helper'

describe "static_pages/submit.html.erb" do

  it "should have an anchor tag 'a'" do
    visit '/'
    expect(page).to have_selector("a")
  end

  it "should have an anchor tag 'a'" do
    visit '/'
    expect(page).to have_selector("a")
  end

end

<commit_msg>Added capybara tests to submit page spec<commit_after>require 'spec_helper'

describe "static_pages/submit.html.erb" do

  it "should have an anchor tag 'a'" do
    visit '/static_pages/submit'
    page.has_content?('TOP RESULTS')
  end

  it "Should have an anchor tag 'a' after a valid search" do
    visit '/'
    fill_in 'query', :with => 'www.restorethefourth.net/'
    click_button 'Search'
    expect(page).to have_selector("a")
  end

  it "should load from search button" do
    visit '/'
    click_button 'Search'
    current_path.should == static_pages_submit_path
  end

  it "should link to about page" do
    visit '/'
    click_link 'About'
    current_path.should == static_pages_about_path
  end

  it "Should offer a try again link with invalid search" do
    visit '/'
    click_button 'Search'
    click_link 'Try again?'
    current_path.should == root_path
  end

  it "Should have a link back to home page" do
    visit '/static_pages/submit'
    page.has_link?('Discuss it')
  end

end


{'fraction_non_alphanumeric': 0.10229007633587786, 'fraction_numerical': 0.0, 'mean_word_length': 3.229032258064516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '2759543', 'n_tokens_mistral': 440, 'n_tokens_neox': 426, 'n_words': 138}