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
Tatuya Kamada
gitlab-ce
Commits
b1be377f
Commit
b1be377f
authored
Nov 01, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Spinach feature for Commit breadcrumbs
parent
badb092a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
features/project/commits/commits.feature
features/project/commits/commits.feature
+4
-0
features/steps/project/project_browse_commits.rb
features/steps/project/project_browse_commits.rb
+9
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
No files found.
features/project/commits/commits.feature
View file @
b1be377f
...
@@ -19,3 +19,7 @@ Feature: Project Browse commits
...
@@ -19,3 +19,7 @@ Feature: Project Browse commits
Given
I visit compare refs page
Given
I visit compare refs page
And
I fill compare fields with refs
And
I fill compare fields with refs
Then
I see compared refs
Then
I see compared refs
Scenario
:
I
browse commits for a specific path
Given
I visit my project's commits page for a specific path
Then
I see breadcrumb links
features/steps/project/project_browse_commits.rb
View file @
b1be377f
...
@@ -42,4 +42,13 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
...
@@ -42,4 +42,13 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
page
.
should
have_content
"Commits (1)"
page
.
should
have_content
"Commits (1)"
page
.
should
have_content
"Showing 2 changed files"
page
.
should
have_content
"Showing 2 changed files"
end
end
Then
'I see breadcrumb links'
do
page
.
should
have_selector
(
'ul.breadcrumb'
)
page
.
should
have_selector
(
'ul.breadcrumb span.divider'
,
count:
3
)
page
.
should
have_selector
(
'ul.breadcrumb a'
,
count:
4
)
find
(
'ul.breadcrumb li:first a'
)[
'href'
].
should
match
(
/
#{
@project
.
path
}
\/commits\/master\z/
)
find
(
'ul.breadcrumb li:last a'
)[
'href'
].
should
match
(
%r{master/app/models/project
\.
rb
\z
}
)
end
end
end
features/steps/shared/paths.rb
View file @
b1be377f
...
@@ -121,6 +121,10 @@ module SharedPaths
...
@@ -121,6 +121,10 @@ module SharedPaths
visit
project_commits_path
(
@project
,
@project
.
root_ref
,
{
limit:
5
})
visit
project_commits_path
(
@project
,
@project
.
root_ref
,
{
limit:
5
})
end
end
Given
"I visit my project's commits page for a specific path"
do
visit
project_commits_path
(
@project
,
@project
.
root_ref
+
"/app/models/project.rb"
,
{
limit:
5
})
end
Given
"I visit my project's network page"
do
Given
"I visit my project's network page"
do
# Stub GraphCommit max_size to speed up test (10 commits vs. 650)
# Stub GraphCommit max_size to speed up test (10 commits vs. 650)
Gitlab
::
GraphCommit
.
stub
(
max_count:
10
)
Gitlab
::
GraphCommit
.
stub
(
max_count:
10
)
...
...
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