fix active tabs tests
This commit is contained in:
parent
130f60d55b
commit
2af323bbd1
|
@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
|
||||||
include SharedActiveTab
|
include SharedActiveTab
|
||||||
|
|
||||||
Then 'the active main tab should be Home' do
|
Then 'the active main tab should be Home' do
|
||||||
ensure_active_main_tab('Stats')
|
ensure_active_main_tab('Home')
|
||||||
end
|
end
|
||||||
|
|
||||||
Then 'the active main tab should be Projects' do
|
Then 'the active main tab should be Projects' do
|
||||||
|
|
|
@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
|
||||||
include SharedActiveTab
|
include SharedActiveTab
|
||||||
|
|
||||||
Then 'the active main tab should be Home' do
|
Then 'the active main tab should be Home' do
|
||||||
ensure_active_main_tab('Profile')
|
ensure_active_main_tab('Home')
|
||||||
end
|
end
|
||||||
|
|
||||||
Then 'the active main tab should be Account' do
|
Then 'the active main tab should be Account' do
|
||||||
|
|
|
@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
|
||||||
# Main Tabs
|
# Main Tabs
|
||||||
|
|
||||||
Then 'the active main tab should be Home' do
|
Then 'the active main tab should be Home' do
|
||||||
ensure_active_main_tab(@project.name)
|
ensure_active_main_tab('Home')
|
||||||
end
|
end
|
||||||
|
|
||||||
Then 'the active main tab should be Files' do
|
Then 'the active main tab should be Files' do
|
||||||
|
|
|
@ -2,8 +2,12 @@ module SharedActiveTab
|
||||||
include Spinach::DSL
|
include Spinach::DSL
|
||||||
|
|
||||||
def ensure_active_main_tab(content)
|
def ensure_active_main_tab(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)
|
page.find('ul.main_menu li.active').should have_content(content)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def ensure_active_sub_tab(content)
|
def ensure_active_sub_tab(content)
|
||||||
page.find('div.content ul.nav-tabs li.active').should have_content(content)
|
page.find('div.content ul.nav-tabs li.active').should have_content(content)
|
||||||
|
|
Loading…
Reference in a new issue