Merge branch '25946-manual-pipeline-dropdown-casing' into 'master'
Retain original casing for build name in manual pipeline dropdown Closes #25946 See merge request !8387
This commit is contained in:
commit
3e0136642f
5 changed files with 10 additions and 6 deletions
|
@ -2,7 +2,7 @@ class BuildActionEntity < Grape::Entity
|
||||||
include RequestAwareEntity
|
include RequestAwareEntity
|
||||||
|
|
||||||
expose :name do |build|
|
expose :name do |build|
|
||||||
build.name.humanize
|
build.name
|
||||||
end
|
end
|
||||||
|
|
||||||
expose :path do |build|
|
expose :path do |build|
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
%li
|
%li
|
||||||
= link_to play_namespace_project_build_path(pipeline.project.namespace, pipeline.project, build), method: :post, rel: 'nofollow' do
|
= link_to play_namespace_project_build_path(pipeline.project.namespace, pipeline.project, build), method: :post, rel: 'nofollow' do
|
||||||
= custom_icon('icon_play')
|
= custom_icon('icon_play')
|
||||||
%span= build.name.humanize
|
%span= build.name
|
||||||
- if artifacts.present?
|
- if artifacts.present?
|
||||||
.btn-group
|
.btn-group
|
||||||
%button.dropdown-toggle.btn.btn-default.build-artifacts.js-pipeline-dropdown-download{ type: 'button', 'data-toggle' => 'dropdown' }
|
%button.dropdown-toggle.btn.btn-default.build-artifacts.js-pipeline-dropdown-download{ type: 'button', 'data-toggle' => 'dropdown' }
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Use original casing for build action text
|
||||||
|
merge_request: 8387
|
||||||
|
author:
|
|
@ -128,13 +128,13 @@ describe 'Pipelines', :feature, :js do
|
||||||
it 'has link to the manual action' do
|
it 'has link to the manual action' do
|
||||||
find('.js-pipeline-dropdown-manual-actions').click
|
find('.js-pipeline-dropdown-manual-actions').click
|
||||||
|
|
||||||
expect(page).to have_link('Manual build')
|
expect(page).to have_link('manual build')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when manual action was played' do
|
context 'when manual action was played' do
|
||||||
before do
|
before do
|
||||||
find('.js-pipeline-dropdown-manual-actions').click
|
find('.js-pipeline-dropdown-manual-actions').click
|
||||||
click_link('Manual build')
|
click_link('manual build')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'enqueues manual action job' do
|
it 'enqueues manual action job' do
|
||||||
|
|
|
@ -10,8 +10,8 @@ describe BuildActionEntity do
|
||||||
describe '#as_json' do
|
describe '#as_json' do
|
||||||
subject { entity.as_json }
|
subject { entity.as_json }
|
||||||
|
|
||||||
it 'contains humanized build name' do
|
it 'contains original build name' do
|
||||||
expect(subject[:name]).to eq 'Test build'
|
expect(subject[:name]).to eq 'test_build'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains path to the action play' do
|
it 'contains path to the action play' do
|
||||||
|
|
Loading…
Reference in a new issue