From b5b2cb8238b6e7ae5999e37fcca2ab7d346a6e15 Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Fri, 18 Oct 2024 10:59:28 -0700 Subject: [PATCH] Security analytics cypress test fixes. (#1590) * Added short wait to help reduce flakiness. Signed-off-by: AWSHurneyt * Gave rule unique ID. Signed-off-by: AWSHurneyt --------- Signed-off-by: AWSHurneyt --- .../rule/create_dns_rule_with_type_selection.json | 2 +- .../plugins/security-analytics-dashboards-plugin/commands.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cypress/fixtures/plugins/security-analytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_type_selection.json b/cypress/fixtures/plugins/security-analytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_type_selection.json index e447a30d5..f332a4868 100644 --- a/cypress/fixtures/plugins/security-analytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_type_selection.json +++ b/cypress/fixtures/plugins/security-analytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_type_selection.json @@ -1,5 +1,5 @@ { - "id": "25b9c01c-350d-4b95-bed1-836d04a4f325", + "id": "25b9c01c-350d-4b95-bed1-836d04a4f324", "category": "dns", "title": "Cypress DNS Type Rule", "description": "Detects DNS type as QWE", diff --git a/cypress/utils/plugins/security-analytics-dashboards-plugin/commands.js b/cypress/utils/plugins/security-analytics-dashboards-plugin/commands.js index 708b1e8bc..3bf1e0cf0 100644 --- a/cypress/utils/plugins/security-analytics-dashboards-plugin/commands.js +++ b/cypress/utils/plugins/security-analytics-dashboards-plugin/commands.js @@ -198,6 +198,9 @@ Cypress.Commands.add( Cypress.log({ message: `Select combobox items: ${items.join(' | ')}` }); items.map((item) => { cy.wrap(subject).type(item); + + // Short wait to reduce flakiness + cy.wait(3000); cy.get(`[title="${item}"]`).click({ force: true }); }); }