Commit 128cb03b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'rc/use-existing-url-helper' into 'master'

Replace ci_status_path with pipeline_path

See merge request gitlab-org/gitlab-ce!15369
parents 13ba35eb 6ae47476
......@@ -6,11 +6,6 @@
# See 'detailed_status?` method and `Gitlab::Ci::Status` module.
#
module CiStatusHelper
def ci_status_path(pipeline)
project = pipeline.project
project_pipeline_path(project, pipeline)
end
def ci_label_for_status(status)
if detailed_status?(status)
return status.label
......
......@@ -99,7 +99,7 @@
%td.build-link
- if project
= link_to ci_status_path(build.pipeline) do
= link_to pipeline_path(build.pipeline) do
%strong= build.pipeline.short_sha
%td.timestamp
......
require 'spec_helper'
describe 'Commits' do
include CiStatusHelper
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
......@@ -33,7 +31,7 @@ describe 'Commits' do
describe 'Commit builds' do
before do
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
end
it { expect(page).to have_content pipeline.sha[0..7] }
......@@ -79,7 +77,7 @@ describe 'Commits' do
describe 'Commit builds', :js do
before do
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
end
it 'shows pipeline`s data' do
......@@ -95,7 +93,7 @@ describe 'Commits' do
end
it do
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
click_on 'Download artifacts'
expect(page.response_headers['Content-Type']).to eq(artifacts_file.content_type)
end
......@@ -103,7 +101,7 @@ describe 'Commits' do
describe 'Cancel all builds' do
it 'cancels commit', :js do
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
click_on 'Cancel running'
expect(page).to have_content 'canceled'
end
......@@ -111,7 +109,7 @@ describe 'Commits' do
describe 'Cancel build' do
it 'cancels build', :js do
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
find('.js-btn-cancel-pipeline').click
expect(page).to have_content 'canceled'
end
......@@ -120,13 +118,13 @@ describe 'Commits' do
describe '.gitlab-ci.yml not found warning' do
context 'ci builds enabled' do
it "does not show warning" do
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
expect(page).not_to have_content '.gitlab-ci.yml not found in this commit'
end
it 'shows warning' do
stub_ci_pipeline_yaml_file(nil)
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
expect(page).to have_content '.gitlab-ci.yml not found in this commit'
end
end
......@@ -135,7 +133,7 @@ describe 'Commits' do
before do
stub_ci_builds_disabled
stub_ci_pipeline_yaml_file(nil)
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
end
it 'does not show warning' do
......@@ -149,7 +147,7 @@ describe 'Commits' do
before do
project.team << [user, :reporter]
build.update_attributes(artifacts_file: artifacts_file)
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
end
it 'Renders header', :js do
......@@ -171,7 +169,7 @@ describe 'Commits' do
visibility_level: Gitlab::VisibilityLevel::INTERNAL,
public_builds: false)
build.update_attributes(artifacts_file: artifacts_file)
visit ci_status_path(pipeline)
visit pipeline_path(pipeline)
end
it do
......
......@@ -202,7 +202,6 @@ export default {
"revert_in_fork_path": "/root/acets-app/forks?continue%5Bnotice%5D=You%27re+not+allowed+to+make+changes+to+this+project+directly.+A+fork+of+this+project+has+been+created+that+you+can+make+changes+in%2C+so+you+can+submit+a+merge+request.+Try+to+cherry-pick+this+commit+again.&continue%5Bnotice_now%5D=You%27re+not+allowed+to+make+changes+to+this+project+directly.+A+fork+of+this+project+is+being+created+that+you+can+make+changes+in%2C+so+you+can+submit+a+merge+request.&continue%5Bto%5D=%2Froot%2Facets-app%2Fmerge_requests%2F22&namespace_key=1",
"email_patches_path": "/root/acets-app/merge_requests/22.patch",
"plain_diff_path": "/root/acets-app/merge_requests/22.diff",
"ci_status_path": "/root/acets-app/merge_requests/22/ci_status",
"status_path": "/root/acets-app/merge_requests/22.json",
"merge_check_path": "/root/acets-app/merge_requests/22/merge_check",
"ci_environments_status_url": "/root/acets-app/merge_requests/22/ci_environments_status",
......
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