diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 12:10:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 12:10:23 +0300 |
commit | 4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (patch) | |
tree | a411c934419690755623a57ff7ea5f47050050e2 /spec/features | |
parent | 03a521732276f8abc4ba069dd985b22cd9bc5929 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_settings_spec.rb | 49 | ||||
-rw-r--r-- | spec/features/issues/incident_issue_spec.rb | 26 |
2 files changed, 75 insertions, 0 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index c281ba3aab9..369b258a63d 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -285,6 +285,55 @@ RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_n expect(current_settings.auto_devops_domain).to eq('domain.com') expect(page).to have_content "Application settings saved successfully" end + + context 'Container Registry' do + context 'delete tags service execution timeout' do + let(:feature_flag_enabled) { true } + let(:client_support) { true } + + before do + stub_container_registry_config(enabled: true) + stub_feature_flags(container_registry_expiration_policies_throttling: feature_flag_enabled) + allow(ContainerRegistry::Client).to receive(:supports_tag_delete?).and_return(client_support) + end + + RSpec.shared_examples 'not having service timeout settings' do + it 'lacks the timeout settings' do + visit ci_cd_admin_application_settings_path + + expect(page).not_to have_content "Container Registry delete tags service execution timeout" + end + end + + context 'with feature flag enabled' do + context 'with client supporting tag delete' do + it 'changes the timeout' do + visit ci_cd_admin_application_settings_path + + page.within('.as-registry') do + fill_in 'application_setting_container_registry_delete_tags_service_timeout', with: 400 + click_button 'Save changes' + end + + expect(current_settings.container_registry_delete_tags_service_timeout).to eq(400) + expect(page).to have_content "Application settings saved successfully" + end + end + + context 'with client not supporting tag delete' do + let(:client_support) { false } + + it_behaves_like 'not having service timeout settings' + end + end + + context 'with feature flag disabled' do + let(:feature_flag_enabled) { false } + + it_behaves_like 'not having service timeout settings' + end + end + end end context 'Repository page' do diff --git a/spec/features/issues/incident_issue_spec.rb b/spec/features/issues/incident_issue_spec.rb new file mode 100644 index 00000000000..57dfb370bf4 --- /dev/null +++ b/spec/features/issues/incident_issue_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Incident Detail', :js do + let(:user) { create(:user) } + let(:project) { create(:project, :public) } + let(:incident) { create(:issue, project: project, author: user, issue_type: 'incident', description: 'hello') } + + context 'when user displays the incident' do + before do + visit project_issue_path(project, incident) + wait_for_requests + end + + it 'shows the incident tabs' do + page.within('.issuable-details') do + incident_tabs = find('[data-testid="incident-tabs"]') + + expect(find('h2')).to have_content(incident.title) + expect(incident_tabs).to have_content('Summary') + expect(incident_tabs).to have_content(incident.description) + end + end + end +end |