From 0bc802f150324d39b99c275a7972c7c0e940780c Mon Sep 17 00:00:00 2001 From: Simone Scarduzio Date: Tue, 22 Sep 2026 16:07:07 +0200 Subject: [PATCH] Expect the /exports reporting URL on Kibana 9.1+ Kibana 9.1 and later redirect the reporting management page to /exports, the same as 8.19. The sanity check expected the bare /reporting path there and passed only when Cypress read the URL before the client-side redirect fired. Co-Authored-By: Claude Fable 5.1 --- e2e-tests/cypress/e2e/Sanity-check.cy.ts | 8 ++++---- e2e-tests/cypress/support/page-objects/Reporting.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) 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`;