Commit cc2145da80abe53052598b062d7853efdf225d8b
1 parent
1811d32e
Exists in
master
and in
4 other branches
Fixed sub navs spinach tests for project
Showing
3 changed files
with
24 additions
and
42 deletions
Show diff stats
features/project/active_tab.feature
| ... | ... | @@ -52,48 +52,34 @@ Feature: Project active tab |
| 52 | 52 | Then the active main tab should be Home |
| 53 | 53 | And no other main tabs should be active |
| 54 | 54 | |
| 55 | - #Scenario: On Project Settings/Attachments | |
| 56 | - #Given I visit my project's home page | |
| 57 | - #And I click the "Attachments" tab | |
| 58 | - #Then the active sub tab should be Attachments | |
| 59 | - #And no other sub tabs should be active | |
| 60 | - #And the active main tab should be Home | |
| 61 | - | |
| 62 | - #Scenario: On Project Settings/Snippets | |
| 63 | - #Given I visit my project's home page | |
| 64 | - #And I click the "Snippets" tab | |
| 65 | - #Then the active sub tab should be Snippets | |
| 66 | - #And no other sub tabs should be active | |
| 67 | - #And the active main tab should be Home | |
| 68 | - | |
| 69 | 55 | # Sub Tabs: Settings |
| 70 | 56 | |
| 71 | 57 | Scenario: On Project Settings/Team |
| 72 | 58 | Given I visit my project's settings page |
| 73 | 59 | And I click the "Team" tab |
| 74 | - Then the active sub tab should be Team | |
| 75 | - And no other sub tabs should be active | |
| 60 | + Then the active sub nav should be Team | |
| 61 | + And no other sub navs should be active | |
| 76 | 62 | And the active main tab should be Settings |
| 77 | 63 | |
| 78 | 64 | Scenario: On Project Settings/Edit |
| 79 | 65 | Given I visit my project's settings page |
| 80 | 66 | And I click the "Edit" tab |
| 81 | - Then the active sub tab should be Edit | |
| 82 | - And no other sub tabs should be active | |
| 67 | + Then the active sub nav should be Edit | |
| 68 | + And no other sub navs should be active | |
| 83 | 69 | And the active main tab should be Settings |
| 84 | 70 | |
| 85 | 71 | Scenario: On Project Settings/Hooks |
| 86 | 72 | Given I visit my project's settings page |
| 87 | 73 | And I click the "Hooks" tab |
| 88 | - Then the active sub tab should be Hooks | |
| 89 | - And no other sub tabs should be active | |
| 74 | + Then the active sub nav should be Hooks | |
| 75 | + And no other sub navs should be active | |
| 90 | 76 | And the active main tab should be Settings |
| 91 | 77 | |
| 92 | 78 | Scenario: On Project Settings/Deploy Keys |
| 93 | 79 | Given I visit my project's settings page |
| 94 | 80 | And I click the "Deploy Keys" tab |
| 95 | - Then the active sub tab should be Deploy Keys | |
| 96 | - And no other sub tabs should be active | |
| 81 | + Then the active sub nav should be Deploy Keys | |
| 82 | + And no other sub navs should be active | |
| 97 | 83 | And the active main tab should be Settings |
| 98 | 84 | |
| 99 | 85 | # Sub Tabs: Commits | ... | ... |
features/steps/project/project_active_tab.rb
| ... | ... | @@ -68,32 +68,20 @@ class ProjectActiveTab < Spinach::FeatureSteps |
| 68 | 68 | click_link('Deploy Keys') |
| 69 | 69 | end |
| 70 | 70 | |
| 71 | - Then 'the active sub tab should be Show' do | |
| 72 | - ensure_active_sub_tab('Show') | |
| 71 | + Then 'the active sub nav should be Team' do | |
| 72 | + ensure_active_sub_nav('Members') | |
| 73 | 73 | end |
| 74 | 74 | |
| 75 | - Then 'the active sub tab should be Team' do | |
| 76 | - ensure_active_sub_tab('Members') | |
| 75 | + Then 'the active sub nav should be Edit' do | |
| 76 | + ensure_active_sub_nav('Edit Project') | |
| 77 | 77 | end |
| 78 | 78 | |
| 79 | - Then 'the active sub tab should be Attachments' do | |
| 80 | - ensure_active_sub_tab('Attachments') | |
| 79 | + Then 'the active sub nav should be Hooks' do | |
| 80 | + ensure_active_sub_nav('Web Hooks') | |
| 81 | 81 | end |
| 82 | 82 | |
| 83 | - Then 'the active sub tab should be Snippets' do | |
| 84 | - ensure_active_sub_tab('Snippets') | |
| 85 | - end | |
| 86 | - | |
| 87 | - Then 'the active sub tab should be Edit' do | |
| 88 | - ensure_active_sub_tab('Edit') | |
| 89 | - end | |
| 90 | - | |
| 91 | - Then 'the active sub tab should be Hooks' do | |
| 92 | - ensure_active_sub_tab('Web Hooks') | |
| 93 | - end | |
| 94 | - | |
| 95 | - Then 'the active sub tab should be Deploy Keys' do | |
| 96 | - ensure_active_sub_tab('Deploy Keys') | |
| 83 | + Then 'the active sub nav should be Deploy Keys' do | |
| 84 | + ensure_active_sub_nav('Deploy Keys') | |
| 97 | 85 | end |
| 98 | 86 | |
| 99 | 87 | # Sub Tabs: Commits | ... | ... |
features/steps/shared/active_tab.rb
| ... | ... | @@ -13,6 +13,10 @@ module SharedActiveTab |
| 13 | 13 | page.find('div.content ul.nav-tabs li.active').should have_content(content) |
| 14 | 14 | end |
| 15 | 15 | |
| 16 | + def ensure_active_sub_nav(content) | |
| 17 | + page.find('div.content ul.nav-stacked-menu li.active').should have_content(content) | |
| 18 | + end | |
| 19 | + | |
| 16 | 20 | And 'no other main tabs should be active' do |
| 17 | 21 | page.should have_selector('.main-nav li.active', count: 1) |
| 18 | 22 | end |
| ... | ... | @@ -20,4 +24,8 @@ module SharedActiveTab |
| 20 | 24 | And 'no other sub tabs should be active' do |
| 21 | 25 | page.should have_selector('div.content ul.nav-tabs li.active', count: 1) |
| 22 | 26 | end |
| 27 | + | |
| 28 | + And 'no other sub navs should be active' do | |
| 29 | + page.should have_selector('div.content ul.nav-stacked-menu li.active', count: 1) | |
| 30 | + end | |
| 23 | 31 | end | ... | ... |