diff options
author | Hordur Freyr Yngvason <hfyngvason@gitlab.com> | 2019-08-08 18:51:52 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-08-08 18:51:52 +0000 |
commit | 5f82ff1469510b4e51d531775a44e4bea92254fe (patch) | |
tree | 2762023eb50a91cabb54f8b454db49c147f447d4 /spec/features/project_variables_spec.rb | |
parent | 455d16d1bfd59000391a64f41ab86d5a847f008a (diff) | |
download | gitlab-ce-5f82ff1469510b4e51d531775a44e4bea92254fe.tar.gz |
Bring scoped environment variables to core
As decided in https://gitlab.com/gitlab-org/gitlab-ce/issues/53593
Diffstat (limited to 'spec/features/project_variables_spec.rb')
-rw-r--r-- | spec/features/project_variables_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/project_variables_spec.rb b/spec/features/project_variables_spec.rb index 95685a3c7ff..9e3f8a843a1 100644 --- a/spec/features/project_variables_spec.rb +++ b/spec/features/project_variables_spec.rb @@ -17,4 +17,27 @@ describe 'Project variables', :js do end it_behaves_like 'variable list' + + it 'adds new variable with a special environment scope' do + page.within('.js-ci-variable-list-section .js-row:last-child') do + find('.js-ci-variable-input-key').set('somekey') + find('.js-ci-variable-input-value').set('somevalue') + + find('.js-variable-environment-toggle').click + find('.js-variable-environment-dropdown-wrapper .dropdown-input-field').set('review/*') + find('.js-variable-environment-dropdown-wrapper .js-dropdown-create-new-item').click + + expect(find('input[name="variables[variables_attributes][][environment_scope]"]', visible: false).value).to eq('review/*') + end + + click_button('Save variables') + wait_for_requests + + visit page_path + + page.within('.js-ci-variable-list-section .js-row:nth-child(2)') do + expect(find('.js-ci-variable-input-key').value).to eq('somekey') + expect(page).to have_content('review/*') + end + end end |