diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-05-16 20:36:27 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-05-16 20:36:27 +0300 |
commit | 79b9ff60768644287daace5a8f640d1790816353 (patch) | |
tree | e4976e2feef97c848fc75521276c14e144409124 /features/steps/admin/active_tab.rb | |
parent | 7365ac60f116d0e0a89a3bd8ebcf558b477c4bc3 (diff) |
Modify tests to match new navigation behaviour for project pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features/steps/admin/active_tab.rb')
-rw-r--r-- | features/steps/admin/active_tab.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb index 90d13abdb13..f2db1801389 100644 --- a/features/steps/admin/active_tab.rb +++ b/features/steps/admin/active_tab.rb @@ -1,7 +1,7 @@ class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps include SharedAuthentication include SharedPaths - include SharedActiveTab + include SharedSidebarActiveTab step 'the active main tab should be Home' do ensure_active_main_tab('Overview') @@ -34,4 +34,12 @@ class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps step 'the active main tab should be Messages' do ensure_active_main_tab('Messages') end + + step 'no other main tabs should be active' do + expect(page).to have_selector('.nav-sidebar > li.active', count: 1) + end + + def ensure_active_main_tab(content) + expect(find('.nav-sidebar > li.active')).to have_content(content) + end end |