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
9770e7a6
Commit
9770e7a6
authored
Dec 12, 2017
by
Luke Bennett
Committed by
Matija Čupić
Dec 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move clusters_spec.rb ee-specific contexts to ee namespace
parent
c9bdaa3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
20 deletions
+42
-20
spec/ee/spec/features/projects/clusters_spec.rb
spec/ee/spec/features/projects/clusters_spec.rb
+42
-0
spec/features/projects/clusters_spec.rb
spec/features/projects/clusters_spec.rb
+0
-20
No files found.
spec/ee/spec/features/projects/clusters_spec.rb
0 → 100644
View file @
9770e7a6
require
'spec_helper'
feature
'Clusters'
,
:js
do
include
GoogleApi
::
CloudPlatformHelpers
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_master
(
user
)
gitlab_sign_in
(
user
)
end
context
'when user has a cluster and visits cluster index page'
do
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:project
)
{
cluster
.
project
}
before
do
visit
project_clusters_path
(
project
)
end
context
'when license has multiple clusters feature'
do
before
do
allow_any_instance_of
(
EE
::
Project
).
to
receive
(
:feature_available?
).
with
(
:multiple_clusters
).
and_return
(
true
)
end
it
'user sees a add cluster button '
do
expect
(
page
).
to
have_selector
(
'.js-add-cluster'
)
end
end
context
'when license does not have multiple clusters feature'
do
before
do
allow_any_instance_of
(
EE
::
Project
).
to
receive
(
:feature_available?
).
with
(
:multiple_clusters
).
and_return
(
false
)
end
it
'user sees a disabled add cluster button '
do
expect
(
page
).
to
have_selector
(
'.js-add-cluster.disabled'
)
end
end
end
end
spec/features/projects/clusters_spec.rb
View file @
9770e7a6
...
...
@@ -35,26 +35,6 @@ feature 'Clusters', :js do
expect
(
page
).
to
have_selector
(
'.gl-responsive-table-row'
,
count:
2
)
end
context
'when license has multiple clusters feature'
do
before
do
allow_any_instance_of
(
EE
::
Project
).
to
receive
(
:feature_available?
).
with
(
:multiple_clusters
).
and_return
(
true
)
end
it
'user sees a add cluster button '
do
expect
(
page
).
to
have_selector
(
'.js-add-cluster'
)
end
end
context
'when license does not have multiple clusters feature'
do
before
do
allow_any_instance_of
(
EE
::
Project
).
to
receive
(
:feature_available?
).
with
(
:multiple_clusters
).
and_return
(
false
)
end
it
'user sees a disabled add cluster button '
do
expect
(
page
).
to
have_selector
(
'.js-add-cluster.disabled'
)
end
end
context
'inline update of cluster'
do
it
'user can update cluster'
do
expect
(
page
).
to
have_selector
(
'.js-toggle-cluster-list'
)
...
...
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