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
102a1774
Commit
102a1774
authored
Jun 26, 2017
by
Takuya Noguchi
Committed by
Rémy Coutable
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explicit message when no runners on admin
parent
db8ad863
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
35 deletions
+65
-35
app/views/admin/runners/index.html.haml
app/views/admin/runners/index.html.haml
+19
-16
changelogs/unreleased/33846-no-runner-for-admin.yml
changelogs/unreleased/33846-no-runner-for-admin.yml
+4
-0
spec/features/admin/admin_runners_spec.rb
spec/features/admin/admin_runners_spec.rb
+42
-19
No files found.
app/views/admin/runners/index.html.haml
View file @
102a1774
...
@@ -58,20 +58,23 @@
...
@@ -58,20 +58,23 @@
%br
%br
.table-holder
-
if
@runners
.
any?
%table
.table
.table-holder
%thead
%table
.table
%tr
%thead
%th
Type
%tr
%th
Runner token
%th
Type
%th
Description
%th
Runner token
%th
Version
%th
Description
%th
Projects
%th
Version
%th
Jobs
%th
Projects
%th
Tags
%th
Jobs
%th
Last contact
%th
Tags
%th
%th
Last contact
%th
-
@runners
.
each
do
|
runner
|
-
@runners
.
each
do
|
runner
|
=
render
"admin/runners/runner"
,
runner:
runner
=
render
"admin/runners/runner"
,
runner:
runner
=
paginate
@runners
,
theme:
"gitlab"
=
paginate
@runners
,
theme:
"gitlab"
-
else
.nothing-here-block
No runners found
changelogs/unreleased/33846-no-runner-for-admin.yml
0 → 100644
View file @
102a1774
---
title
:
Add explicit message when no runners on admin
merge_request
:
12266
author
:
Takuya Noguchi
spec/features/admin/admin_runners_spec.rb
View file @
102a1774
...
@@ -9,31 +9,54 @@ describe "Admin Runners" do
...
@@ -9,31 +9,54 @@ describe "Admin Runners" do
end
end
describe
"Runners page"
do
describe
"Runners page"
do
before
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
runner
=
FactoryGirl
.
create
(
:ci_runner
,
contacted_at:
Time
.
now
)
pipeline
=
FactoryGirl
.
create
(
:ci_pipeline
)
context
"when there are runners"
do
FactoryGirl
.
create
(
:ci_build
,
pipeline:
pipeline
,
runner_id:
runner
.
id
)
before
do
visit
admin_runners_path
runner
=
FactoryGirl
.
create
(
:ci_runner
,
contacted_at:
Time
.
now
)
end
FactoryGirl
.
create
(
:ci_build
,
pipeline:
pipeline
,
runner_id:
runner
.
id
)
visit
admin_runners_path
end
it
'has all necessary texts'
do
expect
(
page
).
to
have_text
"To register a new Runner"
expect
(
page
).
to
have_text
"Runners with last contact more than a minute ago: 1"
end
describe
'search'
do
before
do
FactoryGirl
.
create
:ci_runner
,
description:
'runner-foo'
FactoryGirl
.
create
:ci_runner
,
description:
'runner-bar'
end
it
'shows correct runner when description matches'
do
search_form
=
find
(
'#runners-search'
)
search_form
.
fill_in
'search'
,
with:
'runner-foo'
search_form
.
click_button
'Search'
expect
(
page
).
to
have_content
(
"runner-foo"
)
expect
(
page
).
not_to
have_content
(
"runner-bar"
)
end
it
'shows no runner when description does not match'
do
search_form
=
find
(
'#runners-search'
)
search_form
.
fill_in
'search'
,
with:
'runner-baz'
search_form
.
click_button
'Search'
it
'has all necessary texts'
do
expect
(
page
).
to
have_text
'No runners found'
expect
(
page
).
to
have_text
"To register a new Runner"
end
e
xpect
(
page
).
to
have_text
"Runners with last contact more than a minute ago: 1"
e
nd
end
end
describe
'search'
do
context
"when there are no runners"
do
before
do
before
do
FactoryGirl
.
create
:ci_runner
,
description:
'runner-foo'
visit
admin_runners_path
FactoryGirl
.
create
:ci_runner
,
description:
'runner-bar'
search_form
=
find
(
'#runners-search'
)
search_form
.
fill_in
'search'
,
with:
'runner-foo'
search_form
.
click_button
'Search'
end
end
it
'shows correct runner'
do
it
'has all necessary texts including no runner message'
do
expect
(
page
).
to
have_content
(
"runner-foo"
)
expect
(
page
).
to
have_text
"To register a new Runner"
expect
(
page
).
not_to
have_content
(
"runner-bar"
)
expect
(
page
).
to
have_text
"Runners with last contact more than a minute ago: 0"
expect
(
page
).
to
have_text
'No runners found'
end
end
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