From 91116b79e7a5f0a0309225864d3dce05eea5f64e Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Tue, 26 Mar 2024 14:05:23 +0530 Subject: [PATCH] flaky test flush action aliases Signed-off-by: Ramakrishna Chilaka --- .../aliases.js | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js index 97e84cb6e..3dd341f48 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js @@ -170,18 +170,19 @@ describe("Aliases", () => { expect(num).to.equal(1); }); - cy.get('[data-test-subj="moreAction"]').click(); // Flush btn should be disabled if no items selected - cy.get('[data-test-subj="Flush Action"]').should("have.class", "euiContextMenuItem-isDisabled"); - - // Select an alias - cy.get(`[data-test-subj="checkboxSelectRow-${sample_alias}"]`).check({ - force: true, - }); - - cy.get('[data-test-subj="moreAction"]').click(); - // Flush btn should be enabled - cy.get('[data-test-subj="Flush Action"]').should("exist").should("not.have.class", "euiContextMenuItem-isDisabled").click(); + cy.get('[data-test-subj="moreAction"] button') + .click() + .get('[data-test-subj="Flush Action"]') + .should("be.disabled") + .get(`#_selection_column_${sample_alias}-checkbox`) + .click() + .get('[data-test-subj="moreAction"] button') + .click() + .get('[data-test-subj="Flush Action"]') + .should("not.be.disabled") + .click() + .end(); // Check for flush index modal cy.contains("Flush alias");