Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-22 15:15:10 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-22 15:15:10 +0300
commit89e367f2e5c9e52e3b8f3e966b5e541d4e1cde72 (patch)
treecfa343c56313f53034a6827b6c89036e214eec1a /spec/features/projects/builds_spec.rb
parente249a35161401e9b2449346132f1130c6cd1b824 (diff)
Add missing feature tests for loading build trace
See #24638
Diffstat (limited to 'spec/features/projects/builds_spec.rb')
-rw-r--r--spec/features/projects/builds_spec.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/spec/features/projects/builds_spec.rb b/spec/features/projects/builds_spec.rb
index f0ad936ca69..eb50d397b29 100644
--- a/spec/features/projects/builds_spec.rb
+++ b/spec/features/projects/builds_spec.rb
@@ -181,12 +181,24 @@ feature 'Builds', :feature do
visit namespace_project_build_path(project.namespace, project, build)
end
- it 'loads build trace' do
- expect(page).to have_content 'BUILD TRACE'
+ context 'when build has an initial trace' do
+ it 'loads build trace' do
+ expect(page).to have_content 'BUILD TRACE'
- build.append_trace(' and more trace', 11)
+ build.append_trace(' and more trace', 11)
- expect(page).to have_content 'BUILD TRACE and more trace'
+ expect(page).to have_content 'BUILD TRACE and more trace'
+ end
+ end
+
+ context 'when build does not have an initial trace' do
+ let(:build) { create(:ci_build, pipeline: pipeline) }
+
+ it 'loads new trace' do
+ build.append_trace('build trace', 0)
+
+ expect(page).to have_content 'build trace'
+ end
end
end