Fixes link in artifacts breadcrumb

The link to the job page was not set properly,
with this commit it links to the correct job page.
This commit is contained in:
Filipa Lacerda 2019-03-27 11:14:33 +00:00 committed by Phil Hughes
parent 0610bb0917
commit 1cb82c4de9
3 changed files with 12 additions and 1 deletions

View File

@ -4,7 +4,7 @@
= render "projects/jobs/header"
- add_to_breadcrumbs(s_('CICD|Jobs'), project_jobs_path(@project))
- add_to_breadcrumbs("##{@build.id}", project_jobs_path(@project))
- add_to_breadcrumbs("##{@build.id}", project_job_path(@project, @build))
.tree-holder
.nav-block

View File

@ -0,0 +1,5 @@
---
title: Fixes job link in artifacts page breadcrumb
merge_request: 26592
author:
type: fixed

View File

@ -19,6 +19,12 @@ describe "User browses artifacts" do
visit(browse_project_job_artifacts_path(project, job))
end
it "renders a link to the job in the breadcrumbs" do
page.within('.js-breadcrumbs-list') do
expect(page).to have_link("##{job.id}", href: project_job_path(project, job))
end
end
it "shows artifacts" do
expect(page).not_to have_selector(".build-sidebar")