summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Rose <sam@gitlab.com>2017-01-01 09:04:30 -0500
committerSam Rose <sam@gitlab.com>2017-01-16 07:55:20 -0500
commit3f2eaaa26b68a61c506f847c8f56d7411058da7f (patch)
treed514cf4e15ee4efb35fbaab9dd32da3092d4f67a
parent4b43126d08972c201551fbd1fe42e85847d5e03f (diff)
downloadgitlab-ce-25946-manual-pipeline-dropdown-casing.tar.gz
Retain original casing for build name in manual pipeline dropdown25946-manual-pipeline-dropdown-casing
-rw-r--r--app/serializers/build_action_entity.rb2
-rw-r--r--app/views/projects/ci/pipelines/_pipeline.html.haml2
-rw-r--r--changelogs/unreleased/25946-manual-pipeline-dropdown-casing.yml4
-rw-r--r--spec/features/projects/pipelines/pipelines_spec.rb4
-rw-r--r--spec/serializers/build_action_entity_spec.rb4
5 files changed, 10 insertions, 6 deletions
diff --git a/app/serializers/build_action_entity.rb b/app/serializers/build_action_entity.rb
index 3e72892d584..184f5fd4b52 100644
--- a/app/serializers/build_action_entity.rb
+++ b/app/serializers/build_action_entity.rb
@@ -2,7 +2,7 @@ class BuildActionEntity < Grape::Entity
include RequestAwareEntity
expose :name do |build|
- build.name.humanize
+ build.name
end
expose :path do |build|
diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index 6ce586cc8f6..990bfbcf951 100644
--- a/app/views/projects/ci/pipelines/_pipeline.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -86,7 +86,7 @@
%li
= link_to play_namespace_project_build_path(pipeline.project.namespace, pipeline.project, build), method: :post, rel: 'nofollow' do
= custom_icon('icon_play')
- %span= build.name.humanize
+ %span= build.name
- if artifacts.present?
.btn-group
%button.dropdown-toggle.btn.btn-default.build-artifacts.js-pipeline-dropdown-download{ type: 'button', 'data-toggle' => 'dropdown' }
diff --git a/changelogs/unreleased/25946-manual-pipeline-dropdown-casing.yml b/changelogs/unreleased/25946-manual-pipeline-dropdown-casing.yml
new file mode 100644
index 00000000000..b753c823348
--- /dev/null
+++ b/changelogs/unreleased/25946-manual-pipeline-dropdown-casing.yml
@@ -0,0 +1,4 @@
+---
+title: Use original casing for build action text
+merge_request: 8387
+author:
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb
index 3ba996e2e10..ca18ac073d8 100644
--- a/spec/features/projects/pipelines/pipelines_spec.rb
+++ b/spec/features/projects/pipelines/pipelines_spec.rb
@@ -128,13 +128,13 @@ describe 'Pipelines', :feature, :js do
it 'has link to the manual action' do
find('.js-pipeline-dropdown-manual-actions').click
- expect(page).to have_link('Manual build')
+ expect(page).to have_link('manual build')
end
context 'when manual action was played' do
before do
find('.js-pipeline-dropdown-manual-actions').click
- click_link('Manual build')
+ click_link('manual build')
end
it 'enqueues manual action job' do
diff --git a/spec/serializers/build_action_entity_spec.rb b/spec/serializers/build_action_entity_spec.rb
index 383704572b1..0f7be8b2c39 100644
--- a/spec/serializers/build_action_entity_spec.rb
+++ b/spec/serializers/build_action_entity_spec.rb
@@ -10,8 +10,8 @@ describe BuildActionEntity do
describe '#as_json' do
subject { entity.as_json }
- it 'contains humanized build name' do
- expect(subject[:name]).to eq 'Test build'
+ it 'contains original build name' do
+ expect(subject[:name]).to eq 'test_build'
end
it 'contains path to the action play' do