diff options
Diffstat (limited to 'spec/features/project_variables_spec.rb')
-rw-r--r-- | spec/features/project_variables_spec.rb | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/spec/features/project_variables_spec.rb b/spec/features/project_variables_spec.rb index e2fa924af67..9a1aa41b982 100644 --- a/spec/features/project_variables_spec.rb +++ b/spec/features/project_variables_spec.rb @@ -13,13 +13,13 @@ RSpec.describe 'Project variables', :js, feature_category: :secrets_management d project.add_maintainer(user) project.variables << variable - stub_feature_flags(ci_variable_drawer: false) visit page_path wait_for_requests end context 'when ci_variables_pages FF is enabled' do - it_behaves_like 'variable list' + it_behaves_like 'variable list drawer' + it_behaves_like 'variable list env scope' it_behaves_like 'variable list pagination', :ci_variable end @@ -28,37 +28,7 @@ RSpec.describe 'Project variables', :js, feature_category: :secrets_management d stub_feature_flags(ci_variables_pages: false) end - it_behaves_like 'variable list' - end - - 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') - - click_button('All (default)') - fill_in 'Search', with: '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 - - context 'when ci_variable_drawer FF is enabled' do - before do - stub_feature_flags(ci_variable_drawer: true) - visit page_path - wait_for_requests - end - it_behaves_like 'variable list drawer' + it_behaves_like 'variable list env scope' end end |