Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select checkbox via id instead of class name #1503

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +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'
);

// Select an alias
cy.get(`[data-test-subj="checkboxSelectRow-${sample_alias}"]`).check({
force: true,
});

cy.get('[data-test-subj="moreAction"]').click();

// Extra wait required for page data to load, otherwise "Enable" button will be disabled
cy.wait(2000);
cy.get('[data-test-subj="moreAction"] button')
.click()
.get('[data-test-subj="Flush Action"]')
.should('be.disabled')
.end();

// Flush btn should be enabled
cy.get('[data-test-subj="Flush Action"]')
.should('exist')
.should('not.have.class', 'euiContextMenuItem-isDisabled')
.click();
cy.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
Loading