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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
09c82c6f
Commit
09c82c6f
authored
Jan 07, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spinach feature specs for build artifacts browser
parent
cfffc9ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
0 deletions
+67
-0
features/project/builds.feature
features/project/builds.feature
+21
-0
features/steps/project/builds.rb
features/steps/project/builds.rb
+34
-0
features/steps/shared/builds.rb
features/steps/shared/builds.rb
+12
-0
No files found.
features/project/builds.feature
View file @
09c82c6f
...
...
@@ -9,3 +9,24 @@ Feature: Project Builds
When
I visit recent build summary page
Then
I see summary for build
And
I see build trace
Scenario
:
I
download build artifacts
Given
recent build has artifacts available
When
I visit recent build summary page
And
I click artifacts download button
Then
download of build artifacts archive starts
Scenario
:
I
browse build artifacts
Given
recent build has artifacts available
And
recent build has artifacts metadata available
When
I visit recent build summary page
And
I click artifacts browse button
Then
I should see content of artifacts archive
Scenario
:
I
browse subdirectory of build artifacts
Given
recent build has artifacts available
And
recent build has artifacts metadata available
When
I visit recent build summary page
And
I click artifacts browse button
And
I click link to subdirectory within build artifacts
Then
I should see content of subdirectory within artifacts archive
features/steps/project/builds.rb
View file @
09c82c6f
...
...
@@ -11,4 +11,38 @@ class Spinach::Features::ProjectBuilds < Spinach::FeatureSteps
step
'I see build trace'
do
expect
(
page
).
to
have_css
'#build-trace'
end
step
'I click artifacts download button'
do
page
.
within
(
'.artifacts'
)
{
click_link
'Download'
}
end
step
'download of build artifacts archive starts'
do
expect
(
page
.
response_headers
[
'Content-Type'
]).
to
eq
'application/zip'
expect
(
page
.
response_headers
[
'Content-Transfer-Encoding'
]).
to
eq
'binary'
end
step
'I click artifacts browse button'
do
page
.
within
(
'.artifacts'
)
{
click_link
'Browse'
}
end
step
'I should see content of artifacts archive'
do
page
.
within
(
'.tree-table'
)
do
expect
(
page
).
to
have_no_content
'..'
expect
(
page
).
to
have_content
'other_artifacts_0.1.2'
expect
(
page
).
to
have_content
'ci_artifacts.txt'
expect
(
page
).
to
have_content
'rails_sample.jpg'
end
end
step
'I click link to subdirectory within build artifacts'
do
page
.
within
(
'.tree-table'
)
{
click_link
'other_artifacts_0.1.2'
}
end
step
'I should see content of subdirectory within artifacts archive'
do
page
.
within
(
'.tree-table'
)
do
expect
(
page
).
to
have_content
'..'
expect
(
page
).
to
have_content
'another-subdirectory'
expect
(
page
).
to
have_content
'doc_sample.txt'
end
end
end
features/steps/shared/builds.rb
View file @
09c82c6f
...
...
@@ -13,4 +13,16 @@ module SharedBuilds
step
'I visit recent build summary page'
do
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
end
step
'recent build has artifacts available'
do
artifacts
=
Rails
.
root
+
'spec/fixtures/ci_build_artifacts.zip'
archive
=
fixture_file_upload
(
artifacts
,
'application/zip'
)
@build
.
update_attributes
(
artifacts_file:
archive
)
end
step
'recent build has artifacts metadata available'
do
metadata
=
Rails
.
root
+
'spec/fixtures/ci_build_artifacts_metadata.gz'
gzip
=
fixture_file_upload
(
metadata
,
'application/x-gzip'
)
@build
.
update_attributes
(
artifacts_metadata:
gzip
)
end
end
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