summaryrefslogtreecommitdiff
path: root/features/steps/shared/builds.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-07 10:33:07 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 12:48:15 +0100
commit09c82c6fdc494de0d64cb58b4b61a86104ff1131 (patch)
treee97caf67c160686f23d376213a85b77178d58a7a /features/steps/shared/builds.rb
parentcfffc9eff2c394259000090fb8c4c116863c9199 (diff)
downloadgitlab-ce-09c82c6fdc494de0d64cb58b4b61a86104ff1131.tar.gz
Add spinach feature specs for build artifacts browser
Diffstat (limited to 'features/steps/shared/builds.rb')
-rw-r--r--features/steps/shared/builds.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb
index 6f9cd174729..a83d74e5946 100644
--- a/features/steps/shared/builds.rb
+++ b/features/steps/shared/builds.rb
@@ -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