diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-06-17 08:18:01 +0100 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-06-17 08:18:01 +0100 |
commit | ad9079da5a397606aa5588731b5402117a3806bb (patch) | |
tree | ffe2bbd053679f83baf4a46946fc863ebc6f3846 | |
parent | 6ab9a9df6fd9e3701956ec222ff2e8f60e1e940b (diff) | |
download | gitlab-ce-generate-spans-for-sections.tar.gz |
Make failing specs passgenerate-spans-for-sections
-rw-r--r-- | spec/features/projects/jobs/user_browses_job_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/trace/stream_spec.rb | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/spec/features/projects/jobs/user_browses_job_spec.rb b/spec/features/projects/jobs/user_browses_job_spec.rb index 07ebc2f4792..63b698fb855 100644 --- a/spec/features/projects/jobs/user_browses_job_spec.rb +++ b/spec/features/projects/jobs/user_browses_job_spec.rb @@ -42,12 +42,10 @@ describe 'User browses a job', :js do text_to_hide = "Cloning into '/nolith/ci-tests'" expect(page).to have_content(text_to_hide) - expect(page).to have_css('.js-s-get-sources') find('.js-section-start[data-section="get-sources"]').click expect(page).not_to have_content(text_to_hide) - expect(page).to have_no_css('.js-s-get-sources') end end diff --git a/spec/lib/gitlab/ci/trace/stream_spec.rb b/spec/lib/gitlab/ci/trace/stream_spec.rb index e45ea1c2528..35250632e86 100644 --- a/spec/lib/gitlab/ci/trace/stream_spec.rb +++ b/spec/lib/gitlab/ci/trace/stream_spec.rb @@ -64,7 +64,10 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do result = stream.html - expect(result).to eq("ヾ(´༎ຶД༎ຶ`)ノ<br><span class=\"term-fg-green\">許功蓋</span><br>") + expect(result).to eq( + "<span class=\"\">ヾ(´༎ຶД༎ຶ`)ノ<br/><span class=\"\"></span></span>"\ + "<span class=\"term-fg-green\">許功蓋</span><span class=\"\"><br/>"\ + "<span class=\"\"></span></span>") expect(result.encoding).to eq(Encoding.default_external) end end @@ -250,7 +253,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do it 'returns html content with state' do result = stream.html_with_state - expect(result.html).to eq("1234") + expect(result.html).to eq("<span class=\"\">1234</span>") end context 'follow-up state' do @@ -266,7 +269,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do result = stream.html_with_state(last_result.state) expect(result.append).to be_truthy - expect(result.html).to eq("5678") + expect(result.html).to eq("<span class=\"\">5678</span>") end end end @@ -302,11 +305,13 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do describe '#html' do shared_examples_for 'htmls' do it "returns html" do - expect(stream.html).to eq("12<br>34<br>56") + expect(stream.html).to eq( + "<span class=\"\">12<br/><span class=\"\">34<br/>"\ + "<span class=\"\">56</span></span></span>") end it "returns html for last line only" do - expect(stream.html(last_lines: 1)).to eq("56") + expect(stream.html(last_lines: 1)).to eq("<span class=\"\">56</span>") end end |