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
c876bfa0
Commit
c876bfa0
authored
Sep 28, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing spec file
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
92f8e0fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
0 deletions
+87
-0
spec/features/runners_spec.rb
spec/features/runners_spec.rb
+87
-0
No files found.
spec/features/runners_spec.rb
0 → 100644
View file @
c876bfa0
require
'spec_helper'
describe
"Runners"
do
include
GitlabRoutingHelper
let
(
:user
)
{
create
(
:user
)
}
before
{
login_as
(
user
)
}
describe
"specific runners"
do
before
do
@project
=
FactoryGirl
.
create
:ci_project
@project
.
gl_project
.
team
<<
[
user
,
:master
]
@project2
=
FactoryGirl
.
create
:ci_project
@project2
.
gl_project
.
team
<<
[
user
,
:master
]
@shared_runner
=
FactoryGirl
.
create
:ci_shared_runner
@specific_runner
=
FactoryGirl
.
create
:ci_specific_runner
@specific_runner2
=
FactoryGirl
.
create
:ci_specific_runner
@project
.
runners
<<
@specific_runner
@project2
.
runners
<<
@specific_runner2
visit
runners_path
(
@project
.
gl_project
)
end
it
"places runners in right places"
do
expect
(
page
.
find
(
".available-specific-runners"
)).
to
have_content
(
@specific_runner2
.
display_name
)
expect
(
page
.
find
(
".activated-specific-runners"
)).
to
have_content
(
@specific_runner
.
display_name
)
expect
(
page
.
find
(
".available-shared-runners"
)).
to
have_content
(
@shared_runner
.
display_name
)
end
it
"enables specific runner for project"
do
within
".available-specific-runners"
do
click_on
"Enable for this project"
end
expect
(
page
.
find
(
".activated-specific-runners"
)).
to
have_content
(
@specific_runner2
.
display_name
)
end
it
"disables specific runner for project"
do
@project2
.
runners
<<
@specific_runner
visit
runners_path
(
@project
.
gl_project
)
within
".activated-specific-runners"
do
click_on
"Disable for this project"
end
expect
(
page
.
find
(
".available-specific-runners"
)).
to
have_content
(
@specific_runner
.
display_name
)
end
it
"removes specific runner for project if this is last project for that runners"
do
within
".activated-specific-runners"
do
click_on
"Remove runner"
end
expect
(
Ci
::
Runner
.
exists?
(
id:
@specific_runner
)).
to
be_falsey
end
end
describe
"shared runners"
do
before
do
@project
=
FactoryGirl
.
create
:ci_project
@project
.
gl_project
.
team
<<
[
user
,
:master
]
visit
runners_path
(
@project
.
gl_project
)
end
it
"enables shared runners"
do
click_on
"Enable shared runners"
expect
(
@project
.
reload
.
shared_runners_enabled
).
to
be_truthy
end
end
describe
"show page"
do
before
do
@project
=
FactoryGirl
.
create
:ci_project
@project
.
gl_project
.
team
<<
[
user
,
:master
]
@specific_runner
=
FactoryGirl
.
create
:ci_specific_runner
@project
.
runners
<<
@specific_runner
visit
runners_path
(
@project
.
gl_project
)
end
it
"shows runner information"
do
click_on
@specific_runner
.
short_sha
expect
(
page
).
to
have_content
(
@specific_runner
.
platform
)
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