diff --git a/e2e-tests/cypress/e2e/Sanity-check.cy.ts b/e2e-tests/cypress/e2e/Sanity-check.cy.ts index 4582b0ab..3de31fe8 100644 --- a/e2e-tests/cypress/e2e/Sanity-check.cy.ts +++ b/e2e-tests/cypress/e2e/Sanity-check.cy.ts @@ -61,10 +61,10 @@ describe('sanity check', () => { Reporting.downloadAndVerifyAnyReportExists(); cy.log('Change tenancy, and initialize it'); - const finishUrl = - semver.gte(getKibanaVersion(), '8.19.0') && semver.lt(getKibanaVersion(), '9.0.0') - ? '/app/management/insightsAndAlerting/reporting/exports' - : '/app/management/insightsAndAlerting/reporting'; + // Kibana 8.19 and 9.1+ redirect the reporting page to /exports. 9.0 keeps the bare path. + const finishUrl = semver.satisfies(getKibanaVersion(), '>=8.19.0 <9.0.0 || >=9.1.0') + ? '/app/management/insightsAndAlerting/reporting/exports' + : '/app/management/insightsAndAlerting/reporting'; RorMenu.changeTenancy('Infosec', finishUrl); diff --git a/e2e-tests/cypress/support/page-objects/Reporting.ts b/e2e-tests/cypress/support/page-objects/Reporting.ts index e51b6f6f..d2e97aad 100644 --- a/e2e-tests/cypress/support/page-objects/Reporting.ts +++ b/e2e-tests/cypress/support/page-objects/Reporting.ts @@ -49,7 +49,8 @@ export class Reporting { static verifyIfReportingPageAfterRefresh() { cy.log('Verify if reporting page open after refresh'); - const expectedUrl = semver.satisfies(getKibanaVersion(), '>=8.19.0 <9.0.0') + // Kibana 8.19 and 9.1+ redirect the reporting page to /exports. 9.0 keeps the bare path. + const expectedUrl = semver.satisfies(getKibanaVersion(), '>=8.19.0 <9.0.0 || >=9.1.0') ? `${Cypress.config().baseUrl}/s/default/app/management/insightsAndAlerting/reporting/exports` : `${Cypress.config().baseUrl}/s/default/app/management/insightsAndAlerting/reporting`;