From f06559aafda58e9c8f7a0d5cd08f82b33524e500 Mon Sep 17 00:00:00 2001 From: Amardeepsingh Siglani Date: Mon, 18 Sep 2023 13:30:12 -0700 Subject: [PATCH] [Alerting] use input element for typing (#872) When selecting delegate monitors for composite monitor creation, we are typing in the combo box div element which is throwing invalid typing element error. This PR fixes that by selecting the child input element instead. This change is already part of #866 for 2.x Issues Resolved: opensearch-project/alerting-dashboards-plugin#728 Signed-off-by: Amardeepsingh Siglani --- .../composite_level_monitor_spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cypress/integration/plugins/alerting-dashboards-plugin/composite_level_monitor_spec.js b/cypress/integration/plugins/alerting-dashboards-plugin/composite_level_monitor_spec.js index 42d71bb4b..96ea249c6 100644 --- a/cypress/integration/plugins/alerting-dashboards-plugin/composite_level_monitor_spec.js +++ b/cypress/integration/plugins/alerting-dashboards-plugin/composite_level_monitor_spec.js @@ -76,13 +76,13 @@ describe('CompositeLevelMonitor', () => { }); // Select associated monitors - cy.get('[data-test-subj="monitors_list_0"]').type('monitorOne', { + cy.get('[id="associatedMonitorsList_0"]').type('monitorOne', { delay: 50, force: true, }); cy.get('[title="monitorOne"]').click({ force: true }); - cy.get('[data-test-subj="monitors_list_1"]').type('monitorTwo', { + cy.get('[id="associatedMonitorsList_1"]').type('monitorTwo', { delay: 50, force: true, }); @@ -163,8 +163,9 @@ describe('CompositeLevelMonitor', () => { cy.get('button').contains('Add another monitor').click({ force: true }); - cy.get('[data-test-subj="monitors_list_2"]').type('monitorThree', { + cy.get('[id="associatedMonitorsList_2"]').type('monitorThree', { delay: 50, + force: true, }); cy.get('[title="monitorThree"]').click({ force: true });