Refactor monitor core tests
What does this MR do?
This MR refactors several aspects of the custom metrics test:
- due to the migration of custom metrics to core:
- added new selectors
app/views/projects/services/prometheus/_custom_metrics.html.haml
- removed custom metric related logic from
qa/qa/ee/page/project/operations/metrics/show.rb
- created a component to store the new custom metric logic in core in
qa/qa/page/component/custom_metric.rb
due to being able to reuse it in a model or withinqa/qa/page/project/settings/services/prometheus.rb
- added missing edit and delete of custom metric verifications by using the prometheus integrations page modeled by
qa/qa/page/project/settings/integrations.rb
andqa/qa/page/project/settings/services/prometheus.rb
- Fixed issue with runner by adding the correct tag in
qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml
- The logic of the test is purposely condensed in order to have one common setup. This is not the known pattern followed in many of our specs but a necessary alternative due to the costly setup of a project to be monitored
Edited by 🤖 GitLab Bot 🤖