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
c544266d
Commit
c544266d
authored
Nov 16, 2017
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new logic in project/clusters functional test
parent
98653ba6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
118 additions
and
105 deletions
+118
-105
spec/features/projects/clusters_spec.rb
spec/features/projects/clusters_spec.rb
+118
-105
No files found.
spec/features/projects/clusters_spec.rb
View file @
c544266d
...
@@ -22,12 +22,16 @@ feature 'Clusters', :js do
...
@@ -22,12 +22,16 @@ feature 'Clusters', :js do
context
'when user does not have a cluster and visits cluster index page'
do
context
'when user does not have a cluster and visits cluster index page'
do
before
do
before
do
visit
project_clusters_path
(
project
)
visit
project_clusters_path
(
project
)
click_link
'Create on GKE'
end
end
it
'user sees a new page'
do
it
'user sees a new page'
do
expect
(
page
).
to
have_button
(
'Create cluster'
)
expect
(
page
).
to
have_button
(
'Add cluster'
)
end
context
'when user opens opens create on gke page'
do
before
do
click_button
'Add cluster'
click_link
'Create on GKE'
end
end
context
'when user filled form with valid parameters'
do
context
'when user filled form with valid parameters'
do
...
@@ -80,6 +84,7 @@ feature 'Clusters', :js do
...
@@ -80,6 +84,7 @@ feature 'Clusters', :js do
end
end
end
end
end
end
end
context
'when user has a cluster and visits cluster index page'
do
context
'when user has a cluster and visits cluster index page'
do
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
...
@@ -89,6 +94,12 @@ feature 'Clusters', :js do
...
@@ -89,6 +94,12 @@ feature 'Clusters', :js do
visit
project_clusters_path
(
project
)
visit
project_clusters_path
(
project
)
end
end
context
'when user clicks on a cluster'
do
before
do
# TODO: Replace with Click on cluster after frontend implements list
visit
project_cluster_path
(
project
,
cluster
)
end
it
'user sees an cluster details page'
do
it
'user sees an 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
)
expect
(
page
.
find
(
:css
,
'.cluster-name'
).
value
).
to
eq
(
cluster
.
name
)
...
@@ -191,11 +202,13 @@ feature 'Clusters', :js do
...
@@ -191,11 +202,13 @@ feature 'Clusters', :js do
end
end
end
end
end
end
end
context
'when user has not signed in Google'
do
context
'when user has not signed in Google'
do
before
do
before
do
visit
project_clusters_path
(
project
)
visit
project_clusters_path
(
project
)
click_button
'Add cluster'
click_link
'Create on GKE'
click_link
'Create on GKE'
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