Commit 11110e6c authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '8380-geo-settings-empty-state' into 'master'

Geo: Add settings page empty state

Closes #8380

See merge request gitlab-org/gitlab-ee!9415
parents de9b9c9d a6d171f3
- return unless Gitlab::Geo.license_allows? - if Gitlab::Geo.license_allows?
%section.settings.as-geo.no-animate#js-geo-settings{ class: ('expanded' if expanded) }
%section.settings.as-geo.no-animate#js-geo-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
= _('GitLab Geo') = _('GitLab Geo')
...@@ -24,3 +23,5 @@ ...@@ -24,3 +23,5 @@
status will time out. status will time out.
= f.submit 'Save changes', class: "btn btn-success" = f.submit 'Save changes', class: "btn btn-success"
- else
= render 'shared/empty_states/geo'
---
title: "Geo: Add settings page empty state"
merge_request: 9415
author:
type: changed
...@@ -9,7 +9,9 @@ describe 'Admin updates EE-only settings' do ...@@ -9,7 +9,9 @@ describe 'Admin updates EE-only settings' do
allow(License).to receive(:feature_available?).and_return(true) allow(License).to receive(:feature_available?).and_return(true)
end end
it 'Modify GitLab Geo settings' do context 'Geo settings' do
context 'when the license has Geo feature' do
it 'allows users to change Geo settings' do
visit geo_admin_application_settings_path visit geo_admin_application_settings_path
page.within('.as-geo') do page.within('.as-geo') do
fill_in 'Connection timeout', with: 15 fill_in 'Connection timeout', with: 15
...@@ -19,6 +21,18 @@ describe 'Admin updates EE-only settings' do ...@@ -19,6 +21,18 @@ describe 'Admin updates EE-only settings' do
expect(Gitlab::CurrentSettings.geo_status_timeout).to eq(15) expect(Gitlab::CurrentSettings.geo_status_timeout).to eq(15)
expect(page).to have_content "Application settings saved successfully" expect(page).to have_content "Application settings saved successfully"
end end
end
context 'when the license does not have Geo feature' do
it 'shows empty page' do
allow(License).to receive(:feature_available?).and_return(false)
visit geo_admin_application_settings_path
expect(page).to have_content "Discover GitLab Geo"
end
end
end
it 'Enable external authentication' do it 'Enable external authentication' do
visit admin_application_settings_path visit admin_application_settings_path
......
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