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
13268ba6
Commit
13268ba6
authored
Jun 17, 2019
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract shared examples for duplicate sections and non
parent
81848b63
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-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
+28
-0
No files found.
spec/factories/ci/builds.rb
View file @
13268ba6
...
@@ -238,6 +238,16 @@ FactoryBot.define do
...
@@ -238,6 +238,16 @@ FactoryBot.define do
end
end
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
trait
:unicode_trace_live
do
after
(
:create
)
do
|
build
,
evaluator
|
after
(
:create
)
do
|
build
,
evaluator
|
trace
=
File
.
binread
(
trace
=
File
.
binread
(
...
...
spec/features/projects/jobs/user_browses_job_spec.rb
View file @
13268ba6
...
@@ -34,6 +34,34 @@ describe 'User browses a job', :js do
...
@@ -34,6 +34,34 @@ describe 'User browses a job', :js do
expect
(
page
).
to
have_content
(
'Job has been erased'
)
expect
(
page
).
to
have_content
(
'Job has been erased'
)
end
end
shared_examples
'has collapsible sections'
do
it
'collapses the section clicked'
do
wait_for_requests
text_to_hide
=
"Cloning into '/nolith/ci-tests'"
text_to_show
=
'Waiting for pod'
expect
(
page
).
to
have_content
(
text_to_hide
)
expect
(
page
).
to
have_content
(
text_to_show
)
first
(
'.js-section-start[data-section="get-sources"]'
).
click
expect
(
page
).
not_to
have_content
(
text_to_hide
)
expect
(
page
).
to
have_content
(
text_to_show
)
end
end
context
'when job trace contains sections'
do
let!
(
:build
)
{
create
(
:ci_build
,
:success
,
:trace_with_sections
,
:coverage
,
pipeline:
pipeline
)
}
it_behaves_like
'has collapsible sections'
end
context
'when job trace contains duplicate sections'
do
let!
(
:build
)
{
create
(
:ci_build
,
:success
,
:trace_with_duplicate_sections
,
:coverage
,
pipeline:
pipeline
)
}
it_behaves_like
'has collapsible sections'
end
context
'when job trace contains sections'
do
context
'when job trace contains sections'
do
let!
(
:build
)
{
create
(
:ci_build
,
:success
,
:trace_with_duplicate_sections
,
:coverage
,
pipeline:
pipeline
)
}
let!
(
:build
)
{
create
(
:ci_build
,
:success
,
:trace_with_duplicate_sections
,
:coverage
,
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