Commit 4b9f76ce authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix one of the failing tests. Test against the headers

parent 28e324ae
...@@ -68,10 +68,15 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps ...@@ -68,10 +68,15 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
end end
step 'download of a file extracted from build artifacts should start' do step 'download of a file extracted from build artifacts should start' do
# this will be accelerated by Workhorse send_data = response_headers[Gitlab::Workhorse::SEND_DATA_HEADER]
response_json = JSON.parse(page.body, symbolize_names: true)
expect(response_json[:archive]).to end_with('build_artifacts.zip') expect(send_data).to start_with('artifacts-entry:')
expect(response_json[:entry]).to eq Base64.encode64('ci_artifacts.txt')
params = JSON.parse(Base64.urlsafe_decode64(send_data[/(?<=:)(.+)/]))
expect(params.keys).to eq(['Archive', 'Entry'])
expect(params['Archive']).to end_with('build_artifacts.zip')
expect(params['Entry']).to eq(Base64.encode64('ci_artifacts.txt'))
end end
step 'I click a first row within build artifacts table' do step 'I click a first row within build artifacts table' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment