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
7086dac4
Commit
7086dac4
authored
Nov 29, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes after review
Fix broken test Remove spinach tests for the builds tab
parent
9a82aa70
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
20 deletions
+9
-20
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+1
-1
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+1
-1
config/routes/project.rb
config/routes/project.rb
+0
-2
features/project/commits/commits.feature
features/project/commits/commits.feature
+0
-2
features/steps/project/commits/commits.rb
features/steps/project/commits/commits.rb
+0
-9
spec/features/projects/commit/builds_spec.rb
spec/features/projects/commit/builds_spec.rb
+7
-5
No files found.
app/controllers/projects/commit_controller.rb
View file @
7086dac4
...
...
@@ -8,6 +8,7 @@ class Projects::CommitController < Projects::ApplicationController
# Authorize
before_action
:require_non_empty_project
before_action
:authorize_download_code!
before_action
:authorize_read_pipeline!
,
only:
[
:pipelines
]
before_action
:commit
before_action
:define_commit_vars
,
only:
[
:show
,
:diff_for_path
,
:pipelines
]
...
...
@@ -107,7 +108,6 @@ class Projects::CommitController < Projects::ApplicationController
def
define_status_vars
@ci_pipelines
=
project
.
pipelines
.
where
(
sha:
commit
.
sha
)
@statuses
=
CommitStatus
.
where
(
pipeline:
@ci_pipelines
).
relevant
end
def
assign_change_commit_vars
(
mr_source_branch
)
...
...
app/helpers/ci_status_helper.rb
View file @
7086dac4
module
CiStatusHelper
def
ci_status_path
(
pipeline
)
project
=
pipeline
.
project
# builds_namespace_project_commit_path(project.namespace, project, pipeline.sha
)
namespace_project_pipeline_path
(
project
.
namespace
,
project
,
pipeline
)
end
# Is used by Commit and Merge Request Widget
...
...
config/routes/project.rb
View file @
7086dac4
...
...
@@ -33,8 +33,6 @@ constraints(ProjectUrlConstrainer.new) do
member
do
get
:branches
get
:pipelines
post
:cancel_builds
post
:retry_builds
post
:revert
post
:cherry_pick
get
:diff_for_path
...
...
features/project/commits/commits.feature
View file @
7086dac4
...
...
@@ -47,8 +47,6 @@ Feature: Project Commits
And
repository contains
".gitlab-ci.yml"
file
When
I click on commit link
Then
I see commit ci info
And
I click status link
Then
I see builds list
Scenario
:
I
browse commit with side-by-side diff view
Given
I click on commit link
...
...
features/steps/project/commits/commits.rb
View file @
7086dac4
...
...
@@ -166,15 +166,6 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
expect
(
page
).
to
have_content
"Pipeline #1 for 570e7b2a pending"
end
step
'I click status link'
do
find
(
'.commit-ci-menu'
).
click_link
"Builds"
end
step
'I see builds list'
do
expect
(
page
).
to
have_content
"Pipeline #1 for 570e7b2a pending"
expect
(
page
).
to
have_content
"1 build"
end
step
'I search "submodules" commits'
do
fill_in
'commits-search'
,
with:
'submodules'
end
...
...
spec/features/projects/commit/builds_spec.rb
View file @
7086dac4
require
'spec_helper'
feature
'project commit
build
s'
do
feature
'project commit
pipeline
s'
do
given
(
:project
)
{
create
(
:project
)
}
background
do
...
...
@@ -16,11 +16,13 @@ feature 'project commit builds' do
ref:
'master'
)
end
scenario
'user views commit builds page'
do
visit
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
project
.
commit
.
sha
)
scenario
'user views commit pipelines page'
do
visit
pipelines_namespace_project_commit_path
(
project
.
namespace
,
project
,
project
.
commit
.
sha
)
expect
(
page
).
to
have_content
(
'Builds'
)
page
.
within
(
'.table-holder'
)
do
expect
(
page
).
to
have_content
project
.
pipelines
[
0
].
status
# pipeline status
expect
(
page
).
to
have_content
project
.
pipelines
[
0
].
id
# pipeline ids
end
end
end
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