diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-04 15:01:54 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-04 15:01:54 +0000 |
commit | d3768dd79698ae17cd0c82b7c78a8ead11b7e157 (patch) | |
tree | 5c98075e5a54fe3cb5f542487750a5fe3e9f40f3 /features | |
parent | a07d03e7c777ed9e169576e8bb92edc4b5557a79 (diff) | |
parent | 0f58eb6bde35009b69ef871534d9ff80fc38bbf7 (diff) | |
download | gitlab-ce-d3768dd79698ae17cd0c82b7c78a8ead11b7e157.tar.gz |
Merge branch 'dm-artifact-blob-viewer' into 'master'
Use blob viewer for job artifacts
Closes #31297
See merge request !11018
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 |