diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-12-04 15:04:33 +0100 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-12-04 16:35:04 +0100 |
commit | cad0661aadff50b4d2c2b4cc7b012809b945213c (patch) | |
tree | e61f53600c08f2ae361c0c1edac6aede3e6f8399 /spec | |
parent | a648bcad7bb7fcf24c0be81abf273da8d0bbf410 (diff) | |
download | gitlab-ce-cad0661aadff50b4d2c2b4cc7b012809b945213c.tar.gz |
callout when ci variables are protected by default
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/features/variable_list_shared_examples.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/support/features/variable_list_shared_examples.rb b/spec/support/features/variable_list_shared_examples.rb index 95f26a01f79..0a464d77cb7 100644 --- a/spec/support/features/variable_list_shared_examples.rb +++ b/spec/support/features/variable_list_shared_examples.rb @@ -67,11 +67,11 @@ shared_examples 'variable list' do context 'application setting is true' do before do stub_application_setting(protected_ci_variables: true) - end - it 'defaults to protected' do visit page_path + end + it 'defaults to protected' do page.within('.js-ci-variable-list-section .js-row:last-child') do find('.js-ci-variable-input-key').set('key') end @@ -80,16 +80,20 @@ shared_examples 'variable list' do expect(values).to eq %w(false true true) end + + it 'shows a message regarding the changed default' do + expect(page).to have_content 'Environment variables are configured by your administrator to be protected by default' + end end context 'application setting is false' do before do stub_application_setting(protected_ci_variables: false) - end - it 'defaults to unprotected' do visit page_path + end + it 'defaults to unprotected' do page.within('.js-ci-variable-list-section .js-row:last-child') do find('.js-ci-variable-input-key').set('key') end @@ -98,6 +102,10 @@ shared_examples 'variable list' do expect(values).to eq %w(false false false) end + + it 'does not show a message regarding the default' do + expect(page).not_to have_content 'Environment variables are configured by your administrator to be protected by default' + end end end |