From 3a8ba403fb87a2181cd488f4cdbe55b40d4a1447 Mon Sep 17 00:00:00 2001 From: PeterYurkovich Date: Wed, 12 Aug 2026 07:40:20 -0400 Subject: [PATCH] refactor: move test files to feature folders --- .../alerts_acm.cy.ts} | 0 .../alerts_bvt.cy.ts} | 2 +- .../alerts_ivt.cy.ts} | 25 +---- .../e2e/alerts/alerts_regression.cy.ts | 60 ++++++++++++ .../alerts_virtualization_bvt.cy.ts} | 32 ++----- web/cypress/e2e/coo/01.coo_bvt.cy.ts | 45 --------- ...01.incidents.cy.ts => incidents_bvt.cy.ts} | 0 ...ncidents_e2e.cy.ts => incidents_e2e.cy.ts} | 0 ....cy.ts => incidents_mocking_example.cy.ts} | 0 ...mark.cy.ts => performance_benchmark.cy.ts} | 0 ...gh.cy.ts => performance_walkthrough.cy.ts} | 2 +- ..._alerts.cy.ts => end_and_resolution.cy.ts} | 0 ...01.reg_filtering.cy.ts => filtering.cy.ts} | 0 ...ip_boundary_times.cy.ts => interval.cy.ts} | 0 ...ls.cy.ts => permission_and_silences.cy.ts} | 0 ..._testing_ui.cy.ts => stress_test_ui.cy.ts} | 0 ...dux_effects.cy.ts => ui_interaction.cy.ts} | 0 ...mprehensive.cy.ts => ui_regressions.cy.ts} | 0 .../legacy_dashboards_regression.cy.ts} | 10 +- ...ashboards_virtualization_regression.cy.ts} | 26 +----- .../e2e/metrics/metrics_regression.cy.ts | 91 +++++++++++++++++++ .../metrics_virtualization_ivt.cy.ts} | 64 +++++++++---- .../regression/01.reg_alerts_admin.cy.ts | 36 -------- .../regression/01.reg_alerts_dev.cy.ts | 32 ------- .../regression/02.reg_metrics_admin_1.cy.ts | 49 ---------- .../regression/02.reg_metrics_admin_2.cy.ts | 49 ---------- .../lightspeed_integration.cy.ts} | 0 .../perses_dashboards_bvt.cy.ts} | 0 .../perses_dashboards_create.cy.ts} | 0 .../perses_dashboards_datasources.cy.ts} | 0 .../perses_dashboards_edit.cy.ts} | 0 .../perses_dashboards_import.cy.ts} | 0 .../perses_dashboards_list.cy.ts} | 0 ...erses_dashboards_virtualization_ivt.cy.ts} | 33 ++----- .../rbac/perses_dashboards_user1.cy.ts} | 4 +- .../rbac/perses_dashboards_user2.cy.ts} | 6 +- .../rbac/perses_dashboards_user3.cy.ts} | 7 +- .../rbac/perses_dashboards_user4.cy.ts} | 6 +- .../rbac/perses_dashboards_user5.cy.ts} | 6 +- .../rbac/perses_dashboards_user6.cy.ts} | 6 +- .../admin_perspective_bvt.cy.ts} | 0 web/cypress/e2e/shared/coo_submenus.cy.ts | 57 ++++++++++++ 42 files changed, 301 insertions(+), 347 deletions(-) rename web/cypress/e2e/{coo/02.acm_alerting_ui.cy.ts => alerts/alerts_acm.cy.ts} (100%) rename web/cypress/e2e/{monitoring/00.bvt_dev.cy.ts => alerts/alerts_bvt.cy.ts} (90%) rename web/cypress/e2e/{virtualization/01.coo_ivt_alerts.cy.ts => alerts/alerts_ivt.cy.ts} (81%) create mode 100644 web/cypress/e2e/alerts/alerts_regression.cy.ts rename web/cypress/e2e/{virtualization/00.coo_ivt.cy.ts => alerts/alerts_virtualization_bvt.cy.ts} (72%) delete mode 100644 web/cypress/e2e/coo/01.coo_bvt.cy.ts rename web/cypress/e2e/incidents/{01.incidents.cy.ts => incidents_bvt.cy.ts} (100%) rename web/cypress/e2e/incidents/{00.coo_incidents_e2e.cy.ts => incidents_e2e.cy.ts} (100%) rename web/cypress/e2e/incidents/{02.incidents-mocking-example.cy.ts => incidents_mocking_example.cy.ts} (100%) rename web/cypress/e2e/incidents/performance/{01.performance_benchmark.cy.ts => performance_benchmark.cy.ts} (100%) rename web/cypress/e2e/incidents/performance/{02.performance_walkthrough.cy.ts => performance_walkthrough.cy.ts} (98%) rename web/cypress/e2e/incidents/regression/{03-04.reg_e2e_firing_alerts.cy.ts => end_and_resolution.cy.ts} (100%) rename web/cypress/e2e/incidents/regression/{01.reg_filtering.cy.ts => filtering.cy.ts} (100%) rename web/cypress/e2e/incidents/regression/{02.reg_ui_tooltip_boundary_times.cy.ts => interval.cy.ts} (100%) rename web/cypress/e2e/incidents/regression/{03.reg_api_calls.cy.ts => permission_and_silences.cy.ts} (100%) rename web/cypress/e2e/incidents/regression/{05.reg_stress_testing_ui.cy.ts => stress_test_ui.cy.ts} (100%) rename web/cypress/e2e/incidents/regression/{04.reg_redux_effects.cy.ts => ui_interaction.cy.ts} (100%) rename web/cypress/e2e/incidents/regression/{02.reg_ui_charts_comprehensive.cy.ts => ui_regressions.cy.ts} (100%) rename web/cypress/e2e/{monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts => legacy-dashboards/legacy_dashboards_regression.cy.ts} (83%) rename web/cypress/e2e/{virtualization/03.coo_ivt_legacy_dashboards.cy.ts => legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts} (85%) create mode 100644 web/cypress/e2e/metrics/metrics_regression.cy.ts rename web/cypress/e2e/{virtualization/02.coo_ivt_metrics_1.cy.ts => metrics/metrics_virtualization_ivt.cy.ts} (63%) delete mode 100644 web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts delete mode 100644 web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts delete mode 100644 web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts delete mode 100644 web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts rename web/cypress/e2e/{coo/03.coo_lightspeed_show_timeseries.cy.ts => perses-dashboards/lightspeed_integration.cy.ts} (100%) rename web/cypress/e2e/{perses/00.coo_bvt_perses_admin.cy.ts => perses-dashboards/perses_dashboards_bvt.cy.ts} (100%) rename web/cypress/e2e/{perses/03.coo_create_perses_admin.cy.ts => perses-dashboards/perses_dashboards_create.cy.ts} (100%) rename web/cypress/e2e/{perses/05.coo_tempo_loki_admin.cy.ts => perses-dashboards/perses_dashboards_datasources.cy.ts} (100%) rename web/cypress/e2e/{perses/02.coo_edit_perses_admin.cy.ts => perses-dashboards/perses_dashboards_edit.cy.ts} (100%) rename web/cypress/e2e/{perses/04.coo_import_perses_admin.cy.ts => perses-dashboards/perses_dashboards_import.cy.ts} (100%) rename web/cypress/e2e/{perses/01.coo_list_perses_admin.cy.ts => perses-dashboards/perses_dashboards_list.cy.ts} (100%) rename web/cypress/e2e/{virtualization/04.coo_ivt_perses.cy.ts => perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts} (72%) rename web/cypress/e2e/{perses/99.coo_rbac_perses_user1.cy.ts => perses-dashboards/rbac/perses_dashboards_user1.cy.ts} (93%) rename web/cypress/e2e/{perses/99.coo_rbac_perses_user2.cy.ts => perses-dashboards/rbac/perses_dashboards_user2.cy.ts} (93%) rename web/cypress/e2e/{perses/99.coo_rbac_perses_user3.cy.ts => perses-dashboards/rbac/perses_dashboards_user3.cy.ts} (92%) rename web/cypress/e2e/{perses/99.coo_rbac_perses_user4.cy.ts => perses-dashboards/rbac/perses_dashboards_user4.cy.ts} (93%) rename web/cypress/e2e/{perses/99.coo_rbac_perses_user5.cy.ts => perses-dashboards/rbac/perses_dashboards_user5.cy.ts} (93%) rename web/cypress/e2e/{perses/99.coo_rbac_perses_user6.cy.ts => perses-dashboards/rbac/perses_dashboards_user6.cy.ts} (93%) rename web/cypress/e2e/{monitoring/00.bvt_admin.cy.ts => shared/admin_perspective_bvt.cy.ts} (100%) create mode 100644 web/cypress/e2e/shared/coo_submenus.cy.ts diff --git a/web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts b/web/cypress/e2e/alerts/alerts_acm.cy.ts similarity index 100% rename from web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts rename to web/cypress/e2e/alerts/alerts_acm.cy.ts diff --git a/web/cypress/e2e/monitoring/00.bvt_dev.cy.ts b/web/cypress/e2e/alerts/alerts_bvt.cy.ts similarity index 90% rename from web/cypress/e2e/monitoring/00.bvt_dev.cy.ts rename to web/cypress/e2e/alerts/alerts_bvt.cy.ts index ab142a647..4a27cb66d 100644 --- a/web/cypress/e2e/monitoring/00.bvt_dev.cy.ts +++ b/web/cypress/e2e/alerts/alerts_bvt.cy.ts @@ -8,7 +8,7 @@ const MP = { operatorName: 'Cluster Monitoring Operator', }; -describe('BVT: Monitoring - Namespaced', { tags: ['@alerting'] }, () => { +describe('BVT: Monitoring - Namespaced', { tags: ['@alerting', '@metrics'] }, () => { before(() => { cy.beforeBlock(MP); }); diff --git a/web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts b/web/cypress/e2e/alerts/alerts_ivt.cy.ts similarity index 81% rename from web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts rename to web/cypress/e2e/alerts/alerts_ivt.cy.ts index 090700965..b700b9b29 100644 --- a/web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts +++ b/web/cypress/e2e/alerts/alerts_ivt.cy.ts @@ -34,39 +34,18 @@ const KBV = { }; describe( - 'Installation: COO and setting up Monitoring Plugin', - { tags: ['@alerting', '@virtualization', '@slow', '@coo'] }, + 'Regression: Monitoring - Alerts (Virtualization)', + { tags: ['@alerting', '@slow', '@virtualization', '@coo'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP); - }); - - it('1. Installation: COO and setting up Monitoring Plugin', () => { cy.log('Installation: COO and setting up Monitoring Plugin'); - }); - }, -); - -describe( - 'IVT: Monitoring UIPlugin + Virtualization', - { tags: ['@alerting', '@virtualization', '@slow', '@coo'] }, - () => { - before(() => { cy.beforeBlockVirtualization(KBV); - }); - - it('1. Virtualization perspective - Observe Menu', () => { cy.log('Virtualization perspective - Observe Menu and verify all submenus'); cy.switchPerspective('Virtualization', 'Fleet virtualization'); guidedTour.closeKubevirtTour(); }); - }, -); -describe( - 'Regression: Monitoring - Alerts (Virtualization)', - { tags: ['@alerting', '@slow', '@virtualization', '@coo'] }, - () => { beforeEach(() => { cy.visit('/'); cy.validateLogin(); diff --git a/web/cypress/e2e/alerts/alerts_regression.cy.ts b/web/cypress/e2e/alerts/alerts_regression.cy.ts new file mode 100644 index 000000000..049a7e602 --- /dev/null +++ b/web/cypress/e2e/alerts/alerts_regression.cy.ts @@ -0,0 +1,60 @@ +import { runAllRegressionCorePlatformAlertsTests } from '../../support/monitoring/01.reg_alerts.cy'; +import { alerts } from '../../fixtures/monitoring/alert'; +import { runAllRegressionAlertsTestsNamespace } from '../../support/monitoring/04.reg_alerts_namespace.cy'; +import { commonPages } from '../../views/common'; +import { nav } from '../../views/nav'; + +const MP = { + namespace: 'openshift-monitoring', + operatorName: 'Cluster Monitoring Operator', +}; + +// Test suite for Core platform perspective +describe( + 'Regression: Monitoring - Alerts (Core platform)', + { tags: ['@alerting', '@metrics'] }, + () => { + before(() => { + cy.beforeBlock(MP); + cy.switchPerspective('Core platform'); + }); + + beforeEach(() => { + alerts.getWatchdogAlert(); + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + nav.sidenav.clickNavLink(['Observe', 'Alerting']); + commonPages.titleShouldHaveText('Alerting'); + alerts.getWatchdogAlert(); + }); + + // Run tests in Core platform perspective + runAllRegressionCorePlatformAlertsTests({ + name: 'Administrator', + }); + }, +); + +describe( + 'Regression: Monitoring - Alerts Namespaced (Administrator)', + { tags: ['@alerting'] }, + () => { + before(() => { + cy.beforeBlock(MP); + }); + + beforeEach(() => { + alerts.getWatchdogAlert(); + nav.sidenav.clickNavLink(['Observe', 'Alerting']); + commonPages.titleShouldHaveText('Alerting'); + alerts.getWatchdogAlert(); + cy.changeNamespace(MP.namespace); + }); + + // Run tests in Administrator perspective + runAllRegressionAlertsTestsNamespace({ + name: 'Administrator', + }); + }, +); diff --git a/web/cypress/e2e/virtualization/00.coo_ivt.cy.ts b/web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts similarity index 72% rename from web/cypress/e2e/virtualization/00.coo_ivt.cy.ts rename to web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts index 8a379395e..b37ddbfd9 100644 --- a/web/cypress/e2e/virtualization/00.coo_ivt.cy.ts +++ b/web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts @@ -3,6 +3,7 @@ import { guidedTour } from '../../views/tour'; import { alerts } from '../../fixtures/monitoring/alert'; import { nav } from '../../views/nav'; import { commonPages } from '../../views/common'; +import { troubleshootingPanelPage } from 'cypress/views/troubleshooting-panel'; // Set constants for the operators that need to be installed for tests. const MCP = { @@ -34,41 +35,24 @@ const KBV = { }; describe( - 'Installation: COO and setting up Monitoring Plugin', - { tags: ['@virtualization', '@coo', '@slow'] }, + 'IVT: Monitoring + Virtualization', + { tags: ['@metrics', '@alerting', '@slow', '@virtualization', '@coo'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP); - }); - - it('1. Installation: COO and setting up Monitoring Plugin', () => { cy.log('Installation: COO and setting up Monitoring Plugin'); + cy.beforeBlockVirtualization(KBV); + cy.log('Virtualization perspective - Observe Menu and verify all submenus'); + cy.switchPerspective('Virtualization', 'Fleet virtualization'); + guidedTour.closeKubevirtTour(); }); - }, -); - -describe('Installation: Virtualization', { tags: ['@virtualization', '@coo', '@slow'] }, () => { - before(() => { - cy.beforeBlockVirtualization(KBV); - }); - - it('1. Virtualization perspective - Observe Menu', () => { - cy.log('Virtualization perspective - Observe Menu and verify all submenus'); - cy.switchPerspective('Virtualization', 'Fleet virtualization'); - guidedTour.closeKubevirtTour(); - }); -}); - -describe( - 'IVT: Monitoring + Virtualization', - { tags: ['@metrics', '@alerting', '@virtualization', '@coo'] }, - () => { beforeEach(() => { cy.visit('/'); guidedTour.close(); cy.validateLogin(); cy.switchPerspective('Virtualization', 'Fleet virtualization'); guidedTour.closeKubevirtTour(); + troubleshootingPanelPage.signalCorrelationShouldNotBeVisible(); nav.sidenav.clickNavLink(['Observe', 'Metrics']); commonPages.titleShouldHaveText('Metrics'); cy.changeNamespace('All Projects'); diff --git a/web/cypress/e2e/coo/01.coo_bvt.cy.ts b/web/cypress/e2e/coo/01.coo_bvt.cy.ts deleted file mode 100644 index eba132f12..000000000 --- a/web/cypress/e2e/coo/01.coo_bvt.cy.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { troubleshootingPanelPage } from '../../views/troubleshooting-panel'; - -// Set constants for the operators that need to be installed for tests. -const MCP = { - namespace: Cypress.env('COO_NAMESPACE'), - packageName: 'cluster-observability-operator', - operatorName: 'Cluster Observability Operator', - config: { - kind: 'UIPlugin', - name: 'monitoring', - }, -}; - -const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', -}; - -describe('BVT: COO', { tags: ['@alerting', '@acm-alerting', '@coo'] }, () => { - before(() => { - cy.beforeBlockCOO(MCP, MP); - }); - - it('1. Admin perspective - Observe Menu', () => { - cy.log('Admin perspective - Observe Menu and verify all submenus'); - cy.reload(true); - cy.wait(10000); - nav.sidenav.clickNavLink(['Observe', 'Alerting']); - commonPages.titleShouldHaveText('Alerting'); - nav.tabs.switchTab('Silences'); - nav.tabs.switchTab('Alerting rules'); - nav.tabs.switchTab('Incidents'); - nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']); - commonPages.titleShouldHaveText('Dashboards'); - nav.sidenav.clickNavLink(['Observe', 'Alerting']); - troubleshootingPanelPage.openSignalCorrelation(); - troubleshootingPanelPage.troubleshootingPanelPageShouldBeLoadedEnabled(); - }); - - /** - * TODO: To be replaced by COO validation such as Dashboards (Perses) scenarios - */ -}); diff --git a/web/cypress/e2e/incidents/01.incidents.cy.ts b/web/cypress/e2e/incidents/incidents_bvt.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/01.incidents.cy.ts rename to web/cypress/e2e/incidents/incidents_bvt.cy.ts diff --git a/web/cypress/e2e/incidents/00.coo_incidents_e2e.cy.ts b/web/cypress/e2e/incidents/incidents_e2e.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/00.coo_incidents_e2e.cy.ts rename to web/cypress/e2e/incidents/incidents_e2e.cy.ts diff --git a/web/cypress/e2e/incidents/02.incidents-mocking-example.cy.ts b/web/cypress/e2e/incidents/incidents_mocking_example.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/02.incidents-mocking-example.cy.ts rename to web/cypress/e2e/incidents/incidents_mocking_example.cy.ts diff --git a/web/cypress/e2e/incidents/performance/01.performance_benchmark.cy.ts b/web/cypress/e2e/incidents/performance/performance_benchmark.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/performance/01.performance_benchmark.cy.ts rename to web/cypress/e2e/incidents/performance/performance_benchmark.cy.ts diff --git a/web/cypress/e2e/incidents/performance/02.performance_walkthrough.cy.ts b/web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts similarity index 98% rename from web/cypress/e2e/incidents/performance/02.performance_walkthrough.cy.ts rename to web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts index efc987fa1..3c23ef05a 100644 --- a/web/cypress/e2e/incidents/performance/02.performance_walkthrough.cy.ts +++ b/web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts @@ -2,7 +2,7 @@ Performance walkthrough: measures rendering cost of interactive operations (filter toggling, time range switching, table row expansion) under load. -Unlike 01.performance_benchmark which measures initial chart render time, +Unlike performance_benchmark which measures initial chart render time, this test measures incremental re-render cost during a realistic user session. Verifies: OBSINTA-1006 diff --git a/web/cypress/e2e/incidents/regression/03-04.reg_e2e_firing_alerts.cy.ts b/web/cypress/e2e/incidents/regression/end_and_resolution.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/03-04.reg_e2e_firing_alerts.cy.ts rename to web/cypress/e2e/incidents/regression/end_and_resolution.cy.ts diff --git a/web/cypress/e2e/incidents/regression/01.reg_filtering.cy.ts b/web/cypress/e2e/incidents/regression/filtering.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/01.reg_filtering.cy.ts rename to web/cypress/e2e/incidents/regression/filtering.cy.ts diff --git a/web/cypress/e2e/incidents/regression/02.reg_ui_tooltip_boundary_times.cy.ts b/web/cypress/e2e/incidents/regression/interval.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/02.reg_ui_tooltip_boundary_times.cy.ts rename to web/cypress/e2e/incidents/regression/interval.cy.ts diff --git a/web/cypress/e2e/incidents/regression/03.reg_api_calls.cy.ts b/web/cypress/e2e/incidents/regression/permission_and_silences.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/03.reg_api_calls.cy.ts rename to web/cypress/e2e/incidents/regression/permission_and_silences.cy.ts diff --git a/web/cypress/e2e/incidents/regression/05.reg_stress_testing_ui.cy.ts b/web/cypress/e2e/incidents/regression/stress_test_ui.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/05.reg_stress_testing_ui.cy.ts rename to web/cypress/e2e/incidents/regression/stress_test_ui.cy.ts diff --git a/web/cypress/e2e/incidents/regression/04.reg_redux_effects.cy.ts b/web/cypress/e2e/incidents/regression/ui_interaction.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/04.reg_redux_effects.cy.ts rename to web/cypress/e2e/incidents/regression/ui_interaction.cy.ts diff --git a/web/cypress/e2e/incidents/regression/02.reg_ui_charts_comprehensive.cy.ts b/web/cypress/e2e/incidents/regression/ui_regressions.cy.ts similarity index 100% rename from web/cypress/e2e/incidents/regression/02.reg_ui_charts_comprehensive.cy.ts rename to web/cypress/e2e/incidents/regression/ui_regressions.cy.ts diff --git a/web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts similarity index 83% rename from web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts rename to web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts index eac3d5a38..2eb3450be 100644 --- a/web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts +++ b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts @@ -1,7 +1,7 @@ -import { runAllRegressionLegacyDashboardsTests } from '../../../support/monitoring/03.reg_legacy_dashboards.cy'; -import { runAllRegressionLegacyDashboardsTestsNamespace } from '../../../support/monitoring/06.reg_legacy_dashboards_namespace.cy'; -import { commonPages } from '../../../views/common'; -import { nav } from '../../../views/nav'; +import { runAllRegressionLegacyDashboardsTests } from '../../support/monitoring/03.reg_legacy_dashboards.cy'; +import { runAllRegressionLegacyDashboardsTestsNamespace } from '../../support/monitoring/06.reg_legacy_dashboards_namespace.cy'; +import { commonPages } from '../../views/common'; +import { nav } from '../../views/nav'; const MP = { namespace: 'openshift-monitoring', @@ -39,7 +39,7 @@ describe( // Test suite for Administrator perspective describe( 'Regression: Monitoring - Legacy Dashboards Namespaced (Administrator)', - { tags: ['@legacy-dashboards'] }, + { tags: ['@legacy-dashboards', '@metrics'] }, () => { before(() => { cy.beforeBlock(MP); diff --git a/web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts similarity index 85% rename from web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts rename to web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts index 97dcb3705..cea866733 100644 --- a/web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts +++ b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts @@ -33,39 +33,17 @@ const KBV = { }; describe( - 'Installation: COO and setting up Monitoring Plugin', - { tags: ['@virtualization', '@slow', '@coo'] }, + 'Regression: Monitoring - Legacy Dashboards (Virtualization)', + { tags: ['@legacy-dashboards', '@slow', '@virtualization', '@coo'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP); - }); - - it('1. Installation: COO and setting up Monitoring Plugin', () => { cy.log('Installation: COO and setting up Monitoring Plugin'); - }); - }, -); - -describe( - 'IVT: Monitoring UIPlugin + Virtualization', - { tags: ['@virtualization', '@slow', '@coo'] }, - () => { - before(() => { cy.beforeBlockVirtualization(KBV); - }); - - it('1. Virtualization perspective - Observe Menu', () => { cy.log('Virtualization perspective - Observe Menu and verify all submenus'); cy.switchPerspective('Virtualization', 'Fleet virtualization'); guidedTour.closeKubevirtTour(); }); - }, -); - -describe( - 'Regression: Monitoring - Legacy Dashboards (Virtualization)', - { tags: ['@legacy-dashboards', '@slow', '@virtualization', '@coo'] }, - () => { beforeEach(() => { cy.visit('/'); cy.validateLogin(); diff --git a/web/cypress/e2e/metrics/metrics_regression.cy.ts b/web/cypress/e2e/metrics/metrics_regression.cy.ts new file mode 100644 index 000000000..512c53d64 --- /dev/null +++ b/web/cypress/e2e/metrics/metrics_regression.cy.ts @@ -0,0 +1,91 @@ +import { runAllRegressionMetricsTests2 } from '../../support/monitoring/02.reg_metrics_2.cy'; +import { runAllRegressionMetricsTests1 } from '../../support/monitoring/02.reg_metrics_1.cy'; +import { runAllRegressionMetricsTestsNamespace1 } from '../../support/monitoring/05.reg_metrics_namespace_1.cy'; +import { commonPages } from '../../views/common'; +import { nav } from '../../views/nav'; +import { runAllRegressionMetricsTestsNamespace2 } from '../../support/monitoring/05.reg_metrics_namespace_2.cy'; + +const MP = { + namespace: 'openshift-monitoring', + operatorName: 'Cluster Monitoring Operator', +}; + +// Test suite for Administrator perspective +describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { + before(() => { + cy.beforeBlock(MP); + }); + + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + }); + + // Run tests in Administrator perspective + runAllRegressionMetricsTests1({ + name: 'Administrator', + }); +}); + +// Test suite for Administrator perspective +describe( + 'Regression: Monitoring - Metrics Namespaced (Administrator)', + { tags: ['@metrics'] }, + () => { + before(() => { + cy.beforeBlock(MP); + }); + + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace(MP.namespace); + }); + + // Run tests in Administrator perspective + runAllRegressionMetricsTestsNamespace1({ + name: 'Administrator', + }); + }, +); + +// Test suite for Administrator perspective +describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { + before(() => { + cy.beforeBlock(MP); + }); + + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + }); + + // Run tests in Administrator perspective + runAllRegressionMetricsTests2({ + name: 'Administrator', + }); +}); + +// Test suite for Administrator perspective +describe( + 'Regression: Monitoring - Metrics Namespaced (Administrator)', + { tags: ['@metrics'] }, + () => { + before(() => { + cy.beforeBlock(MP); + }); + + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace(MP.namespace); + }); + + // Run tests in Administrator perspective + runAllRegressionMetricsTestsNamespace2({ + name: 'Administrator', + }); + }, +); diff --git a/web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts b/web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts similarity index 63% rename from web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts rename to web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts index 9c84c795c..c9e97f79d 100644 --- a/web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts +++ b/web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts @@ -1,9 +1,11 @@ +import { runAllRegressionMetricsTests2 } from '../../support/monitoring/02.reg_metrics_2.cy'; import { alerts } from '../../fixtures/monitoring/alert'; import { runAllRegressionMetricsTests1 } from '../../support/monitoring/02.reg_metrics_1.cy'; import { runAllRegressionMetricsTestsNamespace1 } from '../../support/monitoring/05.reg_metrics_namespace_1.cy'; import { commonPages } from '../../views/common'; import { nav } from '../../views/nav'; import { guidedTour } from '../../views/tour'; +import { runAllRegressionMetricsTestsNamespace2 } from '../../support/monitoring/05.reg_metrics_namespace_2.cy'; // Set constants for the operators that need to be installed for tests. const MCP = { @@ -34,39 +36,69 @@ const KBV = { }; describe( - 'Installation: COO and setting up Monitoring Plugin', - { tags: ['@virtualization', '@slow', '@coo'] }, + 'Regression: Monitoring - Metrics (Virtualization)', + { tags: ['@metrics', '@slow', '@virtualization', '@coo'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP); + cy.log('Installation: COO and setting up Monitoring Plugin'); + cy.beforeBlockVirtualization(KBV); + cy.log('Virtualization perspective - Observe Menu and verify all submenus'); + cy.switchPerspective('Virtualization'); + guidedTour.closeKubevirtTour(); + }); + beforeEach(() => { + cy.visit('/'); + cy.validateLogin(); + cy.switchPerspective('Virtualization'); + guidedTour.closeKubevirtTour(); + alerts.getWatchdogAlert(); + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + alerts.getWatchdogAlert(); }); - it('1. Installation: COO and setting up Monitoring Plugin', () => { - cy.log('Installation: COO and setting up Monitoring Plugin'); + runAllRegressionMetricsTests1({ + name: 'Virtualization', }); }, ); describe( - 'IVT: Monitoring UIPlugin + Virtualization', - { tags: ['@virtualization', '@slow', '@coo'] }, + 'Regression: Monitoring - Metrics Namespaced (Virtualization)', + { tags: ['@metrics', '@slow', '@virtualization', '@coo'] }, () => { - before(() => { - cy.beforeBlockVirtualization(KBV); + beforeEach(() => { + cy.visit('/'); + cy.validateLogin(); + cy.switchPerspective('Virtualization'); + guidedTour.closeKubevirtTour(); + alerts.getWatchdogAlert(); + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace(MP.namespace); + alerts.getWatchdogAlert(); }); - it('1. Virtualization perspective - Observe Menu', () => { - cy.log('Virtualization perspective - Observe Menu and verify all submenus'); - cy.switchPerspective('Virtualization', 'Fleet virtualization'); - guidedTour.closeKubevirtTour(); + runAllRegressionMetricsTestsNamespace1({ + name: 'Virtualization', }); }, ); describe( 'Regression: Monitoring - Metrics (Virtualization)', - { tags: ['@metrics', '@slow', '@virtualization', '@coo'] }, + { tags: ['@metrics', '@slow', '@virtualization'] }, () => { + before(() => { + cy.beforeBlockCOO(MCP, MP); + cy.log('Installation: COO and setting up Monitoring Plugin'); + cy.beforeBlockVirtualization(KBV); + cy.log('Virtualization perspective - Observe Menu and verify all submenus'); + cy.switchPerspective('Virtualization', 'Fleet virtualization'); + guidedTour.closeKubevirtTour(); + }); beforeEach(() => { cy.visit('/'); cy.validateLogin(); @@ -79,7 +111,7 @@ describe( alerts.getWatchdogAlert(); }); - runAllRegressionMetricsTests1({ + runAllRegressionMetricsTests2({ name: 'Virtualization', }); }, @@ -87,7 +119,7 @@ describe( describe( 'Regression: Monitoring - Metrics Namespaced (Virtualization)', - { tags: ['@metrics', '@slow', '@virtualization', '@coo'] }, + { tags: ['@metrics', '@slow', '@virtualization'] }, () => { beforeEach(() => { cy.visit('/'); @@ -101,7 +133,7 @@ describe( alerts.getWatchdogAlert(); }); - runAllRegressionMetricsTestsNamespace1({ + runAllRegressionMetricsTestsNamespace2({ name: 'Virtualization', }); }, diff --git a/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts b/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts deleted file mode 100644 index b24a4bfd3..000000000 --- a/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { alerts } from '../../../fixtures/monitoring/alert'; -import { runAllRegressionCorePlatformAlertsTests } from '../../../support/monitoring/01.reg_alerts.cy'; -import { commonPages } from '../../../views/common'; -import { nav } from '../../../views/nav'; - -const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', -}; - -// Test suite for Core platform perspective -describe( - 'Regression: Monitoring - Alerts (Core platform)', - { tags: ['@alerting', '@metrics'] }, - () => { - before(() => { - cy.beforeBlock(MP); - cy.switchPerspective('Core platform'); - }); - - beforeEach(() => { - alerts.getWatchdogAlert(); - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace('All Projects'); - nav.sidenav.clickNavLink(['Observe', 'Alerting']); - commonPages.titleShouldHaveText('Alerting'); - alerts.getWatchdogAlert(); - }); - - // Run tests in Core platform perspective - runAllRegressionCorePlatformAlertsTests({ - name: 'Core platform', - }); - }, -); diff --git a/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts b/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts deleted file mode 100644 index 80e031fdf..000000000 --- a/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { alerts } from '../../../fixtures/monitoring/alert'; -import { runAllRegressionAlertsTestsNamespace } from '../../../support/monitoring/04.reg_alerts_namespace.cy'; -import { commonPages } from '../../../views/common'; -import { nav } from '../../../views/nav'; - -const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', -}; - -describe( - 'Regression: Monitoring - Alerts Namespaced (Administrator)', - { tags: ['@alerting'] }, - () => { - before(() => { - cy.beforeBlock(MP); - }); - - beforeEach(() => { - alerts.getWatchdogAlert(); - nav.sidenav.clickNavLink(['Observe', 'Alerting']); - commonPages.titleShouldHaveText('Alerting'); - alerts.getWatchdogAlert(); - cy.changeNamespace(MP.namespace); - }); - - // Run tests in Administrator perspective - runAllRegressionAlertsTestsNamespace({ - name: 'Administrator', - }); - }, -); diff --git a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts b/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts deleted file mode 100644 index 09a4ef6f7..000000000 --- a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { runAllRegressionMetricsTests1 } from '../../../support/monitoring/02.reg_metrics_1.cy'; -import { runAllRegressionMetricsTestsNamespace1 } from '../../../support/monitoring/05.reg_metrics_namespace_1.cy'; -import { commonPages } from '../../../views/common'; -import { nav } from '../../../views/nav'; - -const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', -}; - -// Test suite for Administrator perspective -describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { - before(() => { - cy.beforeBlock(MP); - }); - - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace('All Projects'); - }); - - // Run tests in Administrator perspective - runAllRegressionMetricsTests1({ - name: 'Administrator', - }); -}); - -// Test suite for Administrator perspective -describe( - 'Regression: Monitoring - Metrics Namespaced (Administrator)', - { tags: ['@metrics'] }, - () => { - before(() => { - cy.beforeBlock(MP); - }); - - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace(MP.namespace); - }); - - // Run tests in Administrator perspective - runAllRegressionMetricsTestsNamespace1({ - name: 'Administrator', - }); - }, -); diff --git a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts b/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts deleted file mode 100644 index d5d7cfcdf..000000000 --- a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { runAllRegressionMetricsTests2 } from '../../../support/monitoring/02.reg_metrics_2.cy'; -import { runAllRegressionMetricsTestsNamespace2 } from '../../../support/monitoring/05.reg_metrics_namespace_2.cy'; -import { commonPages } from '../../../views/common'; -import { nav } from '../../../views/nav'; - -const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', -}; - -// Test suite for Administrator perspective -describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { - before(() => { - cy.beforeBlock(MP); - }); - - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace('All Projects'); - }); - - // Run tests in Administrator perspective - runAllRegressionMetricsTests2({ - name: 'Administrator', - }); -}); - -// Test suite for Administrator perspective -describe( - 'Regression: Monitoring - Metrics Namespaced (Administrator)', - { tags: ['@metrics'] }, - () => { - before(() => { - cy.beforeBlock(MP); - }); - - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace(MP.namespace); - }); - - // Run tests in Administrator perspective - runAllRegressionMetricsTestsNamespace2({ - name: 'Administrator', - }); - }, -); diff --git a/web/cypress/e2e/coo/03.coo_lightspeed_show_timeseries.cy.ts b/web/cypress/e2e/perses-dashboards/lightspeed_integration.cy.ts similarity index 100% rename from web/cypress/e2e/coo/03.coo_lightspeed_show_timeseries.cy.ts rename to web/cypress/e2e/perses-dashboards/lightspeed_integration.cy.ts diff --git a/web/cypress/e2e/perses/00.coo_bvt_perses_admin.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_bvt.cy.ts similarity index 100% rename from web/cypress/e2e/perses/00.coo_bvt_perses_admin.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_bvt.cy.ts diff --git a/web/cypress/e2e/perses/03.coo_create_perses_admin.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_create.cy.ts similarity index 100% rename from web/cypress/e2e/perses/03.coo_create_perses_admin.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_create.cy.ts diff --git a/web/cypress/e2e/perses/05.coo_tempo_loki_admin.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_datasources.cy.ts similarity index 100% rename from web/cypress/e2e/perses/05.coo_tempo_loki_admin.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_datasources.cy.ts diff --git a/web/cypress/e2e/perses/02.coo_edit_perses_admin.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_edit.cy.ts similarity index 100% rename from web/cypress/e2e/perses/02.coo_edit_perses_admin.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_edit.cy.ts diff --git a/web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_import.cy.ts similarity index 100% rename from web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_import.cy.ts diff --git a/web/cypress/e2e/perses/01.coo_list_perses_admin.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_list.cy.ts similarity index 100% rename from web/cypress/e2e/perses/01.coo_list_perses_admin.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_list.cy.ts diff --git a/web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts similarity index 72% rename from web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts rename to web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts index 92654ba0a..16c0172fd 100644 --- a/web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts @@ -1,3 +1,4 @@ +// Not finished import { nav } from '../../views/nav'; import { runBVTCOOPersesTests1 } from '../../support/perses/00.coo_bvt_perses_admin.cy'; import { guidedTour } from '../../views/tour'; @@ -33,36 +34,18 @@ const KBV = { }; describe( - 'Installation: COO and setting up Monitoring Plugin', - { tags: ['@virtualization', '@slow'] }, + 'IVT: COO - Dashboards (Perses) - Virtualization perspective', + { tags: ['@perses-dashboards', '@slow', '@virtualization', '@coo'] }, + () => { before(() => { cy.beforeBlockCOO(MCP, MP); - cy.cleanupPersesTestDashboardsBeforeTests(); - }); - - it('1. Installation: COO and setting up Monitoring Plugin', () => { cy.log('Installation: COO and setting up Monitoring Plugin'); + cy.beforeBlockVirtualization(KBV); + cy.log('Virtualization perspective - Observe Menu and verify all submenus'); + cy.switchPerspective('Virtualization', 'Fleet virtualization'); + guidedTour.closeKubevirtTour(); }); - }, -); - -describe('Installation: Virtualization', { tags: ['@virtualization', '@slow'] }, () => { - before(() => { - cy.beforeBlockVirtualization(KBV); - }); - - it('1. Installation: Virtualization', () => { - cy.log('Installation: Virtualization'); - cy.switchPerspective('Virtualization', 'Fleet virtualization'); - guidedTour.closeKubevirtTour(); - }); -}); - -describe( - 'IVT: COO - Dashboards (Perses) - Virtualization perspective', - { tags: ['@perses-dashboards', '@slow', '@virtualization', '@coo'] }, - () => { beforeEach(() => { cy.visit('/'); guidedTour.close(); diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts similarity index 93% rename from web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts rename to web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts index 927d1b542..26d81c771 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts @@ -1,5 +1,5 @@ -import { nav } from '../../views/nav'; -import { runCOORBACPersesTestsDevUser1 } from '../../support/perses/99.coo_rbac_perses_user1.cy'; +import { nav } from '../../../views/nav'; +import { runCOORBACPersesTestsDevUser1 } from '../../../support/perses/99.coo_rbac_perses_user1.cy'; // Set constants for the operators that need to be installed for tests. const MCP = { diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts similarity index 93% rename from web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts rename to web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts index 17db97ae2..dd56a12f1 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts @@ -1,6 +1,6 @@ -import { nav } from '../../views/nav'; -import { runCOORBACPersesTestsDevUser2 } from '../../support/perses/99.coo_rbac_perses_user2.cy'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../../views/nav'; +import { runCOORBACPersesTestsDevUser2 } from '../../../support/perses/99.coo_rbac_perses_user2.cy'; +import { operatorAuthUtils } from '../../../support/commands/auth-commands'; // Set constants for the operators that need to be installed for tests. // const MCP = { diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts similarity index 92% rename from web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts rename to web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts index 64363f45f..b099c2feb 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts @@ -1,6 +1,6 @@ -import { nav } from '../../views/nav'; -import { runCOORBACPersesTestsDevUser3 } from '../../support/perses/99.coo_rbac_perses_user3.cy'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../../views/nav'; +import { runCOORBACPersesTestsDevUser3 } from '../../../support/perses/99.coo_rbac_perses_user3.cy'; +import { operatorAuthUtils } from '../../../support/commands/auth-commands'; // Set constants for the operators that need to be installed for tests. // const MCP = { @@ -71,6 +71,7 @@ describe( beforeEach(() => { cy.switchPerspective('Core platform'); + // Why do we check Dashboards first? nav.sidenav.clickNavLink(['Observe', 'Dashboards']); cy.wait(2000); nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']); diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts similarity index 93% rename from web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts rename to web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts index a3c396802..d62d9df95 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts @@ -1,6 +1,6 @@ -import { nav } from '../../views/nav'; -import { runCOORBACPersesTestsDevUser4 } from '../../support/perses/99.coo_rbac_perses_user4.cy'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../../views/nav'; +import { runCOORBACPersesTestsDevUser4 } from '../../../support/perses/99.coo_rbac_perses_user4.cy'; +import { operatorAuthUtils } from '../../../support/commands/auth-commands'; // Set constants for the operators that need to be installed for tests. // const MCP = { diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts similarity index 93% rename from web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts rename to web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts index 46466d622..6f90e0002 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts @@ -1,6 +1,6 @@ -import { nav } from '../../views/nav'; -import { runCOORBACPersesTestsDevUser5 } from '../../support/perses/99.coo_rbac_perses_user5.cy'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../../views/nav'; +import { runCOORBACPersesTestsDevUser5 } from '../../../support/perses/99.coo_rbac_perses_user5.cy'; +import { operatorAuthUtils } from '../../../support/commands/auth-commands'; // Set constants for the operators that need to be installed for tests. // const MCP = { diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts similarity index 93% rename from web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts rename to web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts index fc79ca4d8..e3dd785f8 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts @@ -1,6 +1,6 @@ -import { nav } from '../../views/nav'; -import { runCOORBACPersesTestsDevUser6 } from '../../support/perses/99.coo_rbac_perses_user6.cy'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../../views/nav'; +import { runCOORBACPersesTestsDevUser6 } from '../../../support/perses/99.coo_rbac_perses_user6.cy'; +import { operatorAuthUtils } from '../../../support/commands/auth-commands'; // Set constants for the operators that need to be installed for tests. // const MCP = { diff --git a/web/cypress/e2e/monitoring/00.bvt_admin.cy.ts b/web/cypress/e2e/shared/admin_perspective_bvt.cy.ts similarity index 100% rename from web/cypress/e2e/monitoring/00.bvt_admin.cy.ts rename to web/cypress/e2e/shared/admin_perspective_bvt.cy.ts diff --git a/web/cypress/e2e/shared/coo_submenus.cy.ts b/web/cypress/e2e/shared/coo_submenus.cy.ts new file mode 100644 index 000000000..b41ab3c4c --- /dev/null +++ b/web/cypress/e2e/shared/coo_submenus.cy.ts @@ -0,0 +1,57 @@ +import { commonPages } from '../../views/common'; +import { nav } from '../../views/nav'; +import { troubleshootingPanelPage } from '../../views/troubleshooting-panel'; + +// Set constants for the operators that need to be installed for tests. +const MCP = { + namespace: Cypress.env('COO_NAMESPACE'), + packageName: 'cluster-observability-operator', + operatorName: 'Cluster Observability Operator', + config: { + kind: 'UIPlugin', + name: 'monitoring', + }, +}; + +const MP = { + namespace: 'openshift-monitoring', + operatorName: 'Cluster Monitoring Operator', +}; + +describe( + 'BVT: COO', + { + tags: [ + '@alerting', + '@cluster-health-analyzer', + '@perses-dashboards', + '@legacy-dashboards', + '@coo', + ], + }, + () => { + before(() => { + cy.beforeBlockCOO(MCP, MP); + }); + + it('1. Admin perspective - Observe Menu', () => { + cy.log('Admin perspective - Observe Menu and verify all submenus'); + cy.reload(true); + cy.wait(10000); + nav.sidenav.clickNavLink(['Observe', 'Alerting']); + commonPages.titleShouldHaveText('Alerting'); + nav.tabs.switchTab('Silences'); + nav.tabs.switchTab('Alerting rules'); + nav.tabs.switchTab('Incidents'); + nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']); + commonPages.titleShouldHaveText('Dashboards'); + nav.sidenav.clickNavLink(['Observe', 'Alerting']); + troubleshootingPanelPage.openSignalCorrelation(); + troubleshootingPanelPage.troubleshootingPanelPageShouldBeLoadedEnabled(); + }); + + /** + * TODO: To be replaced by COO validation such as Dashboards (Perses) scenarios + */ + }, +);