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
b6cb00fa
Commit
b6cb00fa
authored
Oct 11, 2019
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added instance cluster detail page integration specs
parent
564942ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
ee/spec/features/clusters/cluster_detail_page_spec.rb
ee/spec/features/clusters/cluster_detail_page_spec.rb
+12
-0
spec/features/clusters/cluster_detail_page_spec.rb
spec/features/clusters/cluster_detail_page_spec.rb
+22
-6
No files found.
ee/spec/features/clusters/cluster_detail_page_spec.rb
View file @
b6cb00fa
...
@@ -46,4 +46,16 @@ describe 'Clusterable > Show page' do
...
@@ -46,4 +46,16 @@ describe 'Clusterable > Show page' do
expect
(
page
).
to
have_selector
(
'.js-cluster-nav-environments'
,
text:
'Environments'
)
expect
(
page
).
to
have_selector
(
'.js-cluster-nav-environments'
,
text:
'Environments'
)
end
end
end
end
context
'when clusterable is an instance'
do
let
(
:current_user
)
{
create
(
:admin
)
}
let
(
:cluster_path
)
{
admin_cluster_path
(
cluster
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:instance
)
}
it
'shows the environments tab'
do
visit
cluster_path
expect
(
page
).
to
have_selector
(
'.js-cluster-nav-environments'
,
text:
'Environments'
)
end
end
end
end
spec/features/clusters/cluster_detail_page_spec.rb
View file @
b6cb00fa
...
@@ -14,10 +14,6 @@ describe 'Clusterable > Show page' do
...
@@ -14,10 +14,6 @@ describe 'Clusterable > Show page' do
end
end
shared_examples
'show page'
do
shared_examples
'show page'
do
before
do
clusterable
.
add_maintainer
(
current_user
)
end
it
'allow the user to set domain'
do
it
'allow the user to set domain'
do
visit
cluster_path
visit
cluster_path
...
@@ -63,7 +59,6 @@ describe 'Clusterable > Show page' do
...
@@ -63,7 +59,6 @@ describe 'Clusterable > Show page' do
shared_examples
'editing a GCP cluster'
do
shared_examples
'editing a GCP cluster'
do
before
do
before
do
clusterable
.
add_maintainer
(
current_user
)
visit
cluster_path
visit
cluster_path
end
end
...
@@ -92,7 +87,6 @@ describe 'Clusterable > Show page' do
...
@@ -92,7 +87,6 @@ describe 'Clusterable > Show page' do
shared_examples
'editing a user-provided cluster'
do
shared_examples
'editing a user-provided cluster'
do
before
do
before
do
stub_kubeclient_discover
(
cluster
.
platform
.
api_url
)
stub_kubeclient_discover
(
cluster
.
platform
.
api_url
)
clusterable
.
add_maintainer
(
current_user
)
visit
cluster_path
visit
cluster_path
end
end
...
@@ -123,6 +117,10 @@ describe 'Clusterable > Show page' do
...
@@ -123,6 +117,10 @@ describe 'Clusterable > Show page' do
let
(
:cluster_path
)
{
project_cluster_path
(
clusterable
,
cluster
)
}
let
(
:cluster_path
)
{
project_cluster_path
(
clusterable
,
cluster
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:project
,
projects:
[
clusterable
])
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:project
,
projects:
[
clusterable
])
}
before
do
clusterable
.
add_maintainer
(
current_user
)
end
it_behaves_like
'show page'
it_behaves_like
'show page'
it_behaves_like
'editing a GCP cluster'
it_behaves_like
'editing a GCP cluster'
...
@@ -137,6 +135,10 @@ describe 'Clusterable > Show page' do
...
@@ -137,6 +135,10 @@ describe 'Clusterable > Show page' do
let
(
:cluster_path
)
{
group_cluster_path
(
clusterable
,
cluster
)
}
let
(
:cluster_path
)
{
group_cluster_path
(
clusterable
,
cluster
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:group
,
groups:
[
clusterable
])
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:group
,
groups:
[
clusterable
])
}
before
do
clusterable
.
add_maintainer
(
current_user
)
end
it_behaves_like
'show page'
it_behaves_like
'show page'
it_behaves_like
'editing a GCP cluster'
it_behaves_like
'editing a GCP cluster'
...
@@ -145,4 +147,18 @@ describe 'Clusterable > Show page' do
...
@@ -145,4 +147,18 @@ describe 'Clusterable > Show page' do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_user
,
:group
,
groups:
[
clusterable
])
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_user
,
:group
,
groups:
[
clusterable
])
}
end
end
end
end
context
'when clusterable is an instance'
do
let
(
:current_user
)
{
create
(
:admin
)
}
let
(
:cluster_path
)
{
admin_cluster_path
(
cluster
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
:instance
)
}
it_behaves_like
'show page'
it_behaves_like
'editing a GCP cluster'
it_behaves_like
'editing a user-provided cluster'
do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_user
,
:instance
)
}
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