diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-19 23:52:57 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-19 23:52:57 +0400 |
commit | cc2145da80abe53052598b062d7853efdf225d8b (patch) | |
tree | 3d33876a8480c732cb30274c37c71a68084f81e4 /features | |
parent | 1811d32e23f2c7c4c76f4e868ab3b5850f6addb3 (diff) |
Fixed sub navs spinach tests for project
Diffstat (limited to 'features')
-rw-r--r-- | features/project/active_tab.feature | 30 | ||||
-rw-r--r-- | features/steps/project/project_active_tab.rb | 28 | ||||
-rw-r--r-- | features/steps/shared/active_tab.rb | 8 |
3 files changed, 24 insertions, 42 deletions
diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index f33e4b9e369..48c217fbea7 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 a0ee32b9ec0..e04a17168be 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 617a077b914..d504fda3327 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 |