Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6b6b779a
Commit
6b6b779a
authored
Apr 22, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add shared context to prometheus_custom_metrics_spec
parent
76627f8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
ee/spec/features/projects/services/prometheus_custom_metrics_spec.rb
...tures/projects/services/prometheus_custom_metrics_spec.rb
+4
-16
No files found.
ee/spec/features/projects/services/prometheus_custom_metrics_spec.rb
View file @
6b6b779a
...
...
@@ -5,8 +5,8 @@ require 'spec_helper'
describe
'Prometheus custom metrics'
,
:js
do
include
PrometheusHelpers
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
include_context
'project service activation'
let!
(
:prometheus_metric
)
{
create
(
:prometheus_metric
,
project:
project
)
}
around
do
|
example
|
...
...
@@ -14,30 +14,18 @@ describe 'Prometheus custom metrics', :js do
end
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
visit
(
project_settings_integrations_path
(
project
))
click_link
(
'Prometheus'
)
stub_request
(
:get
,
prometheus_query_with_time_url
(
'avg(metric)'
,
Time
.
now
.
utc
))
create
(
:prometheus_service
,
project:
project
,
api_url:
'http://prometheus.example.com'
,
manual_configuration:
'1'
,
active:
true
)
click_link
(
'Prometheus'
)
visit_project_integration
(
'Prometheus'
)
end
it
'Deletes a custom metric'
do
wait_for_requests
it
'deletes a custom metric'
do
first
(
'.custom-metric-link-bold'
).
click
click_button
(
'Delete'
)
click_button
(
'Delete metric'
)
wait_for_requests
expect
(
all
(
'.custom-metric-link-bold'
).
count
).
to
eq
(
0
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment