mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 04:56:54 +00:00
Minor: Fix the wrong test result options on add observability alert page (#15043)
* fix test result options * fix observability alert cypress test * Fix Filtering * fix naming order * ignore $ * Fix Alerts --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com>
This commit is contained in:
parent
46649d2b33
commit
8e860a56bf
@ -15,6 +15,7 @@ package org.openmetadata.service.events.subscription;
|
||||
|
||||
import static org.openmetadata.common.utils.CommonUtil.listOrEmpty;
|
||||
import static org.openmetadata.common.utils.CommonUtil.nullOrEmpty;
|
||||
import static org.openmetadata.service.Entity.TEST_SUITE;
|
||||
import static org.openmetadata.service.Entity.THREAD;
|
||||
import static org.openmetadata.service.apps.bundles.changeEvent.AbstractEventConsumer.OFFSET_EXTENSION;
|
||||
import static org.openmetadata.service.security.policyevaluator.CompiledRule.parseExpression;
|
||||
@ -116,6 +117,12 @@ public final class AlertUtil {
|
||||
return config.getResources().get(0).equalsIgnoreCase(thread.getType().value());
|
||||
}
|
||||
|
||||
// Test Suite
|
||||
if (config.getResources().get(0).equals(TEST_SUITE)) {
|
||||
return event.getEntityType().equals(TEST_SUITE)
|
||||
|| event.getEntityType().equals(Entity.TEST_CASE);
|
||||
}
|
||||
|
||||
return config.getResources().contains(event.getEntityType()); // Use Trigger Specific Settings
|
||||
}
|
||||
|
||||
|
||||
@ -274,7 +274,7 @@ public class AlertsRuleEvaluator {
|
||||
},
|
||||
paramInputType = READ_FROM_PARAM_CONTEXT)
|
||||
public boolean getTestCaseStatusIfInTestSuite(
|
||||
List<String> testSuiteList, List<String> testResults) {
|
||||
List<String> testResults, List<String> testSuiteList) {
|
||||
if (changeEvent == null || changeEvent.getChangeDescription() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -406,10 +406,10 @@
|
||||
"displayName": "Get Test Case Status Updates belonging to a Test Suite",
|
||||
"description" : "Get Status Updates Test Cases belonging to a Test Suite",
|
||||
"effect" : "include",
|
||||
"condition": "getTestCaseStatusIfInTestSuite(${testSuiteList}, ${testStatusList})",
|
||||
"condition": "getTestCaseStatusIfInTestSuite(${testStatusList}, ${testSuiteList})",
|
||||
"arguments": [
|
||||
"testSuiteList",
|
||||
"testStatusList"
|
||||
"testStatusList",
|
||||
"testSuiteList"
|
||||
],
|
||||
"inputType": "runtime"
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ describe('Observability Alert Flow', () => {
|
||||
// Add actions
|
||||
cy.get('[data-testid="add-actions"]').click();
|
||||
|
||||
addPipelineStatusUpdatesAction(0, 'Success', true);
|
||||
addPipelineStatusUpdatesAction(0, 'Successful', true);
|
||||
|
||||
// Add multiple destinations
|
||||
[...Array(2).keys()].forEach(() => {
|
||||
|
||||
@ -702,7 +702,7 @@ export const getFieldByArgumentType = (
|
||||
className="w-full"
|
||||
data-testid="test-status-select"
|
||||
mode="multiple"
|
||||
options={getSelectOptionsFromEnum(StatusType)}
|
||||
options={getSelectOptionsFromEnum(TestCaseStatus)}
|
||||
placeholder={t('label.select-field', {
|
||||
field: t('label.test-suite-status'),
|
||||
})}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user