Skip to content
Open
Changes from all commits
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 @@ -500,45 +500,44 @@ describe('Indices', () => {
});
});

// TODO: FIX THIS TEST
// it('successfully open an index', () => {
// // Confirm we have our initial index
// cy.contains(SAMPLE_INDEX);

// cy.get('[data-test-subj="moreAction"]').click();
// // Open btn should be disabled if no items selected
// cy.get('[data-test-subj="Open Action"]').should(
// 'have.class',
// 'euiContextMenuItem-isDisabled'
// );

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

// cy.get('[data-test-subj="moreAction"]').click();
// // Open btn should be enabled
// cy.get('[data-test-subj="Open Action"]')
// .should('exist')
// .should('not.have.class', 'euiContextMenuItem-isDisabled')
// .click();

// // Check for open index modal
// cy.contains('Open');

// cy.get('[data-test-subj="Open Confirm button"]').click();

// // Check for success toast
// cy.contains(/sample_index have been opened/);

// // Confirm the index is open
// cy.get(`input[type="search"]`).focus().type(SAMPLE_INDEX);
// cy.get('tbody > tr').should(($tr) => {
// expect($tr, '1 row').to.have.length(1);
// expect($tr, 'item').to.contain('open');
// });
// });
it('successfully open an index', () => {
// Confirm we have our initial index
cy.contains(SAMPLE_INDEX);

cy.get('[data-test-subj="moreAction"]').click();
// Open btn should be disabled if no items selected
cy.get('[data-test-subj="Open Action"]').should(
'have.class',
'euiContextMenuItem-isDisabled'
);

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

cy.get('[data-test-subj="moreAction"]').click();
// Open btn should be enabled
cy.get('[data-test-subj="Open Action"]')
.should('exist')
.should('not.have.class', 'euiContextMenuItem-isDisabled')
.click();

// Check for open index modal
cy.contains('Open');

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

// Check for success toast
cy.contains(/sample_index have been opened/);

// Confirm the index is open
cy.get(`input[type="search"]`).focus().type(SAMPLE_INDEX);
cy.get('tbody > tr').should(($tr) => {
expect($tr, '1 row').to.have.length(1);
expect($tr, 'item').to.contain('open');
});
});
});

describe('can clear cache for indexes', () => {
Expand Down
Loading