diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-07 10:33:07 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-14 12:48:15 +0100 |
commit | 09c82c6fdc494de0d64cb58b4b61a86104ff1131 (patch) | |
tree | e97caf67c160686f23d376213a85b77178d58a7a /features/steps/project | |
parent | cfffc9eff2c394259000090fb8c4c116863c9199 (diff) | |
download | gitlab-ce-09c82c6fdc494de0d64cb58b4b61a86104ff1131.tar.gz |
Add spinach feature specs for build artifacts browser
Diffstat (limited to 'features/steps/project')
-rw-r--r-- | features/steps/project/builds.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/features/steps/project/builds.rb b/features/steps/project/builds.rb index 769690dd79d..5ee6226a522 100644 --- a/features/steps/project/builds.rb +++ b/features/steps/project/builds.rb @@ -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 |