diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 13:49:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 13:49:51 +0000 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /qa/qa/specs/features/browser_ui/8_monitor/alert_management/automatically_creates_incident_for_alert_spec.rb | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) | |
download | gitlab-ce-a36f25615e8226344d87b692ccf3e543d5d81712.tar.gz |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'qa/qa/specs/features/browser_ui/8_monitor/alert_management/automatically_creates_incident_for_alert_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/8_monitor/alert_management/automatically_creates_incident_for_alert_spec.rb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/8_monitor/alert_management/automatically_creates_incident_for_alert_spec.rb b/qa/qa/specs/features/browser_ui/8_monitor/alert_management/automatically_creates_incident_for_alert_spec.rb new file mode 100644 index 00000000000..565f56b90ec --- /dev/null +++ b/qa/qa/specs/features/browser_ui/8_monitor/alert_management/automatically_creates_incident_for_alert_spec.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Monitor', product_group: :respond do + describe 'Alert' do + shared_examples 'new alert' do + it 'automatically creates new incident' do + Page::Project::Menu.perform(&:go_to_monitor_incidents) + Page::Project::Monitor::Incidents::Index.perform do |index| + expect(index).to have_incident + end + end + end + + let(:project) do + Resource::Project.fabricate_via_api! do |project| + project.name = 'project-for-alerts' + project.description = 'Project for alerts' + end + end + + before do + Flow::Login.sign_in + project.visit! + Flow::AlertSettings.go_to_monitor_settings + Flow::AlertSettings.enable_create_incident + end + + context( + 'when using HTTP endpoint integration', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/388469' + ) do + before do + Flow::AlertSettings.setup_http_endpoint_integration + Flow::AlertSettings.send_test_alert + end + + it_behaves_like 'new alert' + end + + context( + 'when using Prometheus integration', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/390123' + ) do + before do + Flow::AlertSettings.setup_prometheus_integration + Flow::AlertSettings.send_test_alert(integration_type: 'prometheus') + end + + it_behaves_like 'new alert' + end + end + end +end |