Commit 2af323bbd1993b121b2ff7bcc695e2bb10af5a1b
1 parent
130f60d5
Exists in
master
and in
4 other branches
fix active tabs tests
Showing
4 changed files
with
8 additions
and
4 deletions
Show diff stats
features/steps/admin/admin_active_tab.rb
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
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) | ... | ... |