diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-19 12:11:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-19 12:11:29 +0300 |
commit | 39e7e7beda5ab61c707eb050304a68bffa91dabd (patch) | |
tree | c024ee27baa67beddb8d5e19d564d56bbe4acf94 /spec/features/project_variables_spec.rb | |
parent | 8c68904468d88beaeb618bfe81289a6c1eb8538c (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |