Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ece114e6
Commit
ece114e6
authored
Dec 28, 2015
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update artifacts download specs
parent
5ff7ec42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+8
-8
spec/features/builds_spec.rb
spec/features/builds_spec.rb
+6
-2
No files found.
app/views/projects/builds/show.html.haml
View file @
ece114e6
...
@@ -90,14 +90,14 @@
...
@@ -90,14 +90,14 @@
%h1
#{
@build
.
coverage
}
%
%h1
#{
@build
.
coverage
}
%
-
if
current_user
&&
can?
(
current_user
,
:download_build_artifacts
,
@project
)
&&
@build
.
artifacts?
-
if
current_user
&&
can?
(
current_user
,
:download_build_artifacts
,
@project
)
&&
@build
.
artifacts?
.build-widget.center
.panel.panel-default
.build-widget.artifacts
.panel-heading
Build artifacts
%h4
.title
Build artifacts
.panel-body
.center
.btn-group
{
role: :group
}
.btn-group
{
role: :group
}
=
link_to
"Download"
,
@build
.
artifacts_download_url
,
class:
'btn btn-sm btn-primary'
=
link_to
"Download"
,
@build
.
artifacts_download_url
,
class:
'btn btn-sm btn-primary'
-
if
@build
.
artifacts_browser_supported?
-
if
@build
.
artifacts_browser_supported?
=
link_to
"Browse"
,
@build
.
artifacts_browse_url
,
class:
'btn btn-sm btn-primary'
=
link_to
"Browse"
,
@build
.
artifacts_browse_url
,
class:
'btn btn-sm btn-primary'
.build-widget
.build-widget
%h4
.title
%h4
.title
...
...
spec/features/builds_spec.rb
View file @
ece114e6
...
@@ -80,7 +80,11 @@ describe "Builds" do
...
@@ -80,7 +80,11 @@ describe "Builds" do
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
end
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
end
end
...
@@ -111,7 +115,7 @@ describe "Builds" do
...
@@ -111,7 +115,7 @@ describe "Builds" do
before
do
before
do
@build
.
update_attributes
(
artifacts_file:
artifacts_file
)
@build
.
update_attributes
(
artifacts_file:
artifacts_file
)
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
click_link
'Download artifacts'
page
.
within
(
'.artifacts'
)
{
click_link
'Download'
}
end
end
it
{
expect
(
page
.
response_headers
[
'Content-Type'
]).
to
eq
(
artifacts_file
.
content_type
)
}
it
{
expect
(
page
.
response_headers
[
'Content-Type'
]).
to
eq
(
artifacts_file
.
content_type
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment