From eccc0970650b038d699349f6a586e8ac05d65cc1 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Tue, 26 Mar 2024 13:13:59 +0530 Subject: [PATCH] flaky test flush action aliasesgit status Signed-off-by: Ramakrishna Chilaka --- .../index-management-dashboards-plugin/aliases.js | 9 +++------ 1 file changed, 3 insertions(+), 6 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..5736bdd94 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/aliases.js @@ -170,23 +170,20 @@ 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"); + cy.get('[data-test-subj="moreAction"] button').click().get('[data-test-subj="Flush Action"]').should("be.disabled").end(); // 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("not.be.disabled").end(); // Check for flush index modal cy.contains("Flush alias"); - cy.get('[data-test-subj="flushConfirmButton"]').click(); + cy.get('[data-test-subj="flushConfirmButton"]').should("not.be.disabled").click(); // Check for success toast cy.contains(`The alias ${sample_alias} has been successfully flushed.`);