From 0160b8bc0c9e606fdf9aeba8ccec32380d370fbb Mon Sep 17 00:00:00 2001 From: Amardeepsingh Siglani Date: Tue, 5 Sep 2023 13:46:51 -0700 Subject: [PATCH] fixed flaky test Signed-off-by: Amardeepsingh Siglani --- cypress/integration/1_detectors.spec.js | 3 ++- .../components/DetectorDataSource/DetectorDataSource.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/integration/1_detectors.spec.js b/cypress/integration/1_detectors.spec.js index 609615dc6..47e8e35f0 100644 --- a/cypress/integration/1_detectors.spec.js +++ b/cypress/integration/1_detectors.spec.js @@ -115,6 +115,7 @@ const validatePendingFieldMappingsPanel = (mappings) => { const fillDetailsForm = (detectorName, dataSource) => { getNameField().type(detectorName); getDataSourceField().selectComboboxItem(dataSource); + getDataSourceField().blur(); getLogTypeField().selectComboboxItem(cypressLogTypeDns); getLogTypeField().blur(); }; @@ -371,7 +372,7 @@ describe('Detectors', () => { getDataSourceField().selectComboboxItem(cypressIndexWindows); getDataSourceField().focus().blur(); - cy.get('.euiCallOut') + cy.get('[data-test-subj="define-detector-diff-log-types-warning"]') .should('be.visible') .contains( 'To avoid issues with field mappings, we recommend creating separate detectors for different log types.' diff --git a/public/pages/CreateDetector/components/DefineDetector/components/DetectorDataSource/DetectorDataSource.tsx b/public/pages/CreateDetector/components/DefineDetector/components/DetectorDataSource/DetectorDataSource.tsx index 8c6539e37..10fdef34f 100644 --- a/public/pages/CreateDetector/components/DefineDetector/components/DetectorDataSource/DetectorDataSource.tsx +++ b/public/pages/CreateDetector/components/DefineDetector/components/DetectorDataSource/DetectorDataSource.tsx @@ -177,6 +177,7 @@ export default class DetectorDataSource extends Component< To avoid issues with field mappings, we recommend creating separate detectors for