Fixed sub navs spinach tests for project
This commit is contained in:
parent
1811d32e23
commit
cc2145da80
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue