diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-04-13 18:54:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-04-13 18:54:08 +0300 |
commit | 6106cad9559633cf69876ef5185b361df2a30123 (patch) | |
tree | cb75c262bcf83c3402f376da9f1d80247f4cada3 /spec/features/admin | |
parent | bcf7a7e76cc8aa4216f1df88be47172b9880ba24 (diff) |
Don't reset application settings oauth providers by mistake
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/features/admin')
-rw-r--r-- | spec/features/admin/admin_settings_spec.rb | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 50d0a7abe59..7853d2952ea 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -85,6 +85,26 @@ feature 'Admin updates settings' do expect(page).to have_content "Application settings saved successfully" end + scenario 'Modify oauth providers' do + expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).to be_empty + + page.within('.as-signin') do + uncheck 'Google' + click_button 'Save changes' + end + + expect(page).to have_content "Application settings saved successfully" + expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).to include('google_oauth2') + + page.within('.as-signin') do + check "Google" + click_button 'Save changes' + end + + expect(page).to have_content "Application settings saved successfully" + expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).not_to include('google_oauth2') + end + scenario 'Change Help page' do page.within('.as-help-page') do fill_in 'Help page text', with: 'Example text' @@ -234,16 +254,6 @@ feature 'Admin updates settings' do expect(find('#service_push_channel').value).to eq '#test_channel' end - context 'sign-in restrictions', :js do - it 'de-activates oauth sign-in source' do - page.within('.as-signin') do - find('input#application_setting_enabled_oauth_sign_in_sources_[value=gitlab]').send_keys(:return) - - expect(find('.btn', text: 'GitLab.com')).not_to have_css('.active') - end - end - end - scenario 'Change Keys settings' do page.within('.as-visibility-access') do select 'Are forbidden', from: 'RSA SSH keys' |