Commit e53bcf40 authored by Douwe Maan's avatar Douwe Maan Committed by Ruben Davila

Merge branch 'fix-download-artifacts-button-link' into 'master'

Fix download artifacts button link

## What does this MR do?

Fix download artifacts button link.

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug

## What are the relevant issue numbers?

Closes #22294

See merge request !6407
parent a4e24cd6
...@@ -27,6 +27,7 @@ v 8.12.0 (unreleased) ...@@ -27,6 +27,7 @@ v 8.12.0 (unreleased)
- Fix pagination on user snippets page - Fix pagination on user snippets page
- Run CI builds with the permissions of users !5735 - Run CI builds with the permissions of users !5735
- Fix sorting of issues in API - Fix sorting of issues in API
- Fix download artifacts button links !6407
- Sort project variables by key. !6275 (Diego Souza) - Sort project variables by key. !6275 (Diego Souza)
- Ensure specs on sorting of issues in API are deterministic on MySQL - Ensure specs on sorting of issues in API are deterministic on MySQL
- Added ability to use predefined CI variables for environment name - Added ability to use predefined CI variables for environment name
......
...@@ -37,6 +37,6 @@ ...@@ -37,6 +37,6 @@
%li.dropdown-header Previous Artifacts %li.dropdown-header Previous Artifacts
- artifacts.each do |job| - artifacts.each do |job|
%li %li
= link_to latest_succeeded_namespace_project_artifacts_path(project.namespace, project, ref, 'download', job: job.name), rel: 'nofollow' do = link_to latest_succeeded_namespace_project_artifacts_path(project.namespace, project, "#{ref}/download", job: job.name), rel: 'nofollow' do
%i.fa.fa-download %i.fa.fa-download
%span Download '#{job.name}' %span Download '#{job.name}'
...@@ -33,7 +33,11 @@ feature 'Download buttons in branches page', feature: true do ...@@ -33,7 +33,11 @@ feature 'Download buttons in branches page', feature: true do
end end
scenario 'shows download artifacts button' do scenario 'shows download artifacts button' do
expect(page).to have_link "Download '#{build.name}'" href = latest_succeeded_namespace_project_artifacts_path(
project.namespace, project, 'binary-encoding/download',
job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
end end
end end
end end
......
...@@ -34,7 +34,11 @@ feature 'Download buttons in files tree', feature: true do ...@@ -34,7 +34,11 @@ feature 'Download buttons in files tree', feature: true do
end end
scenario 'shows download artifacts button' do scenario 'shows download artifacts button' do
expect(page).to have_link "Download '#{build.name}'" href = latest_succeeded_namespace_project_artifacts_path(
project.namespace, project, "#{project.default_branch}/download",
job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
end end
end end
end end
......
...@@ -33,7 +33,11 @@ feature 'Download buttons in project main page', feature: true do ...@@ -33,7 +33,11 @@ feature 'Download buttons in project main page', feature: true do
end end
scenario 'shows download artifacts button' do scenario 'shows download artifacts button' do
expect(page).to have_link "Download '#{build.name}'" href = latest_succeeded_namespace_project_artifacts_path(
project.namespace, project, "#{project.default_branch}/download",
job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
end end
end end
end end
......
...@@ -34,7 +34,11 @@ feature 'Download buttons in tags page', feature: true do ...@@ -34,7 +34,11 @@ feature 'Download buttons in tags page', feature: true do
end end
scenario 'shows download artifacts button' do scenario 'shows download artifacts button' do
expect(page).to have_link "Download '#{build.name}'" href = latest_succeeded_namespace_project_artifacts_path(
project.namespace, project, "#{tag}/download",
job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
end end
end end
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