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
Boxiang Sun
gitlab-ce
Commits
23536559
Commit
23536559
authored
Dec 03, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yet another specs
parent
34d8694f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
4 deletions
+23
-4
app/views/projects/clusters/show.html.haml
app/views/projects/clusters/show.html.haml
+1
-1
spec/controllers/projects/clusters_controller_spec.rb
spec/controllers/projects/clusters_controller_spec.rb
+6
-0
spec/factories/clusters/clusters.rb
spec/factories/clusters/clusters.rb
+0
-0
spec/features/projects/clusters/gcp_spec.rb
spec/features/projects/clusters/gcp_spec.rb
+12
-0
spec/features/projects/clusters/user_spec.rb
spec/features/projects/clusters/user_spec.rb
+4
-3
No files found.
app/views/projects/clusters/show.html.haml
View file @
23536559
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
.cluster-applications-table
#js-cluster-applications
.cluster-applications-table
#js-cluster-applications
%section
.settings
#js-cluster-details
%section
.settings
#js-cluster-details
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
.settings-header
%h4
=
s_
(
'ClusterIntegration|Cluster details'
)
%h4
=
s_
(
'ClusterIntegration|Cluster details'
)
%button
.btn.js-settings-toggle
%button
.btn.js-settings-toggle
...
...
spec/controllers/projects/clusters_controller_spec.rb
View file @
23536559
...
@@ -151,6 +151,12 @@ describe Projects::ClustersController do
...
@@ -151,6 +151,12 @@ describe Projects::ClustersController do
expect
(
cluster
.
enabled
).
to
be_falsey
expect
(
cluster
.
enabled
).
to
be_falsey
end
end
it
"does not change cluster name"
do
go
expect
(
cluster
.
name
).
to
eq
(
'test-cluster'
)
end
context
'when cluster is being created'
do
context
'when cluster is being created'
do
let
(
:cluster
)
{
create
(
:cluster
,
:providing_by_gcp
,
projects:
[
project
])
}
let
(
:cluster
)
{
create
(
:cluster
,
:providing_by_gcp
,
projects:
[
project
])
}
...
...
spec/factories/clusters/cluster.rb
→
spec/factories/clusters/cluster
s
.rb
View file @
23536559
File moved
spec/features/projects/clusters/gcp_spec.rb
View file @
23536559
...
@@ -95,6 +95,18 @@ feature 'Gcp Cluster', :js do
...
@@ -95,6 +95,18 @@ feature 'Gcp Cluster', :js do
end
end
end
end
context
'when user changes cluster parameters'
do
before
do
fill_in
'cluster_platform_kubernetes_attributes_namespace'
,
with:
'my-namespace'
click_button
'Save changes'
end
it
'user sees the successful message'
do
expect
(
page
).
to
have_content
(
'Cluster was successfully updated.'
)
expect
(
cluster
.
reload
.
platform_kubernetes
.
namespace
).
to
eq
(
'my-namespace'
)
end
end
context
'when user destroy the cluster'
do
context
'when user destroy the cluster'
do
before
do
before
do
page
.
accept_confirm
do
page
.
accept_confirm
do
...
...
spec/features/projects/clusters/user_spec.rb
View file @
23536559
...
@@ -52,7 +52,6 @@ feature 'User Cluster', :js do
...
@@ -52,7 +52,6 @@ feature 'User Cluster', :js do
it
'user sees a cluster details page'
do
it
'user sees a cluster details page'
do
expect
(
page
).
to
have_button
(
'Save'
)
expect
(
page
).
to
have_button
(
'Save'
)
expect
(
page
.
find
(
:css
,
'.cluster-name'
).
value
).
to
eq
(
cluster
.
name
)
end
end
context
'when user disables the cluster'
do
context
'when user disables the cluster'
do
...
@@ -67,15 +66,17 @@ feature 'User Cluster', :js do
...
@@ -67,15 +66,17 @@ feature 'User Cluster', :js do
end
end
end
end
context
'when user changes cluster
name
'
do
context
'when user changes cluster
parameters
'
do
before
do
before
do
fill_in
'cluster_name'
,
with:
'my-dev-cluster'
fill_in
'cluster_name'
,
with:
'my-dev-cluster'
click_button
'Save'
fill_in
'cluster_platform_kubernetes_attributes_namespace'
,
with:
'my-namespace'
click_button
'Save changes'
end
end
it
'user sees the successful message'
do
it
'user sees the successful message'
do
expect
(
page
).
to
have_content
(
'Cluster was successfully updated.'
)
expect
(
page
).
to
have_content
(
'Cluster was successfully updated.'
)
expect
(
cluster
.
reload
.
name
).
to
eq
(
'my-dev-cluster'
)
expect
(
cluster
.
reload
.
name
).
to
eq
(
'my-dev-cluster'
)
expect
(
cluster
.
reload
.
platform_kubernetes
.
namespace
).
to
eq
(
'my-namespace'
)
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