Sha256: 69207f232361179f8b340f44105926785f5a8fab0e4d335ca8dd42349f5aa122
Contents?: true
Size: 1.38 KB
Versions: 2
Compression:
Stored size: 1.38 KB
Contents
require 'test_helper' class NavigationTest < ActionDispatch::IntegrationTest extend TestWithCassette test "there should be a global nav", :navigation do visit(kinney.root_path) assert page.has_selector?('#global_nav') end test "there should be a Videos link in the global navigation", :navigation do visit(kinney.root_path) assert page.has_selector?('a', :text => 'Videos') end test "topics navigation in navbar should only include topics with clips", :navigation do visit(kinney.root_path) assert page.has_selector?('#global_nav #topics_nav li a', :text => 'Mentors') assert page.has_no_selector?('#global_nav #topics_nav li', :text => 'Academics') end test "topics navigation should highlight the current page in the dropdown menu if on a topic page", :navigation do visit(kinney.topic_path(kinney_topics(:mentors))) assert page.has_selector?('#topics_nav li.active a', :text => 'Mentors') assert page.has_selector?('#topics_nav li a', :text => 'Roots') assert page.has_no_selector?('#topics_nav li.active a', :text => 'Roots') end test "there should be a link to People in the global navigation", :navigation do visit(kinney.root_path) assert page.has_selector?('#global_nav ul li a', :text => 'People') page.find('#global_nav ul li a', :text => 'People').click assert page.current_url == kinney.people_url end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kinney-0.0.3 | test/integration/navigation_test.rb |
kinney-0.0.2 | test/integration/navigation_test.rb |