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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
a3d8f89d
Commit
a3d8f89d
authored
Jul 05, 2016
by
Katarzyna Kobierska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for new pending tab and update tests for running tab
parent
5813aec2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
spec/features/admin/admin_builds_spec.rb
spec/features/admin/admin_builds_spec.rb
+35
-1
No files found.
spec/features/admin/admin_builds_spec.rb
View file @
a3d8f89d
...
...
@@ -36,12 +36,45 @@ describe 'Admin Builds' do
end
end
context
'Pending tab'
do
context
'when have pending builds'
do
it
'shows pending builds'
do
build1
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :pending
)
build2
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :running
)
build3
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :success
)
build4
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :failed
)
visit
admin_builds_path
(
scope: :pending
)
expect
(
page
).
to
have_selector
(
'.nav-links li.active'
,
text:
'Pending'
)
expect
(
page
.
find
(
'.build-link'
)).
to
have_content
(
build1
.
id
)
expect
(
page
.
find
(
'.build-link'
)).
not_to
have_content
(
build2
.
id
)
expect
(
page
.
find
(
'.build-link'
)).
not_to
have_content
(
build3
.
id
)
expect
(
page
.
find
(
'.build-link'
)).
not_to
have_content
(
build4
.
id
)
expect
(
page
).
to
have_link
'Cancel all'
end
end
context
'when have no builds pending'
do
it
'shows a message'
do
create
(
:ci_build
,
pipeline:
pipeline
,
status: :success
)
visit
admin_builds_path
(
scope: :pending
)
expect
(
page
).
to
have_selector
(
'.nav-links li.active'
,
text:
'Pending'
)
expect
(
page
).
to
have_content
'No builds to show'
expect
(
page
).
not_to
have_link
'Cancel all'
end
end
end
context
'Running tab'
do
context
'when have running builds'
do
it
'shows running builds'
do
build1
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :
pend
ing
)
build1
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :
runn
ing
)
build2
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :success
)
build3
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :failed
)
build4
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :pending
)
visit
admin_builds_path
(
scope: :running
)
...
...
@@ -49,6 +82,7 @@ describe 'Admin Builds' do
expect
(
page
.
find
(
'.build-link'
)).
to
have_content
(
build1
.
id
)
expect
(
page
.
find
(
'.build-link'
)).
not_to
have_content
(
build2
.
id
)
expect
(
page
.
find
(
'.build-link'
)).
not_to
have_content
(
build3
.
id
)
expect
(
page
.
find
(
'.build-link'
)).
not_to
have_content
(
build4
.
id
)
expect
(
page
).
to
have_link
'Cancel all'
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