BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8877f2e8
Commit
8877f2e8
authored
Jul 19, 2017
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reword success to passing for pipeline badges
parent
2086483b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
3 deletions
+22
-3
zj-pipeline-badge-improvements.yml
changelogs/unreleased/zj-pipeline-badge-improvements.yml
+4
-0
build.rb
features/steps/project/badges/build.rb
+1
-1
template.rb
lib/gitlab/badge/pipeline/template.rb
+2
-1
pipeline_badge_spec.rb
spec/features/projects/badges/pipeline_badge_spec.rb
+14
-0
template_spec.rb
spec/lib/gitlab/badge/pipeline/template_spec.rb
+1
-1
No files found.
changelogs/unreleased/zj-pipeline-badge-improvements.yml
0 → 100644
View file @
8877f2e8
---
title
:
Update build badges to be pipeline badges and display passing instead of success
merge_request
:
author
:
features/steps/project/badges/build.rb
View file @
8877f2e8
...
...
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
end
step
'I should see a build success badge'
do
expect_badge
(
'
success
'
)
expect_badge
(
'
passed
'
)
end
step
'I should see a build failed badge'
do
...
...
lib/gitlab/badge/pipeline/template.rb
View file @
8877f2e8
...
...
@@ -7,6 +7,7 @@ module Gitlab
# Template object will be passed to badge.svg.erb template.
#
class
Template
<
Badge
::
Template
STATUS_RENAME
=
{
'success'
=>
'passed'
}.
freeze
STATUS_COLOR
=
{
success:
'#4c1'
,
failed:
'#e05d44'
,
...
...
@@ -27,7 +28,7 @@ module Gitlab
end
def
value_text
@status
.
to_s
STATUS_RENAME
[
@status
.
to_s
]
||
@status
.
to_s
end
def
key_width
...
...
spec/features/projects/badges/pipeline_badge_spec.rb
0 → 100644
View file @
8877f2e8
require
'spec_helper'
feature
'pipeline badge'
do
let
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
# this can't be tested in the controller, as it bypasses the rails router
# and constructs a route based on the controller being tested
# Keep around until 10.0, see gitlab-org/gitlab-ce#35307
scenario
'user request the deprecated build status badge'
do
visit
build_project_badges_path
(
project
,
ref:
project
.
default_branch
,
format: :svg
)
expect
(
page
.
status_code
).
to
eq
(
200
)
end
end
spec/lib/gitlab/badge/pipeline/template_spec.rb
View file @
8877f2e8
...
...
@@ -12,7 +12,7 @@ describe Gitlab::Badge::Pipeline::Template do
describe
'#value_text'
do
it
'is status value'
do
expect
(
template
.
value_text
).
to
eq
'
success
'
expect
(
template
.
value_text
).
to
eq
'
passed
'
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