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
40f1859d
Commit
40f1859d
authored
Dec 03, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add applications specs
parent
538e2085
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
0 deletions
+107
-0
spec/features/projects/clusters/applications_spec.rb
spec/features/projects/clusters/applications_spec.rb
+107
-0
No files found.
spec/features/projects/clusters/applications_spec.rb
0 → 100644
View file @
40f1859d
require
'spec_helper'
feature
'Clusters Applications'
,
:js
do
include
GoogleApi
::
CloudPlatformHelpers
set
(
:project
)
{
create
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_master
(
user
)
gitlab_sign_in
(
user
)
end
describe
'Installing applications'
do
before
do
visit
project_cluster_path
(
project
,
cluster
)
end
context
'when cluster is being created'
do
let
(
:cluster
)
{
create
(
:cluster
,
:providing_by_gcp
,
projects:
[
project
])}
scenario
'user is unable to install applications'
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
).
text
).
to
eq
(
'Install'
)
end
end
end
context
'when cluster is created'
do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])}
scenario
'user can install applications'
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
be_nil
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Install'
)
end
end
context
'when user installs Helm'
do
before
do
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
and_return
(
nil
)
page
.
within
(
'.js-cluster-application-row-helm'
)
do
page
.
find
(
:css
,
'.js-cluster-application-install-button'
).
click
end
end
it
'he sees status transition'
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
# FE sends request and gets the response, then the buttons is "Install"
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Install'
)
Clusters
::
Cluster
.
last
.
application_helm
.
make_installing!
# FE starts polling and update the buttons to "Installing"
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Installing'
)
Clusters
::
Cluster
.
last
.
application_helm
.
make_installed!
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Installed'
)
end
expect
(
page
).
to
have_content
(
'Helm Tiller was successfully installed on your cluster'
)
end
end
context
'when user installs Ingress'
do
context
'when user installs application: Ingress'
do
before
do
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
and_return
(
nil
)
create
(
:cluster_applications_helm
,
:installed
,
cluster:
cluster
)
page
.
within
(
'.js-cluster-application-row-ingress'
)
do
page
.
find
(
:css
,
'.js-cluster-application-install-button'
).
click
end
end
it
'he sees status transition'
do
page
.
within
(
'.js-cluster-application-row-ingress'
)
do
# FE sends request and gets the response, then the buttons is "Install"
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Install'
)
Clusters
::
Cluster
.
last
.
application_ingress
.
make_installing!
# FE starts polling and update the buttons to "Installing"
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Installing'
)
Clusters
::
Cluster
.
last
.
application_ingress
.
make_installed!
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)).
to
have_content
(
'Installed'
)
end
expect
(
page
).
to
have_content
(
'Ingress was successfully installed on your cluster'
)
end
end
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