summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2016-02-01 14:30:05 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-19 17:24:59 +0100
commitbd7c52c734bd25b4b2549baf35b2957b45c7a972 (patch)
tree5405e8141f6d83c1d3d21c7ed0d85eddc7b52218 /features/steps
parentf3e92fb4d04f69deddcf1daf3dde8a79cf942bd5 (diff)
downloadgitlab-ce-bd7c52c734bd25b4b2549baf35b2957b45c7a972.tar.gz
Add feature specs for build erase button
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/project/builds/summary.rb14
-rw-r--r--features/steps/shared/builds.rb4
2 files changed, 18 insertions, 0 deletions
diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb
index 4f94fc96354..70de61101b8 100644
--- a/features/steps/project/builds/summary.rb
+++ b/features/steps/project/builds/summary.rb
@@ -10,4 +10,18 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
expect(ci_lint_tool_link[:href]).to eq ci_lint_path
end
end
+
+ step 'I click erase build button' do
+ click_link 'Erase'
+ end
+
+ step 'recent build has been erased' do
+ expect(@build.artifacts_file.exists?).to be_falsy
+ expect(@build.artifacts_metadata.exists?).to be_falsy
+ expect(File.zero?(@build.path_to_trace)).to be true
+ end
+
+ step 'recent build summary does not have artifacts widget' do
+ expect(page).to have_no_css('.artifacts')
+ end
end
diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb
index fa54c93df0f..0bd5d93b997 100644
--- a/features/steps/shared/builds.rb
+++ b/features/steps/shared/builds.rb
@@ -42,6 +42,10 @@ module SharedBuilds
@build.update_attributes(artifacts_metadata: gzip)
end
+ step 'recent build has a build trace' do
+ @build.trace = 'build trace'
+ 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'