debian-mirror-gitlab/spec/features/admin_variables_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
897 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-05-27 22:25:52 +05:30
RSpec.describe 'Instance variables', :js, feature_category: :pipeline_composition do
2022-08-27 11:52:29 +05:30
let(:admin) { create(:admin) }
let(:page_path) { ci_cd_admin_application_settings_path }
let_it_be(:variable) { create(:ci_instance_variable, key: 'test_key', value: 'test_value', masked: true) }
before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
sign_in(admin)
gitlab_enable_admin_mode_sign_in(admin)
2023-05-27 22:25:52 +05:30
2023-01-13 00:05:48 +05:30
visit page_path
2022-08-27 11:52:29 +05:30
wait_for_requests
end
2023-05-27 22:25:52 +05:30
context 'when ci_variables_pages FF is enabled' do
it_behaves_like 'variable list', is_admin: true
it_behaves_like 'variable list pagination', :ci_instance_variable
end
context 'when ci_variables_pages FF is disabled' do
before do
stub_feature_flags(ci_variables_pages: false)
end
it_behaves_like 'variable list', is_admin: true
end
2022-08-27 11:52:29 +05:30
end