From ce6498941e91dc2764c3163d14f524c1144dd523 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Mon, 22 Apr 2024 12:50:14 -0400 Subject: [PATCH] Try to fix flaky tests Signed-off-by: Derek Ho --- .../multi_datasources_enabled.spec.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js index 9f0489555..c3a780467 100644 --- a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js +++ b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js @@ -90,7 +90,10 @@ describe('Multi-datasources enabled', () => { it('Checks Get Started Tab', () => { // Remote cluster purge cache cy.visit( - `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/getstarted` + `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/getstarted`, + { + failOnStatusCode: false, + } ); cy.contains('h1', 'Get started'); @@ -106,7 +109,9 @@ describe('Multi-datasources enabled', () => { }); it('Checks Auth Tab', () => { - cy.visit(`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/auth`); + cy.visit(`http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/auth`, { + failOnStatusCode: false, + }); cy.get('.panel-header-count').first().invoke('text').should('contain', '(2)'); }); @@ -125,7 +130,10 @@ describe('Multi-datasources enabled', () => { }, }).then(() => { cy.visit( - `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/users` + `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/users`, + { + failOnStatusCode: false, + } ); cy.get('[data-test-subj="tableHeaderCell_username_0"]').click(); @@ -145,7 +153,10 @@ describe('Multi-datasources enabled', () => { }, }).then(() => { cy.visit( - `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/permissions` + `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/permissions`, + { + failOnStatusCode: false, + } ); // Permission exists on the remote data source