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
Léo-Paul Géneau
gitlab-ce
Commits
fab3df77
Commit
fab3df77
authored
Aug 23, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
438e18d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
29 deletions
+32
-29
spec/features/runners_spec.rb
spec/features/runners_spec.rb
+32
-29
No files found.
spec/features/runners_spec.rb
View file @
fab3df77
...
@@ -10,11 +10,14 @@ feature 'Runners' do
...
@@ -10,11 +10,14 @@ feature 'Runners' do
context
'when a project has enabled shared_runners'
do
context
'when a project has enabled shared_runners'
do
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
)
}
background
do
project
.
add_master
(
user
)
end
context
'when a specific runner is activated on the project'
do
context
'when a specific runner is activated on the project'
do
given
(
:specific_runner
)
{
create
(
:ci_runner
,
:specific
)
}
given
(
:specific_runner
)
{
create
(
:ci_runner
,
:specific
)
}
background
do
background
do
project
.
add_master
(
user
)
project
.
runners
<<
specific_runner
project
.
runners
<<
specific_runner
end
end
...
@@ -30,19 +33,19 @@ feature 'Runners' do
...
@@ -30,19 +33,19 @@ feature 'Runners' do
expect
(
page
).
to
have_content
(
specific_runner
.
platform
)
expect
(
page
).
to
have_content
(
specific_runner
.
platform
)
end
end
scenario
'user removes an activated specific runner'
do
scenario
'user removes an activated specific runner
if this is last project for that runners
'
do
visit
runners_path
(
project
)
visit
runners_path
(
project
)
within
'.activated-specific-runners'
do
within
'.activated-specific-runners'
do
click_on
'Remove Runner'
click_on
'Remove Runner'
end
end
expect
(
page
).
to
have_no_css
(
'.activated-specific-runners'
)
expect
(
page
).
not_to
have_content
(
specific_runner
.
display_name
)
end
end
context
'when a runner has a tag'
do
context
'when a runner has a tag'
do
background
do
background
do
specific_runner
.
update
_attribute
(
:tag_list
,
[
'tag'
])
specific_runner
.
update
(
tag_list:
[
'tag'
])
end
end
scenario
'user edits runner not to run untagged jobs'
do
scenario
'user edits runner not to run untagged jobs'
do
...
@@ -61,13 +64,24 @@ feature 'Runners' do
...
@@ -61,13 +64,24 @@ feature 'Runners' do
end
end
end
end
context
'when a shared runner is activated on the project'
do
given!
(
:shared_runner
)
{
create
(
:ci_runner
,
:shared
)
}
scenario
'user sees CI/CD setting page'
do
visit
runners_path
(
project
)
expect
(
page
.
find
(
'.available-shared-runners'
)).
to
have_content
(
shared_runner
.
display_name
)
end
end
end
context
'when a specific runner exists in another project'
do
context
'when a specific runner exists in another project'
do
given
(
:another_project
)
{
create
(
:project
)
}
given
(
:another_project
)
{
create
(
:project
)
}
given
(
:specific_runner2
)
{
create
(
:ci_runner
,
:specific
)
}
given
(
:specific_runner
)
{
create
(
:ci_runner
,
:specific
)
}
background
do
background
do
another_project
.
add_master
(
user
)
another_project
.
add_master
(
user
)
another_project
.
runners
<<
specific_runner2
another_project
.
runners
<<
specific_runner
end
end
scenario
'user enables and disables a specific runner'
do
scenario
'user enables and disables a specific runner'
do
...
@@ -77,24 +91,13 @@ feature 'Runners' do
...
@@ -77,24 +91,13 @@ feature 'Runners' do
click_on
'Enable for this project'
click_on
'Enable for this project'
end
end
expect
(
page
.
find
(
'.activated-specific-runners'
)).
to
have_content
(
specific_runner2
.
display_name
)
expect
(
page
.
find
(
'.activated-specific-runners'
)).
to
have_content
(
specific_runner
.
display_name
)
within
'.activated-specific-runners'
do
within
'.activated-specific-runners'
do
click_on
'Disable for this project'
click_on
'Disable for this project'
end
end
expect
(
page
.
find
(
'.activated-specific-runners'
)).
not_to
have_content
(
specific_runner2
.
display_name
)
expect
(
page
.
find
(
'.available-specific-runners'
)).
to
have_content
(
specific_runner
.
display_name
)
end
end
context
'when a shared runner is activated on the project'
do
given!
(
:shared_runner
)
{
create
(
:ci_runner
,
:shared
)
}
scenario
'user sees CI/CD setting page'
do
visit
runners_path
(
project
)
expect
(
page
.
find
(
'.available-shared-runners'
)).
to
have_content
(
shared_runner
.
display_name
)
end
end
end
end
end
...
@@ -103,7 +106,6 @@ feature 'Runners' do
...
@@ -103,7 +106,6 @@ feature 'Runners' do
given
(
:shared_runners_html
)
{
'custom shared runners description'
}
given
(
:shared_runners_html
)
{
'custom shared runners description'
}
background
do
background
do
project
.
add_master
(
user
)
stub_application_setting
(
shared_runners_text:
shared_runners_text
)
stub_application_setting
(
shared_runners_text:
shared_runners_text
)
end
end
...
@@ -126,6 +128,7 @@ feature 'Runners' do
...
@@ -126,6 +128,7 @@ feature 'Runners' do
visit
runners_path
(
project
)
visit
runners_path
(
project
)
click_on
'Enable shared Runners'
click_on
'Enable shared Runners'
expect
(
page
.
find
(
'.shared-runners-description'
)).
to
have_content
(
'Disable shared Runners'
)
expect
(
page
.
find
(
'.shared-runners-description'
)).
to
have_content
(
'Disable shared Runners'
)
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