Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ad9079da
Commit
ad9079da
authored
Jun 17, 2019
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make failing specs pass
parent
6ab9a9df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
spec/features/projects/jobs/user_browses_job_spec.rb
spec/features/projects/jobs/user_browses_job_spec.rb
+0
-2
spec/lib/gitlab/ci/trace/stream_spec.rb
spec/lib/gitlab/ci/trace/stream_spec.rb
+10
-5
No files found.
spec/features/projects/jobs/user_browses_job_spec.rb
View file @
ad9079da
...
@@ -42,12 +42,10 @@ describe 'User browses a job', :js do
...
@@ -42,12 +42,10 @@ describe 'User browses a job', :js do
text_to_hide
=
"Cloning into '/nolith/ci-tests'"
text_to_hide
=
"Cloning into '/nolith/ci-tests'"
expect
(
page
).
to
have_content
(
text_to_hide
)
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
find
(
'.js-section-start[data-section="get-sources"]'
).
click
expect
(
page
).
not_to
have_content
(
text_to_hide
)
expect
(
page
).
not_to
have_content
(
text_to_hide
)
expect
(
page
).
to
have_no_css
(
'.js-s-get-sources'
)
end
end
end
end
...
...
spec/lib/gitlab/ci/trace/stream_spec.rb
View file @
ad9079da
...
@@ -64,7 +64,10 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
...
@@ -64,7 +64,10 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
result
=
stream
.
html
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
)
expect
(
result
.
encoding
).
to
eq
(
Encoding
.
default_external
)
end
end
end
end
...
@@ -250,7 +253,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
...
@@ -250,7 +253,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
it
'returns html content with state'
do
it
'returns html content with state'
do
result
=
stream
.
html_with_state
result
=
stream
.
html_with_state
expect
(
result
.
html
).
to
eq
(
"
1234
"
)
expect
(
result
.
html
).
to
eq
(
"
<span class=
\"\"
>1234</span>
"
)
end
end
context
'follow-up state'
do
context
'follow-up state'
do
...
@@ -266,7 +269,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
...
@@ -266,7 +269,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
result
=
stream
.
html_with_state
(
last_result
.
state
)
result
=
stream
.
html_with_state
(
last_result
.
state
)
expect
(
result
.
append
).
to
be_truthy
expect
(
result
.
append
).
to
be_truthy
expect
(
result
.
html
).
to
eq
(
"
5678
"
)
expect
(
result
.
html
).
to
eq
(
"
<span class=
\"\"
>5678</span>
"
)
end
end
end
end
end
end
...
@@ -302,11 +305,13 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
...
@@ -302,11 +305,13 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
describe
'#html'
do
describe
'#html'
do
shared_examples_for
'htmls'
do
shared_examples_for
'htmls'
do
it
"returns html"
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
end
it
"returns html for last line only"
do
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
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment