summaryrefslogtreecommitdiff
path: root/spec/frontend/monitoring/components
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/monitoring/components')
-rw-r--r--spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap8
-rw-r--r--spec/frontend/monitoring/components/__snapshots__/empty_state_spec.js.snap3
-rw-r--r--spec/frontend/monitoring/components/__snapshots__/group_empty_state_spec.js.snap7
-rw-r--r--spec/frontend/monitoring/components/dashboard_actions_menu_spec.js4
-rw-r--r--spec/frontend/monitoring/components/dashboard_url_time_spec.js2
5 files changed, 17 insertions, 7 deletions
diff --git a/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap b/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap
index bd2e818df4f..28039321428 100644
--- a/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap
+++ b/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap
@@ -5,7 +5,7 @@ exports[`Dashboard template matches the default snapshot 1`] = `
class="prometheus-graphs"
data-qa-selector="prometheus_graphs"
environmentstate="available"
- metricsdashboardbasepath="/monitoring/monitor-project/-/environments/1/metrics"
+ metricsdashboardbasepath="/monitoring/monitor-project/-/metrics?environment=1"
metricsendpoint="/monitoring/monitor-project/-/environments/1/additional_metrics.json"
>
<div>
@@ -17,11 +17,11 @@ exports[`Dashboard template matches the default snapshot 1`] = `
primarybuttontext=""
secondarybuttonlink=""
secondarybuttontext=""
- title="Feature deprecation and removal"
- variant="danger"
+ title="Feature deprecation"
+ variant="warning"
>
<gl-sprintf-stub
- message="The metrics, logs and tracing features were deprecated in GitLab 14.7 and are %{epicStart} scheduled for removal %{epicEnd} in GitLab 15.0."
+ message="The metrics feature was deprecated in GitLab 14.7."
/>
<gl-sprintf-stub
diff --git a/spec/frontend/monitoring/components/__snapshots__/empty_state_spec.js.snap b/spec/frontend/monitoring/components/__snapshots__/empty_state_spec.js.snap
index 4f8a82692b8..08487a7a796 100644
--- a/spec/frontend/monitoring/components/__snapshots__/empty_state_spec.js.snap
+++ b/spec/frontend/monitoring/components/__snapshots__/empty_state_spec.js.snap
@@ -6,6 +6,7 @@ exports[`EmptyState shows gettingStarted state 1`] = `
<gl-empty-state-stub
description="Stay updated about the performance and health of your environment by configuring Prometheus to monitor your deployments."
+ invertindarkmode="true"
primarybuttonlink="/clustersPath"
primarybuttontext="Install on clusters"
secondarybuttonlink="/settingsPath"
@@ -22,6 +23,7 @@ exports[`EmptyState shows noData state 1`] = `
<gl-empty-state-stub
description="You are connected to the Prometheus server, but there is currently no data to display."
+ invertindarkmode="true"
primarybuttonlink="/settingsPath"
primarybuttontext="Configure Prometheus"
secondarybuttonlink=""
@@ -38,6 +40,7 @@ exports[`EmptyState shows unableToConnect state 1`] = `
<gl-empty-state-stub
description="Ensure connectivity is available from the GitLab server to the Prometheus server"
+ invertindarkmode="true"
primarybuttonlink="/documentationPath"
primarybuttontext="View documentation"
secondarybuttonlink="/settingsPath"
diff --git a/spec/frontend/monitoring/components/__snapshots__/group_empty_state_spec.js.snap b/spec/frontend/monitoring/components/__snapshots__/group_empty_state_spec.js.snap
index 9b2aa3a5b5b..1d7ff420a17 100644
--- a/spec/frontend/monitoring/components/__snapshots__/group_empty_state_spec.js.snap
+++ b/spec/frontend/monitoring/components/__snapshots__/group_empty_state_spec.js.snap
@@ -4,6 +4,7 @@ exports[`GroupEmptyState given state BAD_QUERY passes the expected props to GlEm
Object {
"compact": true,
"description": null,
+ "invertInDarkMode": true,
"primaryButtonLink": "/path/to/settings",
"primaryButtonText": "Verify configuration",
"secondaryButtonLink": null,
@@ -31,6 +32,7 @@ exports[`GroupEmptyState given state CONNECTION_FAILED passes the expected props
Object {
"compact": true,
"description": "We couldn't reach the Prometheus server. Either the server no longer exists or the configuration details need updating.",
+ "invertInDarkMode": true,
"primaryButtonLink": "/path/to/settings",
"primaryButtonText": "Verify configuration",
"secondaryButtonLink": null,
@@ -47,6 +49,7 @@ exports[`GroupEmptyState given state FOO STATE passes the expected props to GlEm
Object {
"compact": true,
"description": "An error occurred while loading the data. Please try again.",
+ "invertInDarkMode": true,
"primaryButtonLink": null,
"primaryButtonText": null,
"secondaryButtonLink": null,
@@ -63,6 +66,7 @@ exports[`GroupEmptyState given state LOADING passes the expected props to GlEmpt
Object {
"compact": true,
"description": "Creating graphs uses the data from the Prometheus server. If this takes a long time, ensure that data is available.",
+ "invertInDarkMode": true,
"primaryButtonLink": null,
"primaryButtonText": null,
"secondaryButtonLink": null,
@@ -79,6 +83,7 @@ exports[`GroupEmptyState given state NO_DATA passes the expected props to GlEmpt
Object {
"compact": true,
"description": null,
+ "invertInDarkMode": true,
"primaryButtonLink": null,
"primaryButtonText": null,
"secondaryButtonLink": null,
@@ -106,6 +111,7 @@ exports[`GroupEmptyState given state TIMEOUT passes the expected props to GlEmpt
Object {
"compact": true,
"description": null,
+ "invertInDarkMode": true,
"primaryButtonLink": null,
"primaryButtonText": null,
"secondaryButtonLink": null,
@@ -133,6 +139,7 @@ exports[`GroupEmptyState given state UNKNOWN_ERROR passes the expected props to
Object {
"compact": true,
"description": "An error occurred while loading the data. Please try again.",
+ "invertInDarkMode": true,
"primaryButtonLink": null,
"primaryButtonText": null,
"secondaryButtonLink": null,
diff --git a/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js b/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js
index d0d0c3071d5..d74f959ac0f 100644
--- a/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js
+++ b/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js
@@ -109,7 +109,7 @@ describe('Actions menu', () => {
describe('adding new metric from modal', () => {
let origPage;
- beforeEach((done) => {
+ beforeEach(() => {
jest.spyOn(Tracking, 'event').mockReturnValue();
createShallowWrapper();
@@ -118,7 +118,7 @@ describe('Actions menu', () => {
origPage = document.body.dataset.page;
document.body.dataset.page = 'projects:environments:metrics';
- nextTick(done);
+ return nextTick();
});
afterEach(() => {
diff --git a/spec/frontend/monitoring/components/dashboard_url_time_spec.js b/spec/frontend/monitoring/components/dashboard_url_time_spec.js
index 246dd598d19..64c48100b31 100644
--- a/spec/frontend/monitoring/components/dashboard_url_time_spec.js
+++ b/spec/frontend/monitoring/components/dashboard_url_time_spec.js
@@ -126,7 +126,7 @@ describe('dashboard invalid url parameters', () => {
});
it('redirects to different time range', async () => {
- const toUrl = `${mockProjectDir}/-/environments/1/metrics`;
+ const toUrl = `${mockProjectDir}/-/metrics?environment=1`;
removeParams.mockReturnValueOnce(toUrl);
createMountedWrapper();