diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-22 12:19:46 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-22 12:19:46 +0100 |
commit | e249a35161401e9b2449346132f1130c6cd1b824 (patch) | |
tree | 319864baada8c0ef3af7f7b10ff93a0d41bcc851 /spec | |
parent | 1e19737ca20fe53327094196bbc9758e5c9e03fa (diff) | |
download | gitlab-ce-e249a35161401e9b2449346132f1130c6cd1b824.tar.gz |
Add missing specs for loading build HTML trace
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/builds_spec.rb | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/spec/features/projects/builds_spec.rb b/spec/features/projects/builds_spec.rb index eec1d337224..f0ad936ca69 100644 --- a/spec/features/projects/builds_spec.rb +++ b/spec/features/projects/builds_spec.rb @@ -1,11 +1,7 @@ require 'spec_helper' require 'tempfile' -describe "Builds" do - let(:artifacts_file) do - fixture_file_upload(Rails.root + 'spec/fixtures/banana_sample.gif', 'image/gif') - end - +feature 'Builds', :feature do let(:user) { create(:user) } let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } @@ -13,6 +9,10 @@ describe "Builds" do let!(:build) { create(:ci_build, :trace, pipeline: pipeline) } let!(:build2) { create(:ci_build) } + let(:artifacts_file) do + fixture_file_upload(Rails.root + 'spec/fixtures/banana_sample.gif', 'image/gif') + end + before do project.team << [user, :developer] login_as(user) @@ -163,7 +163,7 @@ describe "Builds" do end end - context 'Build raw trace' do + feature 'Raw trace' do before do build.run! visit namespace_project_build_path(project.namespace, project, build) @@ -174,7 +174,23 @@ describe "Builds" do end end - describe 'Variables' do + feature 'HTML trace', :js do + before do + build.run! + + visit namespace_project_build_path(project.namespace, project, build) + end + + it 'loads build trace' do + expect(page).to have_content 'BUILD TRACE' + + build.append_trace(' and more trace', 11) + + expect(page).to have_content 'BUILD TRACE and more trace' + end + end + + feature 'Variables' do let(:trigger_request) { create(:ci_trigger_request_with_variables) } let(:build) do |