diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-03 01:42:37 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-04 16:50:12 +0300 |
commit | 0f58eb6bde35009b69ef871534d9ff80fc38bbf7 (patch) | |
tree | 0a5065d9fc05822a81a9379f5a6a64f8105f9503 /features | |
parent | 4faa65d8381f3e1e45bdf3a9bc9785b588891b66 (diff) |
Add artifact file page that uses the blob viewer
Diffstat (limited to 'features')
-rw-r--r-- | features/project/builds/artifacts.feature | 3 | ||||
-rw-r--r-- | features/steps/project/builds/artifacts.rb | 15 |
2 files changed, 6 insertions, 12 deletions
diff --git a/features/project/builds/artifacts.feature b/features/project/builds/artifacts.feature index 09094d638c9..5abc24949cf 100644 --- a/features/project/builds/artifacts.feature +++ b/features/project/builds/artifacts.feature @@ -46,13 +46,14 @@ Feature: Project Builds Artifacts And I navigate to parent directory of directory with invalid name Then I should not see directory with invalid name on the list + @javascript Scenario: I download a single file from build artifacts Given recent build has artifacts available And recent build has artifacts metadata available When I visit recent build details page And I click artifacts browse button And I click a link to file within build artifacts - Then download of a file extracted from build artifacts should start + Then I see a download link @javascript Scenario: I click on a row in an artifacts table diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb index 3ec5c8e2f4f..eec375b0532 100644 --- a/features/steps/project/builds/artifacts.rb +++ b/features/steps/project/builds/artifacts.rb @@ -3,6 +3,7 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps include SharedProject include SharedBuilds include RepoHelpers + include WaitForAjax step 'I click artifacts download button' do click_link 'Download' @@ -78,19 +79,11 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps step 'I click a link to file within build artifacts' do page.within('.tree-table') { find_link('ci_artifacts.txt').click } + wait_for_ajax end - step 'download of a file extracted from build artifacts should start' do - send_data = response_headers[Gitlab::Workhorse::SEND_DATA_HEADER] - - expect(send_data).to start_with('artifacts-entry:') - - base64_params = send_data.sub(/\Aartifacts\-entry:/, '') - params = JSON.parse(Base64.urlsafe_decode64(base64_params)) - - expect(params.keys).to eq(%w(Archive Entry)) - expect(params['Archive']).to end_with('build_artifacts.zip') - expect(params['Entry']).to eq(Base64.encode64('ci_artifacts.txt')) + step 'I see a download link' do + expect(page).to have_link 'download it' end step 'I click a first row within build artifacts table' do |