diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index f33e4b9e36..48c217fbea 100644 --- a/features/project/active_tab.feature +++ b/features/project/active_tab.feature @@ -52,48 +52,34 @@ Feature: Project active tab Then the active main tab should be Home And no other main tabs should be active - #Scenario: On Project Settings/Attachments - #Given I visit my project's home page - #And I click the "Attachments" tab - #Then the active sub tab should be Attachments - #And no other sub tabs should be active - #And the active main tab should be Home - - #Scenario: On Project Settings/Snippets - #Given I visit my project's home page - #And I click the "Snippets" tab - #Then the active sub tab should be Snippets - #And no other sub tabs should be active - #And the active main tab should be Home - # Sub Tabs: Settings Scenario: On Project Settings/Team Given I visit my project's settings page And I click the "Team" tab - Then the active sub tab should be Team - And no other sub tabs should be active + Then the active sub nav should be Team + And no other sub navs should be active And the active main tab should be Settings Scenario: On Project Settings/Edit Given I visit my project's settings page And I click the "Edit" tab - Then the active sub tab should be Edit - And no other sub tabs should be active + Then the active sub nav should be Edit + And no other sub navs should be active And the active main tab should be Settings Scenario: On Project Settings/Hooks Given I visit my project's settings page And I click the "Hooks" tab - Then the active sub tab should be Hooks - And no other sub tabs should be active + Then the active sub nav should be Hooks + And no other sub navs should be active And the active main tab should be Settings Scenario: On Project Settings/Deploy Keys Given I visit my project's settings page And I click the "Deploy Keys" tab - Then the active sub tab should be Deploy Keys - And no other sub tabs should be active + Then the active sub nav should be Deploy Keys + And no other sub navs should be active And the active main tab should be Settings # Sub Tabs: Commits diff --git a/features/steps/project/project_active_tab.rb b/features/steps/project/project_active_tab.rb index a0ee32b9ec..e04a17168b 100644 --- a/features/steps/project/project_active_tab.rb +++ b/features/steps/project/project_active_tab.rb @@ -68,32 +68,20 @@ class ProjectActiveTab < Spinach::FeatureSteps click_link('Deploy Keys') end - Then 'the active sub tab should be Show' do - ensure_active_sub_tab('Show') + Then 'the active sub nav should be Team' do + ensure_active_sub_nav('Members') end - Then 'the active sub tab should be Team' do - ensure_active_sub_tab('Members') + Then 'the active sub nav should be Edit' do + ensure_active_sub_nav('Edit Project') end - Then 'the active sub tab should be Attachments' do - ensure_active_sub_tab('Attachments') + Then 'the active sub nav should be Hooks' do + ensure_active_sub_nav('Web Hooks') end - Then 'the active sub tab should be Snippets' do - ensure_active_sub_tab('Snippets') - end - - Then 'the active sub tab should be Edit' do - ensure_active_sub_tab('Edit') - end - - Then 'the active sub tab should be Hooks' do - ensure_active_sub_tab('Web Hooks') - end - - Then 'the active sub tab should be Deploy Keys' do - ensure_active_sub_tab('Deploy Keys') + Then 'the active sub nav should be Deploy Keys' do + ensure_active_sub_nav('Deploy Keys') end # Sub Tabs: Commits diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb index 617a077b91..d504fda332 100644 --- a/features/steps/shared/active_tab.rb +++ b/features/steps/shared/active_tab.rb @@ -13,6 +13,10 @@ module SharedActiveTab page.find('div.content ul.nav-tabs li.active').should have_content(content) end + def ensure_active_sub_nav(content) + page.find('div.content ul.nav-stacked-menu li.active').should have_content(content) + end + And 'no other main tabs should be active' do page.should have_selector('.main-nav li.active', count: 1) end @@ -20,4 +24,8 @@ module SharedActiveTab And 'no other sub tabs should be active' do page.should have_selector('div.content ul.nav-tabs li.active', count: 1) end + + And 'no other sub navs should be active' do + page.should have_selector('div.content ul.nav-stacked-menu li.active', count: 1) + end end