mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 05:06:46 +10:00
fix active tabs tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user