fix active tabs tests

This commit is contained in:
Dmitriy Zaporozhets 2013-01-31 12:08:56 +02:00
parent 130f60d55b
commit 2af323bbd1
4 changed files with 8 additions and 4 deletions

View file

@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
ensure_active_main_tab('Stats')
ensure_active_main_tab('Home')
end
Then 'the active main tab should be Projects' do

View file

@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
ensure_active_main_tab('Profile')
ensure_active_main_tab('Home')
end
Then 'the active main tab should be Account' do

View file

@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
# Main Tabs
Then 'the active main tab should be Home' do
ensure_active_main_tab(@project.name)
ensure_active_main_tab('Home')
end
Then 'the active main tab should be Files' do

View file

@ -2,7 +2,11 @@ module SharedActiveTab
include Spinach::DSL
def ensure_active_main_tab(content)
page.find('ul.main_menu li.active').should have_content(content)
if content == "Home"
page.find('ul.main_menu li.active').should have_css('i.icon-home')
else
page.find('ul.main_menu li.active').should have_content(content)
end
end
def ensure_active_sub_tab(content)