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
4472779b
Commit
4472779b
authored
Jan 25, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds tests to build view
Fix CHANGELOG entry
parent
a0872833
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
app/views/projects/builds/_header.html.haml
app/views/projects/builds/_header.html.haml
+1
-1
changelogs/unreleased/26947-build-status-self-link.yml
changelogs/unreleased/26947-build-status-self-link.yml
+2
-2
spec/views/projects/builds/show.html.haml_spec.rb
spec/views/projects/builds/show.html.haml_spec.rb
+26
-0
No files found.
app/views/projects/builds/_header.html.haml
View file @
4472779b
...
...
@@ -2,7 +2,7 @@
.header-content
=
render
'ci/status/badge'
,
status:
@build
.
detailed_status
(
current_user
)
Build
%strong
##{@build.id}
%strong
.js-build-id
##{@build.id}
in pipeline
=
link_to
pipeline_path
(
@build
.
pipeline
)
do
%strong
##{@build.pipeline.id}
...
...
changelogs/unreleased/26947-build-status-self-link.yml
View file @
4472779b
---
title
:
Add new ci status partial to render a badge without a link
merge_request
:
author
:
8740
merge_request
:
8740
author
:
spec/views/projects/builds/show.html.haml_spec.rb
View file @
4472779b
...
...
@@ -15,6 +15,32 @@ describe 'projects/builds/show', :view do
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
end
describe
'build information in header'
do
let
(
:build
)
do
create
(
:ci_build
,
:success
,
environment:
'staging'
)
end
before
do
render
end
it
'shows status name'
do
expect
(
rendered
).
to
have_css
(
'.ci-status.ci-success'
,
text:
'passed'
)
end
it
'shows build id'
do
expect
(
rendered
).
to
have_css
(
'.js-build-id'
,
text:
build
.
id
)
end
it
'shows a link to the pipeline'
do
expect
(
rendered
).
to
have_link
(
build
.
pipeline
.
id
)
end
it
'shows a link to the commit'
do
expect
(
rendered
).
to
have_link
(
build
.
pipeline
.
short_sha
)
end
end
describe
'environment info in build view'
do
context
'build with latest deployment'
do
let
(
:build
)
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