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
fc4f3164
Commit
fc4f3164
authored
Dec 05, 2017
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trailing whitespace from Clusters spec
parent
83648f24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
spec/features/projects/clusters_spec.rb
spec/features/projects/clusters_spec.rb
+13
-13
No files found.
spec/features/projects/clusters_spec.rb
View file @
fc4f3164
...
@@ -25,48 +25,48 @@ feature 'Clusters', :js do
...
@@ -25,48 +25,48 @@ feature 'Clusters', :js do
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
)
}
let
(
:project
)
{
cluster
.
project
}
let
(
:project
)
{
cluster
.
project
}
before
do
before
do
visit
project_clusters_path
(
project
)
visit
project_clusters_path
(
project
)
end
end
it
'user sees a table with one cluster'
do
it
'user sees a table with one cluster'
do
# One is the header row, the other the cluster row
# One is the header row, the other the cluster row
expect
(
page
).
to
have_selector
(
'.gl-responsive-table-row'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.gl-responsive-table-row'
,
count:
2
)
end
end
it
'user sees a disabled add cluster button '
do
it
'user sees a disabled add cluster button '
do
expect
(
page
).
to
have_selector
(
'.js-add-cluster.disabled'
)
expect
(
page
).
to
have_selector
(
'.js-add-cluster.disabled'
)
end
end
it
'user sees navigation tabs'
do
it
'user sees navigation tabs'
do
expect
(
page
.
find
(
'.js-active-tab'
).
text
).
to
include
(
'Active'
)
expect
(
page
.
find
(
'.js-active-tab'
).
text
).
to
include
(
'Active'
)
expect
(
page
.
find
(
'.js-active-tab .badge'
).
text
).
to
include
(
'1'
)
expect
(
page
.
find
(
'.js-active-tab .badge'
).
text
).
to
include
(
'1'
)
expect
(
page
.
find
(
'.js-inactive-tab'
).
text
).
to
include
(
'Inactive'
)
expect
(
page
.
find
(
'.js-inactive-tab'
).
text
).
to
include
(
'Inactive'
)
expect
(
page
.
find
(
'.js-inactive-tab .badge'
).
text
).
to
include
(
'0'
)
expect
(
page
.
find
(
'.js-inactive-tab .badge'
).
text
).
to
include
(
'0'
)
expect
(
page
.
find
(
'.js-all-tab'
).
text
).
to
include
(
'All'
)
expect
(
page
.
find
(
'.js-all-tab'
).
text
).
to
include
(
'All'
)
expect
(
page
.
find
(
'.js-all-tab .badge'
).
text
).
to
include
(
'1'
)
expect
(
page
.
find
(
'.js-all-tab .badge'
).
text
).
to
include
(
'1'
)
end
end
context
'inline update of cluster'
do
context
'inline update of cluster'
do
it
'user can update cluster'
do
it
'user can update cluster'
do
expect
(
page
).
to
have_selector
(
'.js-toggle-cluster-list'
)
expect
(
page
).
to
have_selector
(
'.js-toggle-cluster-list'
)
end
end
context
'with sucessfull request'
do
context
'with sucessfull request'
do
it
'user sees updated cluster'
do
it
'user sees updated cluster'
do
expect
do
expect
do
page
.
find
(
'.js-toggle-cluster-list'
).
click
page
.
find
(
'.js-toggle-cluster-list'
).
click
wait_for_requests
wait_for_requests
end
.
to
change
{
cluster
.
reload
.
enabled
}
end
.
to
change
{
cluster
.
reload
.
enabled
}
expect
(
page
).
not_to
have_selector
(
'.is-checked'
)
expect
(
page
).
not_to
have_selector
(
'.is-checked'
)
expect
(
cluster
.
reload
).
not_to
be_enabled
expect
(
cluster
.
reload
).
not_to
be_enabled
end
end
end
end
context
'with failed request'
do
context
'with failed request'
do
it
'user sees not update cluster and error message'
do
it
'user sees not update cluster and error message'
do
expect_any_instance_of
(
Clusters
::
UpdateService
).
to
receive
(
:execute
).
and_call_original
expect_any_instance_of
(
Clusters
::
UpdateService
).
to
receive
(
:execute
).
and_call_original
...
@@ -80,16 +80,16 @@ feature 'Clusters', :js do
...
@@ -80,16 +80,16 @@ feature 'Clusters', :js do
end
end
end
end
end
end
context
'when user clicks on a cluster'
do
context
'when user clicks on a cluster'
do
before
do
before
do
click_link
cluster
.
name
click_link
cluster
.
name
end
end
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
)
expect
(
page
.
find
(
:css
,
'.cluster-name'
).
value
).
to
eq
(
cluster
.
name
)
end
end
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