Skip to content

Commit

Permalink
flaky test flush action aliases
Browse files Browse the repository at this point in the history
Signed-off-by: Ramakrishna Chilaka <[email protected]>
  • Loading branch information
RamakrishnaChilaka committed Mar 26, 2024
1 parent bd37b58 commit 91116b7
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 91116b7

Please sign in to comment.