Skip to content
Merged
Show file tree
Hide file tree
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 @@ -29,7 +29,7 @@ describe('Managed indices', () => {
// Common text to wait for to confirm page loaded, give up to 60 seconds for initial load
cy.contains('Edit rollover alias', { timeout: 60000 });

cy.get('[data-test-subj="toastCloseButton"]').click({ force: true });
cy.get('body').then(($body) => { if ($body.find('[data-test-subj="toastCloseButton"]').length) { cy.get('[data-test-subj="toastCloseButton"]').click({ force: true }); } });
});

describe('can have policies removed', () => {
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('Managed indices', () => {
// Wait up to 5 seconds for the managed index to execute
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000).reload();
cy.get('[data-test-subj="toastCloseButton"]').click({ force: true });
cy.get('body').then(($body) => { if ($body.find('[data-test-subj="toastCloseButton"]').length) { cy.get('[data-test-subj="toastCloseButton"]').click({ force: true }); } });

// Confirm managed index successfully initialized the policy
cy.contains('Successfully initialized', { timeout: 20000 });
Expand All @@ -100,7 +100,7 @@ describe('Managed indices', () => {
// Wait up to 5 seconds for managed index to execute
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000).reload();
cy.get('[data-test-subj="toastCloseButton"]').click({ force: true });
cy.get('body').then(($body) => { if ($body.find('[data-test-subj="toastCloseButton"]').length) { cy.get('[data-test-subj="toastCloseButton"]').click({ force: true }); } });

// Confirm we have a Failed execution, wait up to 20 seconds as OSD takes a while to load
cy.contains('Failed', { timeout: 20000 });
Expand All @@ -127,7 +127,7 @@ describe('Managed indices', () => {

// Reload the page
cy.reload();
cy.get('[data-test-subj="toastCloseButton"]').click({ force: true });
cy.get('body').then(($body) => { if ($body.find('[data-test-subj="toastCloseButton"]').length) { cy.get('[data-test-subj="toastCloseButton"]').click({ force: true }); } });

// Confirm we see managed index attempting to retry, give 20 seconds for OSD load
cy.contains('Pending retry of failed managed index', { timeout: 20000 });
Expand All @@ -138,7 +138,7 @@ describe('Managed indices', () => {
// Wait up to 5 seconds for managed index to execute
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000).reload();
cy.get('[data-test-subj="toastCloseButton"]').click({ force: true });
cy.get('body').then(($body) => { if ($body.find('[data-test-subj="toastCloseButton"]').length) { cy.get('[data-test-subj="toastCloseButton"]').click({ force: true }); } });

// Confirm managed index successfully rolled over
cy.contains('Successfully rolled over', { timeout: 20000 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('Transforms', () => {
cy.contains('category.keyword_terms');

// Add aggregable field
cy.contains('50 columns hidden').click({ force: true });
cy.contains(/\d+ columns hidden/).click({ force: true });
cy.contains('taxless_total_price').click({ force: true });
// Click out of the window
cy.contains('Select fields to transform').click({ force: true });
Expand Down
Loading