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
Jérome Perrin
gitlab-ce
Commits
7cfb445c
Commit
7cfb445c
authored
Jun 02, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests to match new Code tab logic
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
56a17a77
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+1
-1
features/project/active_tab.feature
features/project/active_tab.feature
+19
-18
features/steps/project/active_tab.rb
features/steps/project/active_tab.rb
+4
-0
features/steps/shared/project_tab.rb
features/steps/shared/project_tab.rb
+2
-6
No files found.
app/controllers/projects/branches_controller.rb
View file @
7cfb445c
...
@@ -50,7 +50,7 @@ class Projects::BranchesController < Projects::ApplicationController
...
@@ -50,7 +50,7 @@ class Projects::BranchesController < Projects::ApplicationController
redirect_to
namespace_project_branches_path
(
@project
.
namespace
,
redirect_to
namespace_project_branches_path
(
@project
.
namespace
,
@project
),
status:
303
@project
),
status:
303
end
end
format
.
js
{
head
:ok
}
format
.
js
{
render
nothing:
true
,
status:
status
[
:return_code
]
}
end
end
end
end
...
...
features/project/active_tab.feature
View file @
7cfb445c
...
@@ -10,14 +10,9 @@ Feature: Project Active Tab
...
@@ -10,14 +10,9 @@ Feature: Project Active Tab
Then
the active main tab should be Home
Then
the active main tab should be Home
And
no other main tabs should be active
And
no other main tabs should be active
Scenario
:
On Project
Files
Scenario
:
On Project
Code
Given
I visit my project's files page
Given
I visit my project's files page
Then
the active main tab should be Files
Then
the active main tab should be Code
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
And
no other main tabs should be active
Scenario
:
On Project Issues
Scenario
:
On Project Issues
...
@@ -64,40 +59,46 @@ Feature: Project Active Tab
...
@@ -64,40 +59,46 @@ Feature: Project Active Tab
And
no other sub navs should be active
And
no other sub navs should be active
And
the active main tab should be Settings
And
the active main tab should be Settings
# Sub Tabs: Commits
# Sub Tabs: Code
Scenario
:
On Project Code/Files
Given
I visit my project's files page
Then
the active sub tab should be Files
And
no other sub tabs should be active
And
the active main tab should be Code
Scenario
:
On Project Co
mmits
/Commits
Scenario
:
On Project Co
de
/Commits
Given
I visit my project's commits page
Given
I visit my project's commits page
Then
the active sub tab should be Commits
Then
the active sub tab should be Commits
And
no other sub tabs should be active
And
no other sub tabs should be active
And
the active main tab should be Co
mmits
And
the active main tab should be Co
de
Scenario
:
On Project Co
mmits
/Network
Scenario
:
On Project Co
de
/Network
Given
I visit my project's network page
Given
I visit my project's network page
Then
the active sub tab should be Network
Then
the active sub tab should be Network
And
no other sub tabs should be active
And
no other sub tabs should be active
And
the active main tab should be Co
mmits
And
the active main tab should be Co
de
Scenario
:
On Project Co
mmits
/Compare
Scenario
:
On Project Co
de
/Compare
Given
I visit my project's commits page
Given
I visit my project's commits page
And
I click the
"Compare"
tab
And
I click the
"Compare"
tab
Then
the active sub tab should be Compare
Then
the active sub tab should be Compare
And
no other sub tabs should be active
And
no other sub tabs should be active
And
the active main tab should be Co
mmits
And
the active main tab should be Co
de
Scenario
:
On Project Co
mmits
/Branches
Scenario
:
On Project Co
de
/Branches
Given
I visit my project's commits page
Given
I visit my project's commits page
And
I click the
"Branches"
tab
And
I click the
"Branches"
tab
Then
the active sub tab should be Branches
Then
the active sub tab should be Branches
And
no other sub tabs should be active
And
no other sub tabs should be active
And
the active main tab should be Co
mmits
And
the active main tab should be Co
de
Scenario
:
On Project Co
mmits
/Tags
Scenario
:
On Project Co
de
/Tags
Given
I visit my project's commits page
Given
I visit my project's commits page
And
I click the
"Tags"
tab
And
I click the
"Tags"
tab
Then
the active sub tab should be Tags
Then
the active sub tab should be Tags
And
no other sub tabs should be active
And
no other sub tabs should be active
And
the active main tab should be Co
mmits
And
the active main tab should be Co
de
Scenario
:
On Project Issues/Browse
Scenario
:
On Project Issues/Browse
Given
I visit my project's issues page
Given
I visit my project's issues page
...
...
features/steps/project/active_tab.rb
View file @
7cfb445c
...
@@ -63,6 +63,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
...
@@ -63,6 +63,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
click_link
(
'Tags'
)
click_link
(
'Tags'
)
end
end
step
'the active sub tab should be Files'
do
ensure_active_sub_tab
(
'Files'
)
end
step
'the active sub tab should be Commits'
do
step
'the active sub tab should be Commits'
do
ensure_active_sub_tab
(
'Commits'
)
ensure_active_sub_tab
(
'Commits'
)
end
end
...
...
features/steps/shared/project_tab.rb
View file @
7cfb445c
...
@@ -8,12 +8,8 @@ module SharedProjectTab
...
@@ -8,12 +8,8 @@ module SharedProjectTab
ensure_active_main_tab
(
'Project'
)
ensure_active_main_tab
(
'Project'
)
end
end
step
'the active main tab should be Files'
do
step
'the active main tab should be Code'
do
ensure_active_main_tab
(
'Files'
)
ensure_active_main_tab
(
'Code'
)
end
step
'the active main tab should be Commits'
do
ensure_active_main_tab
(
'Commits'
)
end
end
step
'the active main tab should be Graphs'
do
step
'the active main tab should be Graphs'
do
...
...
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