Skip to content
Snippets Groups Projects
Commit 2af323bb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

fix active tabs tests

parent 130f60d5
No related branches found
No related tags found
No related merge requests found
Loading
@@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
Loading
@@ -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
Loading
Loading
Loading
@@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
Loading
@@ -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
Loading
Loading
Loading
@@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
Loading
@@ -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
Loading
Loading
Loading
@@ -2,7 +2,11 @@ module SharedActiveTab
Loading
@@ -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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment