Commit 2af323bbd1993b121b2ff7bcc695e2bb10af5a1b

Authored by Dmitriy Zaporozhets
1 parent 130f60d5

fix active tabs tests

features/steps/admin/admin_active_tab.rb
... ... @@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
4 4 include SharedActiveTab
5 5  
6 6 Then 'the active main tab should be Home' do
7   - ensure_active_main_tab('Stats')
  7 + ensure_active_main_tab('Home')
8 8 end
9 9  
10 10 Then 'the active main tab should be Projects' do
... ...
features/steps/profile/profile_active_tab.rb
... ... @@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
4 4 include SharedActiveTab
5 5  
6 6 Then 'the active main tab should be Home' do
7   - ensure_active_main_tab('Profile')
  7 + ensure_active_main_tab('Home')
8 8 end
9 9  
10 10 Then 'the active main tab should be Account' do
... ...
features/steps/project/project_active_tab.rb
... ... @@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
7 7 # Main Tabs
8 8  
9 9 Then 'the active main tab should be Home' do
10   - ensure_active_main_tab(@project.name)
  10 + ensure_active_main_tab('Home')
11 11 end
12 12  
13 13 Then 'the active main tab should be Files' do
... ...
features/steps/shared/active_tab.rb
... ... @@ -2,7 +2,11 @@ module SharedActiveTab
2 2 include Spinach::DSL
3 3  
4 4 def ensure_active_main_tab(content)
5   - page.find('ul.main_menu li.active').should have_content(content)
  5 + if content == "Home"
  6 + page.find('ul.main_menu li.active').should have_css('i.icon-home')
  7 + else
  8 + page.find('ul.main_menu li.active').should have_content(content)
  9 + end
6 10 end
7 11  
8 12 def ensure_active_sub_tab(content)
... ...