Commit 2af323bb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix active tabs tests

parent 130f60d5
...@@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps ...@@ -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 ...@@ -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 ...@@ -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,7 +2,11 @@ module SharedActiveTab ...@@ -2,7 +2,11 @@ module SharedActiveTab
include Spinach::DSL include Spinach::DSL
def ensure_active_main_tab(content) 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 end
def ensure_active_sub_tab(content) def ensure_active_sub_tab(content)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment