diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/features/project_variables_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/features/project_variables_spec.rb')
-rw-r--r-- | spec/features/project_variables_spec.rb | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/spec/features/project_variables_spec.rb b/spec/features/project_variables_spec.rb index 89dbd1afc6b..d3bedbf3a75 100644 --- a/spec/features/project_variables_spec.rb +++ b/spec/features/project_variables_spec.rb @@ -14,8 +14,6 @@ RSpec.describe 'Project variables', :js do project.variables << variable end - # TODO: Add same tests but with FF enabled context when - # the new graphQL app for variable settings is enabled. context 'with disabled ff `ci_variable_settings_graphql' do before do stub_feature_flags(ci_variable_settings_graphql: false) @@ -44,4 +42,32 @@ RSpec.describe 'Project variables', :js do end end end + + context 'with enabled ff `ci_variable_settings_graphql' do + before do + visit page_path + end + + it_behaves_like 'variable list' + + it 'adds a new variable with an environment scope' do + click_button('Add variable') + + page.within('#add-ci-variable') do + fill_in 'Key', with: 'akey' + find('#ci-variable-value').set('akey_value') + find('[data-testid="environment-scope"]').click + find('[data-testid="ci-environment-search"]').set('review/*') + find('[data-testid="create-wildcard-button"]').click + + click_button('Add variable') + end + + wait_for_requests + + page.within('[data-testid="ci-variable-table"]') do + expect(find('.js-ci-variable-row:first-child [data-label="Environments"]').text).to eq('review/*') + end + end + end end |