Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
cada511f
Commit
cada511f
authored
Sep 25, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add features for checking the "Active Tab" across various pages
parent
f814da38
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
535 additions
and
7 deletions
+535
-7
features/admin/active_tab.feature
features/admin/active_tab.feature
+33
-0
features/dashboard/active_tab.feature
features/dashboard/active_tab.feature
+28
-0
features/profile/active_tab.feature
features/profile/active_tab.feature
+28
-0
features/project/active_tab.feature
features/project/active_tab.feature
+147
-0
features/steps/admin/admin_active_tab.rb
features/steps/admin/admin_active_tab.rb
+29
-0
features/steps/dashboard/dashboard_active_tab.rb
features/steps/dashboard/dashboard_active_tab.rb
+25
-0
features/steps/profile/profile_active_tab.rb
features/steps/profile/profile_active_tab.rb
+25
-0
features/steps/project/project_active_tab.rb
features/steps/project/project_active_tab.rb
+146
-0
features/steps/shared/active_tab.rb
features/steps/shared/active_tab.rb
+11
-0
features/steps/shared/authentication.rb
features/steps/shared/authentication.rb
+4
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+59
-7
No files found.
features/admin/active_tab.feature
0 → 100644
View file @
cada511f
Feature
:
Admin active tab
Background
:
Given
I sign in as an admin
Scenario
:
On Admin Home
Given
I visit admin page
Then
the active main tab should be Home
And
no other main tabs should be active
Scenario
:
On Admin Projects
Given
I visit admin projects page
Then
the active main tab should be Projects
And
no other main tabs should be active
Scenario
:
On Admin Users
Given
I visit admin users page
Then
the active main tab should be Users
And
no other main tabs should be active
Scenario
:
On Admin Logs
Given
I visit admin logs page
Then
the active main tab should be Logs
And
no other main tabs should be active
Scenario
:
On Admin Hooks
Given
I visit admin hooks page
Then
the active main tab should be Hooks
And
no other main tabs should be active
Scenario
:
On Admin Resque
Given
I visit admin Resque page
Then
the active main tab should be Resque
And
no other main tabs should be active
features/dashboard/active_tab.feature
0 → 100644
View file @
cada511f
Feature
:
Dashboard active tab
Background
:
Given
I sign in as a user
Scenario
:
On Dashboard Home
Given
I visit dashboard page
Then
the active main tab should be Home
And
no other main tabs should be active
Scenario
:
On Dashboard Issues
Given
I visit dashboard issues page
Then
the active main tab should be Issues
And
no other main tabs should be active
Scenario
:
On Dashboard Merge Requests
Given
I visit dashboard merge requests page
Then
the active main tab should be Merge Requests
And
no other main tabs should be active
Scenario
:
On Dashboard Search
Given
I visit dashboard search page
Then
the active main tab should be Search
And
no other main tabs should be active
Scenario
:
On Dashboard Help
Given
I visit dashboard help page
Then
the active main tab should be Help
And
no other main tabs should be active
features/profile/active_tab.feature
0 → 100644
View file @
cada511f
Feature
:
Profile active tab
Background
:
Given
I sign in as a user
Scenario
:
On Profile Home
Given
I visit profile page
Then
the active main tab should be Home
And
no other main tabs should be active
Scenario
:
On Profile Account
Given
I visit profile account page
Then
the active main tab should be Account
And
no other main tabs should be active
Scenario
:
On Profile SSH Keys
Given
I visit profile SSH keys page
Then
the active main tab should be SSH Keys
And
no other main tabs should be active
Scenario
:
On Profile Design
Given
I visit profile design page
Then
the active main tab should be Design
And
no other main tabs should be active
Scenario
:
On Profile History
Given
I visit profile history page
Then
the active main tab should be History
And
no other main tabs should be active
features/project/active_tab.feature
0 → 100644
View file @
cada511f
Feature
:
Project active tab
Background
:
Given
I sign in as a user
And
I own a project
# Main Tabs
Scenario
:
On Project Home
Given
I visit my project's home page
Then
the active main tab should be Home
And
no other main tabs should be active
Scenario
:
On Project Files
Given
I visit my project's files page
Then
the active main tab should be Files
And
no other main tabs should be active
Scenario
:
On Project Commits
Given
I visit my project's commits page
Then
the active main tab should be Commits
And
no other main tabs should be active
Scenario
:
On Project Network
Given
I visit my project's network page
Then
the active main tab should be Network
And
no other main tabs should be active
Scenario
:
On Project Issues
Given
I visit my project's issues page
Then
the active main tab should be Issues
And
no other main tabs should be active
Scenario
:
On Project Merge Requests
Given
I visit my project's merge requests page
Then
the active main tab should be Merge Requests
And
no other main tabs should be active
Scenario
:
On Project Wall
Given
I visit my project's wall page
Then
the active main tab should be Wall
And
no other main tabs should be active
Scenario
:
On Project Wiki
Given
I visit my project's wiki page
Then
the active main tab should be Wiki
And
no other main tabs should be active
# Sub Tabs: Home
Scenario
:
On Project Home/Show
Given
I visit my project's home page
Then
the active sub tab should be Show
And
no other sub tabs should be active
And
the active main tab should be Home
Scenario
:
On Project Home/Team
Given
I visit my project's home page
And
I click the
"Team"
tab
Then
the active sub tab should be Team
And
no other sub tabs should be active
And
the active main tab should be Home
Scenario
:
On Project Home/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 Home/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
Scenario
:
On Project Home/Edit
Given
I visit my project's home page
And
I click the
"Edit"
tab
Then
the active sub tab should be Edit
And
no other sub tabs should be active
And
the active main tab should be Home
Scenario
:
On Project Home/Hooks
Given
I visit my project's home page
And
I click the
"Hooks"
tab
Then
the active sub tab should be Hooks
And
no other sub tabs should be active
And
the active main tab should be Home
Scenario
:
On Project Home/Deploy Keys
Given
I visit my project's home 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
And
the active main tab should be Home
# Sub Tabs: Commits
Scenario
:
On Project Commits/Commits
Given
I visit my project's commits page
Then
the active sub tab should be Commits
And
no other sub tabs should be active
And
the active main tab should be Commits
Scenario
:
On Project Commits/Compare
Given
I visit my project's commits page
And
I click the
"Compare"
tab
Then
the active sub tab should be Compare
And
no other sub tabs should be active
And
the active main tab should be Commits
Scenario
:
On Project Commits/Branches
Given
I visit my project's commits page
And
I click the
"Branches"
tab
Then
the active sub tab should be Branches
And
no other sub tabs should be active
And
the active main tab should be Commits
Scenario
:
On Project Commits/Tags
Given
I visit my project's commits page
And
I click the
"Tags"
tab
Then
the active sub tab should be Tags
And
no other sub tabs should be active
And
the active main tab should be Commits
# Sub Tabs: Issues
Scenario
:
On Project Issues/Browse
Given
I visit my project's issues page
Then
the active sub tab should be Browse Issues
And
no other sub tabs should be active
And
the active main tab should be Issues
Scenario
:
On Project Issues/Milestones
Given
I visit my project's issues page
And
I click the
"Milestones"
tab
Then
the active sub tab should be Milestones
And
no other sub tabs should be active
And
the active main tab should be Issues
Scenario
:
On Project Issues/Labels
Given
I visit my project's issues page
And
I click the
"Labels"
tab
Then
the active sub tab should be Labels
And
no other sub tabs should be active
And
the active main tab should be Issues
features/steps/admin/admin_active_tab.rb
0 → 100644
View file @
cada511f
class
AdminActiveTab
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedActiveTab
Then
'the active main tab should be Home'
do
ensure_active_main_tab
(
'Stats'
)
end
Then
'the active main tab should be Projects'
do
ensure_active_main_tab
(
'Projects'
)
end
Then
'the active main tab should be Users'
do
ensure_active_main_tab
(
'Users'
)
end
Then
'the active main tab should be Logs'
do
ensure_active_main_tab
(
'Logs'
)
end
Then
'the active main tab should be Hooks'
do
ensure_active_main_tab
(
'Hooks'
)
end
Then
'the active main tab should be Resque'
do
ensure_active_main_tab
(
'Resque'
)
end
end
features/steps/dashboard/dashboard_active_tab.rb
0 → 100644
View file @
cada511f
class
DashboardActiveTab
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedActiveTab
Then
'the active main tab should be Home'
do
ensure_active_main_tab
(
'Home'
)
end
Then
'the active main tab should be Issues'
do
ensure_active_main_tab
(
'Issues'
)
end
Then
'the active main tab should be Merge Requests'
do
ensure_active_main_tab
(
'Merge Requests'
)
end
Then
'the active main tab should be Search'
do
ensure_active_main_tab
(
'Search'
)
end
Then
'the active main tab should be Help'
do
ensure_active_main_tab
(
'Help'
)
end
end
features/steps/profile/profile_active_tab.rb
0 → 100644
View file @
cada511f
class
ProfileActiveTab
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedActiveTab
Then
'the active main tab should be Home'
do
ensure_active_main_tab
(
'Profile'
)
end
Then
'the active main tab should be Account'
do
ensure_active_main_tab
(
'Account'
)
end
Then
'the active main tab should be SSH Keys'
do
ensure_active_main_tab
(
'SSH Keys'
)
end
Then
'the active main tab should be Design'
do
ensure_active_main_tab
(
'Design'
)
end
Then
'the active main tab should be History'
do
ensure_active_main_tab
(
'History'
)
end
end
features/steps/project/project_active_tab.rb
0 → 100644
View file @
cada511f
class
ProjectActiveTab
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
include
SharedActiveTab
# Main Tabs
Then
'the active main tab should be Home'
do
ensure_active_main_tab
(
@project
.
name
)
end
Then
'the active main tab should be Files'
do
ensure_active_main_tab
(
'Files'
)
end
Then
'the active main tab should be Commits'
do
ensure_active_main_tab
(
'Commits'
)
end
Then
'the active main tab should be Network'
do
ensure_active_main_tab
(
'Network'
)
end
Then
'the active main tab should be Issues'
do
ensure_active_main_tab
(
'Issues'
)
end
Then
'the active main tab should be Merge Requests'
do
ensure_active_main_tab
(
'Merge Requests'
)
end
Then
'the active main tab should be Wall'
do
ensure_active_main_tab
(
'Wall'
)
end
Then
'the active main tab should be Wiki'
do
ensure_active_main_tab
(
'Wiki'
)
end
# Sub Tabs: Home
Given
'I click the "Team" tab'
do
click_link
(
'Team'
)
end
Given
'I click the "Attachments" tab'
do
click_link
(
'Attachments'
)
end
Given
'I click the "Snippets" tab'
do
click_link
(
'Snippets'
)
end
Given
'I click the "Edit" tab'
do
click_link
(
'Edit'
)
end
Given
'I click the "Hooks" tab'
do
click_link
(
'Hooks'
)
end
Given
'I click the "Deploy Keys" tab'
do
click_link
(
'Deploy Keys'
)
end
Then
'the active sub tab should be Show'
do
ensure_active_sub_tab
(
'Show'
)
end
Then
'the active sub tab should be Team'
do
ensure_active_sub_tab
(
'Team'
)
end
Then
'the active sub tab should be Attachments'
do
ensure_active_sub_tab
(
'Attachments'
)
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
(
'Hooks'
)
end
Then
'the active sub tab should be Deploy Keys'
do
ensure_active_sub_tab
(
'Deploy Keys'
)
end
# Sub Tabs: Commits
Given
'I click the "Compare" tab'
do
click_link
(
'Compare'
)
end
Given
'I click the "Branches" tab'
do
click_link
(
'Branches'
)
end
Given
'I click the "Tags" tab'
do
click_link
(
'Tags'
)
end
Then
'the active sub tab should be Commits'
do
ensure_active_sub_tab
(
'Commits'
)
end
Then
'the active sub tab should be Compare'
do
ensure_active_sub_tab
(
'Compare'
)
end
Then
'the active sub tab should be Branches'
do
ensure_active_sub_tab
(
'Branches'
)
end
Then
'the active sub tab should be Tags'
do
ensure_active_sub_tab
(
'Tags'
)
end
# Sub Tabs: Issues
Given
'I click the "Milestones" tab'
do
click_link
(
'Milestones'
)
end
Given
'I click the "Labels" tab'
do
click_link
(
'Labels'
)
end
Then
'the active sub tab should be Browse Issues'
do
ensure_active_sub_tab
(
'Browse Issues'
)
end
Then
'the active sub tab should be Milestones'
do
ensure_active_sub_tab
(
'Milestones'
)
end
Then
'the active sub tab should be Labels'
do
ensure_active_sub_tab
(
'Labels'
)
end
end
features/steps/shared/active_tab.rb
0 → 100644
View file @
cada511f
module
SharedActiveTab
include
Spinach
::
DSL
def
ensure_active_main_tab
(
content
)
page
.
find
(
'ul.main_menu li.current'
).
should
have_content
(
content
)
end
And
'no other main tabs should be active'
do
page
.
should
have_selector
(
'ul.main_menu li.current'
,
count:
1
)
end
end
features/steps/shared/authentication.rb
View file @
cada511f
...
...
@@ -7,4 +7,8 @@ module SharedAuthentication
Given
'I sign in as a user'
do
login_as
:user
end
Given
'I sign in as an admin'
do
login_as
:admin
end
end
features/steps/shared/paths.rb
View file @
cada511f
module
SharedPaths
include
Spinach
::
DSL
And
'I visit dashboard search page'
do
visit
search_path
# ----------------------------------------
# Dashboard
# ----------------------------------------
Given
'I visit dashboard page'
do
visit
dashboard_path
end
Given
'I visit dashboard issues page'
do
visit
dashboard_issues_path
end
And
'I visit dashboard merge requests page'
do
Given
'I visit dashboard merge requests page'
do
visit
dashboard_merge_requests_path
end
And
'I visit dashboard issues
page'
do
visit
dashboard_issues
_path
Given
'I visit dashboard search
page'
do
visit
search
_path
end
When
'I visit dashboard
page'
do
visit
dashboard
_path
Given
'I visit dashboard help
page'
do
visit
help
_path
end
# ----------------------------------------
# Profile
# ----------------------------------------
Given
'I visit profile page'
do
visit
profile_path
end
...
...
@@ -25,10 +37,50 @@ module SharedPaths
visit
profile_account_path
end
Given
'I visit profile SSH keys page'
do
visit
keys_path
end
Given
'I visit profile design page'
do
visit
profile_design_path
end
Given
'I visit profile history page'
do
visit
profile_history_path
end
Given
'I visit profile token page'
do
visit
profile_token_path
end
# ----------------------------------------
# Admin
# ----------------------------------------
Given
'I visit admin page'
do
visit
admin_root_path
end
Given
'I visit admin projects page'
do
visit
admin_projects_path
end
Given
'I visit admin users page'
do
visit
admin_users_path
end
Given
'I visit admin logs page'
do
visit
admin_logs_path
end
Given
'I visit admin hooks page'
do
visit
admin_hooks_path
end
Given
'I visit admin Resque page'
do
visit
admin_resque_path
end
When
'I visit new project page'
do
visit
new_project_path
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment