Commit b726602f authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '322198-fix-metrics-tab' into 'master'

Fix Metric tab not showing up on operations page

See merge request gitlab-org/gitlab!54736
parents 20bd4497 7dacf1bd
......@@ -368,7 +368,7 @@ export default {
<alert-details-table :alert="alert" :loading="loading" />
</gl-tab>
<gl-tab
v-if="isThreatMonitoringPage"
v-if="!isThreatMonitoringPage"
:data-testid="$options.tabsConfig[1].id"
:title="$options.tabsConfig[1].title"
>
......
---
title: Fix Metric tab not showing up on operations page
merge_request: 54736
author:
type: fixed
......@@ -128,6 +128,10 @@ describe('AlertDetails', () => {
expect(wrapper.findByTestId('startTimeItem').exists()).toBe(true);
expect(wrapper.findByTestId('startTimeItem').props('time')).toBe(mockAlert.startedAt);
});
it('renders the metrics tab', () => {
expect(findMetricsTab().exists()).toBe(true);
});
});
describe('individual alert fields', () => {
......@@ -179,7 +183,8 @@ describe('AlertDetails', () => {
describe('Threat Monitoring details', () => {
it('should not render the metrics tab', () => {
mountComponent({
data: { alert: mockAlert, provide: { isThreatMonitoringPage: true } },
data: { alert: mockAlert },
provide: { isThreatMonitoringPage: true },
});
expect(findMetricsTab().exists()).toBe(false);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment