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
cb0616fe
Commit
cb0616fe
authored
Jun 13, 2019
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec for collapsible sections
parent
9f832e59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
spec/factories/ci/builds.rb
spec/factories/ci/builds.rb
+10
-0
spec/features/projects/jobs/user_browses_job_spec.rb
spec/features/projects/jobs/user_browses_job_spec.rb
+17
-0
No files found.
spec/factories/ci/builds.rb
View file @
cb0616fe
...
...
@@ -228,6 +228,16 @@ FactoryBot.define do
end
end
trait
:trace_with_sections
do
after
(
:create
)
do
|
build
,
evaluator
|
trace
=
File
.
binread
(
File
.
expand_path
(
Rails
.
root
.
join
(
'spec/fixtures/trace/trace_with_sections'
)))
build
.
trace
.
set
(
trace
)
end
end
trait
:unicode_trace_live
do
after
(
:create
)
do
|
build
,
evaluator
|
trace
=
File
.
binread
(
...
...
spec/features/projects/jobs/user_browses_job_spec.rb
View file @
cb0616fe
...
...
@@ -34,6 +34,23 @@ describe 'User browses a job', :js do
expect
(
page
).
to
have_content
(
'Job has been erased'
)
end
context
'when job trace contains sections'
do
let!
(
:build
)
{
create
(
:ci_build
,
:success
,
:trace_with_sections
,
:coverage
,
pipeline:
pipeline
)
}
it
'collapses a section'
do
wait_for_requests
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
context
'with a failed job'
do
let!
(
:build
)
{
create
(
:ci_build
,
:failed
,
:trace_artifact
,
pipeline:
pipeline
)
}
...
...
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