diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-12-04 12:56:04 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-12-04 13:02:06 +0000 |
commit | b6d899667c395bf67c8def537e96b1a81e71a7eb (patch) | |
tree | ed2f96688960206a4c099ff48167b5a236e192d0 | |
parent | 75215e6de2306dbc2063b1080209cac82994575e (diff) | |
download | gitlab-ce-b6d899667c395bf67c8def537e96b1a81e71a7eb.tar.gz |
Fix navbar CSS
-rw-r--r-- | app/assets/javascripts/clusters/clusters_index.js | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/clusters.scss | 4 | ||||
-rw-r--r-- | app/views/projects/clusters/_tabs.html.haml | 4 | ||||
-rw-r--r-- | spec/features/projects/clusters_spec.rb | 13 |
4 files changed, 14 insertions, 9 deletions
diff --git a/app/assets/javascripts/clusters/clusters_index.js b/app/assets/javascripts/clusters/clusters_index.js index 82ac8d93035..6844d1dbd83 100644 --- a/app/assets/javascripts/clusters/clusters_index.js +++ b/app/assets/javascripts/clusters/clusters_index.js @@ -28,7 +28,7 @@ const toggleValue = (button) => { * * When the user clicks the toggle button for each cluster, it: * - toggles the button - * - shows a loading and disabled state + * - shows a loading and disables button * - Makes a put request to the given endpoint * Once we receive the response, either: * 1) Show updated status in case of successfull response diff --git a/app/assets/stylesheets/pages/clusters.scss b/app/assets/stylesheets/pages/clusters.scss index 1d9a5150065..e577df535c2 100644 --- a/app/assets/stylesheets/pages/clusters.scss +++ b/app/assets/stylesheets/pages/clusters.scss @@ -17,4 +17,8 @@ .empty-state .svg-content img { width: 145px; } + + .top-area .nav-controls > .btn.btn-add-cluster { + margin-right: 0; + } } diff --git a/app/views/projects/clusters/_tabs.html.haml b/app/views/projects/clusters/_tabs.html.haml index 955a9940727..920ed40ea69 100644 --- a/app/views/projects/clusters/_tabs.html.haml +++ b/app/views/projects/clusters/_tabs.html.haml @@ -14,5 +14,5 @@ = link_to project_clusters_path(@project), class: "js-all-tab" do = s_("ClusterIntegration|All") %span.badge= @all_count - .pull-right.nav-bar-right - = 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") + .nav-controls + = 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") diff --git a/spec/features/projects/clusters_spec.rb b/spec/features/projects/clusters_spec.rb index b85bd0f7123..5a96bd58d5b 100644 --- a/spec/features/projects/clusters_spec.rb +++ b/spec/features/projects/clusters_spec.rb @@ -122,12 +122,13 @@ feature 'Clusters', :js do context 'with sucessfull request' do it 'user sees updated cluster' do - expect do - page.find('.js-toggle-cluster-list').click - wait_for_requests - end.to change { cluster.enabled } + expect(page).to have_selector('.js-toggle-cluster-list.is-checked') + # Cluster is enabled + page.find('.js-toggle-cluster-list').click - 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 @@ -137,7 +138,7 @@ feature 'Clusters', :js do page.find('.js-toggle-cluster-list').click 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') end end |