Commit 20438213 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use `capitalize` instead of `titleize` for manual actions

parent 640924e4
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
%li %li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do
= icon("play") = icon("play")
%span= build.name.titleize %span= build.name.capitalize
- if artifacts.present? - if artifacts.present?
.btn-group .btn-group
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%li %li
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do
= icon("play") = icon("play")
%span= action.name.titleize %span= action.name.capitalize
- if defined?(allow_rollback) && allow_rollback - if defined?(allow_rollback) && allow_rollback
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%div{ class: container_class } %div{ class: container_class }
.top-area .top-area
.col-md-9 .col-md-9
%h3.page-title= @environment.name.titleize %h3.page-title= @environment.name.capitalize
.col-md-3 .col-md-3
.nav-controls .nav-controls
......
...@@ -52,12 +52,12 @@ feature 'Environments', feature: true do ...@@ -52,12 +52,12 @@ feature 'Environments', feature: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do scenario 'does show a play button' do
expect(page).to have_link(manual.name.titleize) expect(page).to have_link(manual.name.capitalize)
end end
scenario 'does allow to play manual action' do scenario 'does allow to play manual action' do
expect(manual).to be_skipped expect(manual).to be_skipped
expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0) expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0)
expect(page).to have_content(manual.name) expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending expect(manual.reload).to be_pending
end end
...@@ -113,12 +113,12 @@ feature 'Environments', feature: true do ...@@ -113,12 +113,12 @@ feature 'Environments', feature: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do scenario 'does show a play button' do
expect(page).to have_link(manual.name.titleize) expect(page).to have_link(manual.name.capitalize)
end end
scenario 'does allow to play manual action' do scenario 'does allow to play manual action' do
expect(manual).to be_skipped expect(manual).to be_skipped
expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0) expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0)
expect(page).to have_content(manual.name) expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending expect(manual.reload).to be_pending
end end
......
...@@ -67,10 +67,10 @@ describe "Pipelines" do ...@@ -67,10 +67,10 @@ describe "Pipelines" do
before { visit namespace_project_pipelines_path(project.namespace, project) } before { visit namespace_project_pipelines_path(project.namespace, project) }
it { expect(page).to have_link('Manual Build') } it { expect(page).to have_link('Manual build') }
context 'when playing' do context 'when playing' do
before { click_link('Manual Build') } before { click_link('Manual build') }
it { expect(manual.reload).to be_pending } it { expect(manual.reload).to be_pending }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment