forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Metric threshold] Fix the condition not showing up in the metric thr…
…eshold flyout (elastic#192736) Closes elastic#192439 ## Summary This PR reverts this [line](https://github.com/elastic/kibana/pull/191948/files#diff-2dd82a791bba3d995e9e6b35d4a973053f166351cc6025a5cd1d24dc789766aeR48) in a previous [PR](elastic#191948) that caused an issue in loading the metric threshold flyout on the observability alerts page. | Before ❌ | After ✅ | |---|---| |![Image](https://github.com/user-attachments/assets/3c0b8812-8cd9-4769-bd20-ab10f559009b)|![Image](https://github.com/user-attachments/assets/9823e691-ce18-4c00-8748-ce5797a19943)| I also added a small test that fails before this fix. (cherry picked from commit c304b34)
- Loading branch information
1 parent
7c265ec
commit f5de220
Showing
5 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
x-pack/test/observability_functional/apps/observability/pages/alerts/metric_threshold.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../../../../ftr_provider_context'; | ||
|
||
export default ({ getService }: FtrProviderContext) => { | ||
const esArchiver = getService('esArchiver'); | ||
const testSubjects = getService('testSubjects'); | ||
|
||
describe('Metric threshold rule', function () { | ||
this.tags('includeFirefox'); | ||
|
||
const observability = getService('observability'); | ||
|
||
before(async () => { | ||
await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs'); | ||
await observability.alerts.common.navigateToRulesPage(); | ||
}); | ||
|
||
after(async () => { | ||
await esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs'); | ||
}); | ||
|
||
it('shows the metric threshold rule in the observability section', async () => { | ||
await observability.alerts.rulesPage.clickCreateRuleButton(); | ||
await observability.alerts.rulesPage.clickOnInfrastructureCategory(); | ||
await observability.alerts.rulesPage.clickOnMetricThresholdRule(); | ||
}); | ||
|
||
it('shows an expression row in the condition section', async () => { | ||
await testSubjects.existOrFail('metricThresholdExpressionRow'); | ||
}); | ||
}); | ||
}; |