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?
%section.settings.as-geo.no-animate#js-geo-settings{ class: ('expanded' if expanded) }
- if Gitlab::Geo.license_allows?
%section.settings.as-geo.no-animate#js-geo-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
= _('GitLab Geo')
......@@ -24,3 +23,5 @@
status will time out.
= 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
allow(License).to receive(:feature_available?).and_return(true)
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
page.within('.as-geo') do
fill_in 'Connection timeout', with: 15
......@@ -19,6 +21,18 @@ describe 'Admin updates EE-only settings' do
expect(Gitlab::CurrentSettings.geo_status_timeout).to eq(15)
expect(page).to have_content "Application settings saved successfully"
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
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