Skip to content
Snippets Groups Projects
Commit bd7c52c7 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Add feature specs for build erase button

parent f3e92fb4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -13,3 +13,10 @@ Feature: Project Builds Summary
Scenario: I browse project builds page
When I visit project builds page
Then I see button to CI Lint
Scenario: I erase a build
Given recent build has a build trace
When I visit recent build details page
And I click erase build button
Then recent build has been erased
And recent build summary does not have artifacts widget
Loading
Loading
@@ -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
Loading
Loading
@@ -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'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment