Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-28 14:34:47 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 14:48:14 +0300
commitece114e630f11a7d244ab55a0ffd49a1d2cbcb94 (patch)
tree2da3a45ec35c229329274db606bc3cc39c54b855
parent5ff7ec42dc8759717c485478261128d61ea70b9a (diff)
Update artifacts download specs
-rw-r--r--app/views/projects/builds/show.html.haml16
-rw-r--r--spec/features/builds_spec.rb8
2 files changed, 14 insertions, 10 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index 7d32711e642..7cc127244dc 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -90,14 +90,14 @@
%h1 #{@build.coverage}%
- if current_user && can?(current_user, :download_build_artifacts, @project) && @build.artifacts?
- .build-widget.center
- .panel.panel-default
- .panel-heading Build artifacts
- .panel-body
- .btn-group{ role: :group }
- = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary'
- - if @build.artifacts_browser_supported?
- = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary'
+
+ .build-widget.artifacts
+ %h4.title Build artifacts
+ .center
+ .btn-group{ role: :group }
+ = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary'
+ - if @build.artifacts_browser_supported?
+ = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary'
.build-widget
%h4.title
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb
index 240e56839df..d37bd103714 100644
--- a/spec/features/builds_spec.rb
+++ b/spec/features/builds_spec.rb
@@ -80,7 +80,11 @@ describe "Builds" do
visit namespace_project_build_path(@project.namespace, @project, @build)
end
- it { expect(page).to have_content 'Download artifacts' }
+ it 'has button to download artifacts' do
+ page.within('.artifacts') do
+ expect(page).to have_content 'Download'
+ end
+ end
end
end
@@ -111,7 +115,7 @@ describe "Builds" do
before do
@build.update_attributes(artifacts_file: artifacts_file)
visit namespace_project_build_path(@project.namespace, @project, @build)
- click_link 'Download artifacts'
+ page.within('.artifacts') { click_link 'Download' }
end
it { expect(page.response_headers['Content-Type']).to eq(artifacts_file.content_type) }