Commit b6d89966 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix navbar CSS

parent 75215e6d
...@@ -28,7 +28,7 @@ const toggleValue = (button) => { ...@@ -28,7 +28,7 @@ const toggleValue = (button) => {
* *
* When the user clicks the toggle button for each cluster, it: * When the user clicks the toggle button for each cluster, it:
* - toggles the button * - toggles the button
* - shows a loading and disabled state * - shows a loading and disables button
* - Makes a put request to the given endpoint * - Makes a put request to the given endpoint
* Once we receive the response, either: * Once we receive the response, either:
* 1) Show updated status in case of successfull response * 1) Show updated status in case of successfull response
......
...@@ -17,4 +17,8 @@ ...@@ -17,4 +17,8 @@
.empty-state .svg-content img { .empty-state .svg-content img {
width: 145px; width: 145px;
} }
.top-area .nav-controls > .btn.btn-add-cluster {
margin-right: 0;
}
} }
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
= link_to project_clusters_path(@project), class: "js-all-tab" do = link_to project_clusters_path(@project), class: "js-all-tab" do
= s_("ClusterIntegration|All") = s_("ClusterIntegration|All")
%span.badge= @all_count %span.badge= @all_count
.pull-right.nav-bar-right .nav-controls
= link_to s_("ClusterIntegration|Add cluster"), new_project_cluster_path(@project), class: "btn btn-success disabled has-tooltip js-add-cluster", title: s_("ClusterIntegration|Multiple clusters are available in GitLab Entreprise Edition Premium and Ultimate") = link_to s_("ClusterIntegration|Add cluster"), new_project_cluster_path(@project), class: "btn btn-success btn-add-cluster disabled has-tooltip js-add-cluster", title: s_("ClusterIntegration|Multiple clusters are available in GitLab Entreprise Edition Premium and Ultimate")
...@@ -122,12 +122,13 @@ feature 'Clusters', :js do ...@@ -122,12 +122,13 @@ feature 'Clusters', :js do
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(page).to have_selector('.js-toggle-cluster-list.is-checked')
# Cluster is enabled
page.find('.js-toggle-cluster-list').click page.find('.js-toggle-cluster-list').click
wait_for_requests
end.to change { cluster.enabled }
expect(page).not_to have_selector('.is-checked') wait_for_requests
# Cluster must be disabled
expect(page).not_to have_selector('.js-toggle-cluster-list.is-checked')
end end
end end
...@@ -137,7 +138,7 @@ feature 'Clusters', :js do ...@@ -137,7 +138,7 @@ feature 'Clusters', :js do
page.find('.js-toggle-cluster-list').click page.find('.js-toggle-cluster-list').click
Clusters::Cluster.last.provider.make_errored!('Something wrong!') Clusters::Cluster.last.provider.make_errored!('Something wrong!')
# Cluster must still be disabled
expect(page).not_to have_selector('.js-toggle-cluster-list.is-checked') expect(page).not_to have_selector('.js-toggle-cluster-list.is-checked')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment