diff options
author | Phil Hughes <me@iamphill.com> | 2019-03-07 12:38:39 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-03-07 12:38:39 +0300 |
commit | 78a01253aa112de6b2c3feb6784c80982c3b3add (patch) | |
tree | c989d9828e1ca3dd77b861eed0bc8834f1761636 | |
parent | 57b5413893490ad6f3ef93a635f052ee3c50dcc6 (diff) | |
parent | fcd2358530ae67a50b506d864891febfff93810a (diff) |
Merge branch '52459-display-job-names-consistently-on-pipelines-and-environments-list' into 'master'
Resolve "Display job names consistently in pipelines and environments"
Closes #52459
See merge request gitlab-org/gitlab-ce!24984
5 files changed, 14 insertions, 10 deletions
diff --git a/app/assets/javascripts/environments/components/environment_item.vue b/app/assets/javascripts/environments/components/environment_item.vue index eb817beab9d..1e89dce69cb 100644 --- a/app/assets/javascripts/environments/components/environment_item.vue +++ b/app/assets/javascripts/environments/components/environment_item.vue @@ -3,7 +3,6 @@ import Timeago from 'timeago.js'; import _ from 'underscore'; import { GlTooltipDirective } from '@gitlab/ui'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; -import { humanize } from '~/lib/utils/text_utility'; import Icon from '~/vue_shared/components/icon.vue'; import ActionsComponent from './environment_actions.vue'; import ExternalUrlComponent from './environment_external_url.vue'; @@ -156,7 +155,7 @@ export default { const combinedActions = (manualActions || []).concat(scheduledActions || []); return combinedActions.map(action => ({ ...action, - name: humanize(action.name), + name: action.name, })); }, diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index f4c91377ecb..e45c5be76de 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -11,4 +11,4 @@ - next unless can?(current_user, :update_build, action) %li = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow', class: 'btn' do - %span= action.name.humanize + %span= action.name diff --git a/changelogs/unreleased/52459-display-job-names-consistently-on-pipelines-and-environments-list.yml b/changelogs/unreleased/52459-display-job-names-consistently-on-pipelines-and-environments-list.yml new file mode 100644 index 00000000000..816fee1ccfc --- /dev/null +++ b/changelogs/unreleased/52459-display-job-names-consistently-on-pipelines-and-environments-list.yml @@ -0,0 +1,5 @@ +--- +title: Display job names consistently on pipelines and environments list +merge_request: 24984 +author: +type: fixed diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb index a8a3b6910fb..3090f1a2131 100644 --- a/spec/features/projects/environments/environment_spec.rb +++ b/spec/features/projects/environments/environment_spec.rb @@ -120,7 +120,7 @@ describe 'Environment' do end it 'does show a play button' do - expect(page).to have_link(action.name.humanize) + expect(page).to have_link(action.name) end it 'does allow to play manual action', :js do @@ -128,7 +128,7 @@ describe 'Environment' do find('button.dropdown').click - expect { click_link(action.name.humanize) } + expect { click_link(action.name) } .not_to change { Ci::Pipeline.count } wait_for_all_requests @@ -140,7 +140,7 @@ describe 'Environment' do context 'when user has no ability to trigger a deployment' do it 'does not show a play button' do - expect(page).not_to have_link(action.name.humanize) + expect(page).not_to have_link(action.name) end end diff --git a/spec/features/projects/environments/environments_spec.rb b/spec/features/projects/environments/environments_spec.rb index 66c6545204b..b2a435e554d 100644 --- a/spec/features/projects/environments/environments_spec.rb +++ b/spec/features/projects/environments/environments_spec.rb @@ -183,14 +183,14 @@ describe 'Environments page', :js do it 'shows a play button' do find('.js-environment-actions-dropdown').click - expect(page).to have_content(action.name.humanize) + expect(page).to have_content(action.name) end it 'allows to play a manual action', :js do expect(action).to be_manual find('.js-environment-actions-dropdown').click - expect(page).to have_content(action.name.humanize) + expect(page).to have_content(action.name) expect { find('.js-manual-action-link').click } .not_to change { Ci::Pipeline.count } @@ -311,7 +311,7 @@ describe 'Environments page', :js do it "has link to the delayed job's action" do find('.js-environment-actions-dropdown').click - expect(page).to have_button('Delayed job') + expect(page).to have_button('delayed job') expect(page).to have_content(/\d{2}:\d{2}:\d{2}/) end @@ -333,7 +333,7 @@ describe 'Environments page', :js do context 'when user played a delayed job immediately' do before do find('.js-environment-actions-dropdown').click - page.accept_confirm { click_button('Delayed job') } + page.accept_confirm { click_button('delayed job') } wait_for_requests end |