diff --git a/.cursor/commands/generate-regression-test.md b/.cursor/commands/generate-regression-test.md index 3462a99ed..dc36c2876 100644 --- a/.cursor/commands/generate-regression-test.md +++ b/.cursor/commands/generate-regression-test.md @@ -92,7 +92,7 @@ Generate automated regression tests from test documentation in [`docs/incident_d Verifies: OU-XXX */ -import { incidentsPage } from "../../../views/incidents-page"; +import { incidentsPage } from "../../../views/incidents/incidents-page"; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, @@ -532,7 +532,7 @@ Tests both incidents chart and alerts chart tooltip behavior. Verifies: OU-XXX */ -import { incidentsPage } from "../../../views/incidents-page"; +import { incidentsPage } from "../../../views/incidents/incidents-page"; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, diff --git a/.cursor/rules/incidents-testing-guidelines.mdc b/.cursor/rules/incidents-testing-guidelines.mdc index 8b564040c..878758783 100644 --- a/.cursor/rules/incidents-testing-guidelines.mdc +++ b/.cursor/rules/incidents-testing-guidelines.mdc @@ -3,7 +3,7 @@ alwaysApply: true description: "Development guidelines for Incidents page Cypress tests" globs: - "web/cypress/e2e/incidents/**/*.cy.ts" - - "web/cypress/views/incidents-page.ts" + - "web/cypress/views/incidents/incidents-page.ts" - "web/cypress/fixtures/incidents/scenarios/**/*.yaml" --- @@ -99,7 +99,7 @@ Additional context about the bug or behavior. Verifies: OU-XXX */ -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR } from "../../../support/operators"; describe('Regression:
', () => { @@ -296,7 +296,7 @@ cy.mockIncidents([]); ### Imports ```typescript // Always import from relative path -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; // Import types when needed import { IncidentDefinition } from '../../support/incidents'; diff --git a/docs/incident_detection/tests/performance/03.endurance_test_source.md b/docs/incident_detection/tests/performance/03.endurance_test_source.md index ec26c73fd..06eb99408 100644 --- a/docs/incident_detection/tests/performance/03.endurance_test_source.md +++ b/docs/incident_detection/tests/performance/03.endurance_test_source.md @@ -7,7 +7,7 @@ Shelved due to Cypress DOM snapshot accumulation causing ~10x degradation over 1 **To re-enable:** save the code block below as `web/cypress/e2e/incidents/performance/03.performance_endurance.cy.ts`. ```typescript -import { incidentsPage } from "../../../views/incidents-page"; +import { incidentsPage } from "../../../views/incidents/incidents-page"; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, diff --git a/web/cypress/e2e/alerts/alerts_acm.cy.ts b/web/cypress/e2e/alerts/alerts_acm.cy.ts index 2b822f656..d8ed46f7e 100644 --- a/web/cypress/e2e/alerts/alerts_acm.cy.ts +++ b/web/cypress/e2e/alerts/alerts_acm.cy.ts @@ -1,21 +1,20 @@ // E2E test for validating ACM Alerting UI integration with Cluster Observability Operator (COO) -import '../../support/commands/auth-commands'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { acmAlertingPage } from '../../views/acm-alerting-page'; - -import { troubleshootingPanelPage } from 'cypress/views/troubleshooting-panel'; -import { incidentsPage } from 'cypress/views/incidents-page'; +import '../../support/shared/commands/auth-commands'; +import { troubleshootingPanelPage } from '../../views/shared/troubleshooting-panel'; +import { incidentsPage } from '../../views/incidents/incidents-page'; +import { CustomerPerspectiveName } from '@/shared/constants/perspective'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { acmAlertingPage } from '../../views/alerts/acm-alerting-page'; import { testAlertsFleetManagementRegression, testAlertsRegression, -} from 'cypress/support/alerts/alerts_regressions.cy'; -import { listPage } from 'cypress/views/list-page'; +} from '../../support/alerts/alerts_regressions.cy'; +import { listPage } from '../../views/shared/list-page'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, -} from '../../support/operators'; -import { CustomerPerspectiveName } from '@/shared/constants/perspective'; +} from '../../support/shared/operators'; const expectedAlerts = ['Watchdog', 'Watchdog-spoke', 'ClusterCPUHealth-jb']; diff --git a/web/cypress/e2e/alerts/alerts_bvt.cy.ts b/web/cypress/e2e/alerts/alerts_bvt.cy.ts index c9e921e73..a5392e760 100644 --- a/web/cypress/e2e/alerts/alerts_bvt.cy.ts +++ b/web/cypress/e2e/alerts/alerts_bvt.cy.ts @@ -1,9 +1,9 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; +import { nav } from '../../views/shared/nav'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; import { testBVTMonitoringTestsNamespace } from '../../support/alerts/alerts_bvt_namespaced.cy'; -import { commonPages } from '../../views/common'; -import { CLUSTER_MONITORING_OPERATOR } from '../../support/operators'; +import { commonPages } from '../../views/shared/common'; +import { CLUSTER_MONITORING_OPERATOR } from '../../support/shared/operators'; describe('BVT: Monitoring - Namespaced', { tags: ['@alerting', '@metrics'] }, () => { before(() => { diff --git a/web/cypress/e2e/alerts/alerts_ivt.cy.ts b/web/cypress/e2e/alerts/alerts_ivt.cy.ts index 3fb014231..0be049b3a 100644 --- a/web/cypress/e2e/alerts/alerts_ivt.cy.ts +++ b/web/cypress/e2e/alerts/alerts_ivt.cy.ts @@ -2,12 +2,12 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, KUBEVIRT_HYPERCONVERGED_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; import { testAlertsRegression } from '../../support/alerts/alerts_regressions.cy'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { guidedTour } from '../../views/tour'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { guidedTour } from '../../views/shared/tour'; describe( 'Regression: Monitoring - Alerts (Virtualization)', diff --git a/web/cypress/e2e/alerts/alerts_regression.cy.ts b/web/cypress/e2e/alerts/alerts_regression.cy.ts index e7fcfb6fb..40e6a70fb 100644 --- a/web/cypress/e2e/alerts/alerts_regression.cy.ts +++ b/web/cypress/e2e/alerts/alerts_regression.cy.ts @@ -5,9 +5,9 @@ import { } from '../../support/alerts/alerts_regressions.cy'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; import { testAlertsRegressionNamespace } from '../../support/alerts/alerts_regressions_namespaced.cy'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { CLUSTER_MONITORING_OPERATOR } from '../../support/operators'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { CLUSTER_MONITORING_OPERATOR } from '../../support/shared/operators'; // Test suite for Core platform perspective describe( diff --git a/web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts b/web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts index 29e98f9bb..85a4b909e 100644 --- a/web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts +++ b/web/cypress/e2e/alerts/alerts_virtualization_bvt.cy.ts @@ -1,15 +1,15 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; import { testBVTAlerts } from '../../support/alerts/alerts_bvt.cy'; -import { guidedTour } from '../../views/tour'; +import { guidedTour } from '../../views/shared/tour'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; -import { nav } from '../../views/nav'; -import { commonPages } from '../../views/common'; -import { troubleshootingPanelPage } from 'cypress/views/troubleshooting-panel'; +import { nav } from '../../views/shared/nav'; +import { commonPages } from '../../views/shared/common'; +import { troubleshootingPanelPage } from 'cypress/views/shared/troubleshooting-panel'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, KUBEVIRT_HYPERCONVERGED_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; describe( 'IVT: Monitoring + Virtualization', diff --git a/web/cypress/e2e/incidents/incidents_bvt.cy.ts b/web/cypress/e2e/incidents/incidents_bvt.cy.ts index 7cd26c420..1515cd977 100644 --- a/web/cypress/e2e/incidents/incidents_bvt.cy.ts +++ b/web/cypress/e2e/incidents/incidents_bvt.cy.ts @@ -11,7 +11,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../support/shared/operators'; -import { incidentsPage } from '../../views/incidents-page'; +import { incidentsPage } from '../../views/incidents/incidents-page'; describe('BVT: Incidents - UI', { tags: ['@cluster-health-analyzer', '@coo'] }, () => { before(() => { diff --git a/web/cypress/e2e/incidents/incidents_e2e.cy.ts b/web/cypress/e2e/incidents/incidents_e2e.cy.ts index 407238cc5..3152b0131 100644 --- a/web/cypress/e2e/incidents/incidents_e2e.cy.ts +++ b/web/cypress/e2e/incidents/incidents_e2e.cy.ts @@ -6,7 +6,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../support/shared/operators'; -import { incidentsPage } from '../../views/incidents-page'; +import { incidentsPage } from '../../views/incidents/incidents-page'; describe('BVT: Incidents - e2e', { tags: ['@cluster-health-analyzer', '@coo', '@slow'] }, () => { let currentAlertName: string; diff --git a/web/cypress/e2e/incidents/incidents_mocking_example.cy.ts b/web/cypress/e2e/incidents/incidents_mocking_example.cy.ts index 32f881f47..30aeedb71 100644 --- a/web/cypress/e2e/incidents/incidents_mocking_example.cy.ts +++ b/web/cypress/e2e/incidents/incidents_mocking_example.cy.ts @@ -11,7 +11,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../support/shared/operators'; -import { incidentsPage } from '../../views/incidents-page'; +import { incidentsPage } from '../../views/incidents/incidents-page'; describe('Incidents - Mocking Examples', { tags: ['@cluster-health-analyzer', '@coo'] }, () => { before(() => { diff --git a/web/cypress/e2e/incidents/performance/performance_benchmark.cy.ts b/web/cypress/e2e/incidents/performance/performance_benchmark.cy.ts index 6f744c647..675ebd098 100644 --- a/web/cypress/e2e/incidents/performance/performance_benchmark.cy.ts +++ b/web/cypress/e2e/incidents/performance/performance_benchmark.cy.ts @@ -14,7 +14,7 @@ median observed time. Verifies: OBSINTA-1006 */ -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; import { BenchmarkCollector } from '../../../support/shared/commands/benchmark-utils'; import { CLUSTER_MONITORING_OPERATOR, diff --git a/web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts b/web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts index f30a855c1..acb310205 100644 --- a/web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts +++ b/web/cypress/e2e/incidents/performance/performance_walkthrough.cy.ts @@ -8,7 +8,7 @@ this test measures incremental re-render cost during a realistic user session. Verifies: OBSINTA-1006 */ -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; import { BenchmarkCollector } from '../../../support/shared/commands/benchmark-utils'; import { CLUSTER_MONITORING_OPERATOR, diff --git a/web/cypress/e2e/incidents/regression/end_and_resolution.cy.ts b/web/cypress/e2e/incidents/regression/end_and_resolution.cy.ts index 182382119..27a898351 100644 --- a/web/cypress/e2e/incidents/regression/end_and_resolution.cy.ts +++ b/web/cypress/e2e/incidents/regression/end_and_resolution.cy.ts @@ -21,7 +21,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; describe( 'Regression: Time-Based Alert Resolution (E2E with Firing Alerts)', diff --git a/web/cypress/e2e/incidents/regression/filtering.cy.ts b/web/cypress/e2e/incidents/regression/filtering.cy.ts index e767eddd0..6f0ae8589 100644 --- a/web/cypress/e2e/incidents/regression/filtering.cy.ts +++ b/web/cypress/e2e/incidents/regression/filtering.cy.ts @@ -12,7 +12,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; describe('Regression: Incidents Filtering', { tags: ['@cluster-health-analyzer', '@coo'] }, () => { before(() => { diff --git a/web/cypress/e2e/incidents/regression/interval.cy.ts b/web/cypress/e2e/incidents/regression/interval.cy.ts index 47fbcfb24..3a7cd191a 100644 --- a/web/cypress/e2e/incidents/regression/interval.cy.ts +++ b/web/cypress/e2e/incidents/regression/interval.cy.ts @@ -15,7 +15,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; describe( 'Regression: Mixed Severity Interval Boundary Times', diff --git a/web/cypress/e2e/incidents/regression/permission_and_silences.cy.ts b/web/cypress/e2e/incidents/regression/permission_and_silences.cy.ts index 56bf03119..0d534207e 100644 --- a/web/cypress/e2e/incidents/regression/permission_and_silences.cy.ts +++ b/web/cypress/e2e/incidents/regression/permission_and_silences.cy.ts @@ -17,8 +17,8 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; -import { nav } from '../../../views/nav'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; +import { nav } from '../../../views/shared/nav'; describe( 'Regression: Silences Not Applied Correctly', diff --git a/web/cypress/e2e/incidents/regression/stress_test_ui.cy.ts b/web/cypress/e2e/incidents/regression/stress_test_ui.cy.ts index 661a3ed6d..22e89711e 100644 --- a/web/cypress/e2e/incidents/regression/stress_test_ui.cy.ts +++ b/web/cypress/e2e/incidents/regression/stress_test_ui.cy.ts @@ -15,7 +15,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; const MAX_GAP_STANDARD = 250; const MAX_GAP_RELAXED = 500; diff --git a/web/cypress/e2e/incidents/regression/ui_interaction.cy.ts b/web/cypress/e2e/incidents/regression/ui_interaction.cy.ts index dc5d35725..6cc4f5d22 100644 --- a/web/cypress/e2e/incidents/regression/ui_interaction.cy.ts +++ b/web/cypress/e2e/incidents/regression/ui_interaction.cy.ts @@ -17,7 +17,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; describe( 'Regression: Redux State Management', diff --git a/web/cypress/e2e/incidents/regression/ui_regressions.cy.ts b/web/cypress/e2e/incidents/regression/ui_regressions.cy.ts index bafcc5453..ae71b64c7 100644 --- a/web/cypress/e2e/incidents/regression/ui_regressions.cy.ts +++ b/web/cypress/e2e/incidents/regression/ui_regressions.cy.ts @@ -14,7 +14,7 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../../support/shared/operators'; -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from '../../../views/incidents/incidents-page'; const ARROW_HEIGHT = 12; const ALLOWED_MARGIN = 8; diff --git a/web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts index e98e21be2..3753b4826 100644 --- a/web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts +++ b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_regression.cy.ts @@ -1,9 +1,9 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { CLUSTER_MONITORING_OPERATOR } from '../../support/operators'; +import { CLUSTER_MONITORING_OPERATOR } from '../../support/shared/operators'; import { testLegacyDashboardsRegression } from '../../support/legacy-dashboards/legacy_dashboards_regressions.cy'; import { testLegacyDashboardsRegressionNamespace } from '../../support/legacy-dashboards/legacy_dashboards_regressions_namespaced.cy'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; // Test suite for Administrator perspective describe( diff --git a/web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts index 85dff75f3..405e984f7 100644 --- a/web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts +++ b/web/cypress/e2e/legacy-dashboards/legacy_dashboards_virtualization_regression.cy.ts @@ -3,12 +3,12 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, KUBEVIRT_HYPERCONVERGED_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; import { testLegacyDashboardsRegression } from '../../support/legacy-dashboards/legacy_dashboards_regressions.cy'; import { testLegacyDashboardsRegressionNamespace } from '../../support/legacy-dashboards/legacy_dashboards_regressions_namespaced.cy'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { guidedTour } from '../../views/tour'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { guidedTour } from '../../views/shared/tour'; describe( 'Regression: Monitoring - Legacy Dashboards (Virtualization)', diff --git a/web/cypress/e2e/metrics/metrics_regression.cy.ts b/web/cypress/e2e/metrics/metrics_regression.cy.ts index a7cf730b2..66783be91 100644 --- a/web/cypress/e2e/metrics/metrics_regression.cy.ts +++ b/web/cypress/e2e/metrics/metrics_regression.cy.ts @@ -7,9 +7,9 @@ import { testMetricsRegressionNamespace1, testMetricsRegressionNamespace2, } from '../../support/metrics/metrics_regressions_namespaced.cy'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { CLUSTER_MONITORING_OPERATOR } from '../../support/operators'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { CLUSTER_MONITORING_OPERATOR } from '../../support/shared/operators'; // Test suite for Administrator perspective describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { diff --git a/web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts b/web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts index d3d36b3eb..3eb4fc28a 100644 --- a/web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts +++ b/web/cypress/e2e/metrics/metrics_virtualization_ivt.cy.ts @@ -8,9 +8,9 @@ import { testMetricsRegressionNamespace1, testMetricsRegressionNamespace2, } from '../../support/metrics/metrics_regressions_namespaced.cy'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { guidedTour } from '../../views/tour'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { guidedTour } from '../../views/shared/tour'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, diff --git a/web/cypress/e2e/perses-dashboards/lightspeed_integration.cy.ts b/web/cypress/e2e/perses-dashboards/lightspeed_integration.cy.ts index fe59004bb..6826a2210 100644 --- a/web/cypress/e2e/perses-dashboards/lightspeed_integration.cy.ts +++ b/web/cypress/e2e/perses-dashboards/lightspeed_integration.cy.ts @@ -1,9 +1,9 @@ -import { operatorAuthUtils } from '../../support/commands/auth-commands'; -import { nav } from '../../views/nav'; -import { commonPages } from '../../views/common'; -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesCreateDashboardsPage } from '../../views/perses-dashboards-create-dashboard'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; +import { operatorAuthUtils } from '../../support/shared/commands/auth-commands'; +import { nav } from '../../views/shared/nav'; +import { commonPages } from '../../views/shared/common'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-create-dashboard'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; import { persesMUIDataTestIDs } from '@/shared/constants/data-test'; const PROMPT = 'visualize CPU consumption in the openshift-monitoring namespace in last 2 hours'; diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_bvt.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_bvt.cy.ts index 6e3281d17..05ec5a8e6 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_bvt.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_bvt.cy.ts @@ -1,11 +1,11 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; +import { nav } from '../../views/shared/nav'; //TODO: rename after customizable-dashboards gets merged import { testBVTCOOPerses1 } from '../../support/perses/perses_bvt_admin.cy'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; describe( 'BVT: COO - Dashboards (Perses) - Core platform perspective', diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_create.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_create.cy.ts index f533bdf15..dade28b71 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_create.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_create.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../views/shared/nav'; +import { operatorAuthUtils } from '../../support/shared/commands/auth-commands'; import { testCOOCreatePerses } from '../../support/perses/perses_create_admin.cy'; describe( diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_datasources.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_datasources.cy.ts index be2d1764e..ecde46cda 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_datasources.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_datasources.cy.ts @@ -6,9 +6,9 @@ import { LOKI_OPERATOR, OPENTELEMETRY_OPERATOR, TEMPO_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; import { testCOOCreateImportPerses } from '../../support/perses/perses_create_import_admin.cy'; -import { nav } from '../../views/nav'; +import { nav } from '../../views/shared/nav'; describe( 'COO - Dashboards (Perses) - Perses Global Datasources with Tempo and Loki', diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_edit.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_edit.cy.ts index 48247e1ff..5dfd8e69d 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_edit.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_edit.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../views/shared/nav'; +import { operatorAuthUtils } from '../../support/shared/commands/auth-commands'; import { testCOOEditPerses } from '../../support/perses/perses_edit_admin.cy'; import { testCOOEditPerses1 } from '../../support/perses/perses_edit_admin_1.cy'; diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_import.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_import.cy.ts index 993bf6d9e..01730e21b 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_import.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_import.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; -import { operatorAuthUtils } from '../../support/commands/auth-commands'; +import { nav } from '../../views/shared/nav'; +import { operatorAuthUtils } from '../../support/shared/commands/auth-commands'; import { testCOOImportPerses } from '../../support/perses/perses_import_admin.cy'; describe( diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_list.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_list.cy.ts index 6e669a4a5..b9d0d1ea1 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_list.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_list.cy.ts @@ -1,5 +1,5 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; +import { nav } from '../../views/shared/nav'; import { testCOOListPerses, testCOOListPersesDuplicateDashboard, @@ -8,7 +8,7 @@ import { testCOOListPersesNamespace } from '../../support/perses/perses_list_adm import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; //TODO: change tag to @dashboards when customizable-dashboards gets merged describe( diff --git a/web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts b/web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts index b2899e9aa..797620cd8 100644 --- a/web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts +++ b/web/cypress/e2e/perses-dashboards/perses_dashboards_virtualization_ivt.cy.ts @@ -1,13 +1,13 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; +import { nav } from '../../views/shared/nav'; import { testBVTCOOPerses1 } from '../../support/perses/perses_bvt_admin.cy'; -import { guidedTour } from '../../views/tour'; -import { commonPages } from '../../views/common'; +import { guidedTour } from '../../views/shared/tour'; +import { commonPages } from '../../views/shared/common'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, KUBEVIRT_HYPERCONVERGED_OPERATOR, -} from '../../support/operators'; +} from '../../support/shared/operators'; describe( 'IVT: COO - Dashboards (Perses) - Virtualization perspective', diff --git a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts index 345177bea..7cf7fd6d0 100644 --- a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user1.cy.ts @@ -1,10 +1,10 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../../views/nav'; +import { nav } from '../../../views/shared/nav'; import { testCOORBACPersesTestsDevUser1 } from '../../../support/perses/rbac/perses_user1.cy'; import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, -} from '../../../support/operators'; +} from '../../../support/shared/operators'; describe( 'RBAC User1: COO - Dashboards (Perses) - Administrator perspective', diff --git a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts index c8820d4ce..3d44fbbc6 100644 --- a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user2.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../../views/nav'; -import { operatorAuthUtils } from '../../../support/commands/auth-commands'; +import { nav } from '../../../views/shared/nav'; +import { operatorAuthUtils } from '../../../support/shared/commands/auth-commands'; import { testCOORBACPersesTestsDevUser2 } from '../../../support/perses/rbac/perses_user2.cy'; describe( diff --git a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts index a42a6be54..f7fc07bdc 100644 --- a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user3.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../../views/nav'; -import { operatorAuthUtils } from '../../../support/commands/auth-commands'; +import { nav } from '../../../views/shared/nav'; +import { operatorAuthUtils } from '../../../support/shared/commands/auth-commands'; import { testCOORBACPersesTestsDevUser3 } from '../../../support/perses/rbac/perses_user3.cy'; describe( diff --git a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts index 9c9d7043c..0b2a5a8ec 100644 --- a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user4.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../../views/nav'; -import { operatorAuthUtils } from '../../../support/commands/auth-commands'; +import { nav } from '../../../views/shared/nav'; +import { operatorAuthUtils } from '../../../support/shared/commands/auth-commands'; import { testCOORBACPersesTestsDevUser4 } from '../../../support/perses/rbac/perses_user4.cy'; describe( diff --git a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts index a360a5b86..5d38f1398 100644 --- a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user5.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../../views/nav'; -import { operatorAuthUtils } from '../../../support/commands/auth-commands'; +import { nav } from '../../../views/shared/nav'; +import { operatorAuthUtils } from '../../../support/shared/commands/auth-commands'; import { testCOORBACPersesTestsDevUser5 } from '../../../support/perses/rbac/perses_user5.cy'; describe( diff --git a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts index 0f09052f4..fe2164709 100644 --- a/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts +++ b/web/cypress/e2e/perses-dashboards/rbac/perses_dashboards_user6.cy.ts @@ -1,6 +1,6 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../../views/nav'; -import { operatorAuthUtils } from '../../../support/commands/auth-commands'; +import { nav } from '../../../views/shared/nav'; +import { operatorAuthUtils } from '../../../support/shared/commands/auth-commands'; import { testCOORBACPersesTestsDevUser6 } from '../../../support/perses/rbac/perses_user6.cy'; describe( diff --git a/web/cypress/e2e/shared/admin_perspective_bvt.cy.ts b/web/cypress/e2e/shared/admin_perspective_bvt.cy.ts index 2d133e93c..4dc5f28ce 100644 --- a/web/cypress/e2e/shared/admin_perspective_bvt.cy.ts +++ b/web/cypress/e2e/shared/admin_perspective_bvt.cy.ts @@ -1,10 +1,10 @@ import { CustomerPerspectiveName } from '@/shared/constants/perspective'; -import { nav } from '../../views/nav'; +import { nav } from '../../views/shared/nav'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; import { testBVTAlerts } from '../../support/alerts/alerts_bvt.cy'; -import { commonPages } from '../../views/common'; -import { overviewPage } from '../../views/overview-page'; -import { CLUSTER_MONITORING_OPERATOR } from '../../support/operators'; +import { commonPages } from '../../views/shared/common'; +import { overviewPage } from '../../views/shared/overview-page'; +import { CLUSTER_MONITORING_OPERATOR } from '../../support/shared/operators'; describe( 'BVT: Monitoring', diff --git a/web/cypress/e2e/shared/coo_submenus.cy.ts b/web/cypress/e2e/shared/coo_submenus.cy.ts index f075b1e75..426a3e2d2 100644 --- a/web/cypress/e2e/shared/coo_submenus.cy.ts +++ b/web/cypress/e2e/shared/coo_submenus.cy.ts @@ -2,9 +2,9 @@ import { CLUSTER_MONITORING_OPERATOR, CLUSTER_OBSERVABILITY_OPERATOR, } from '../../support/shared/operators'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; -import { troubleshootingPanelPage } from '../../views/troubleshooting-panel'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; +import { troubleshootingPanelPage } from '../../views/shared/troubleshooting-panel'; describe( 'BVT: COO', diff --git a/web/cypress/support/alerts/alerts_bvt.cy.ts b/web/cypress/support/alerts/alerts_bvt.cy.ts index b746e4e19..685179699 100644 --- a/web/cypress/support/alerts/alerts_bvt.cy.ts +++ b/web/cypress/support/alerts/alerts_bvt.cy.ts @@ -1,19 +1,19 @@ -import { commonPages } from '../../views/common'; -import { detailsPage } from '../../views/details-page'; -import { listPage } from '../../views/list-page'; -import { silenceAlertPage } from '../../views/silence-alert-page'; -import { nav } from '../../views/nav'; -import { silenceDetailsPage } from '../../views/silence-details-page'; -import { silencesListPage } from '../../views/silences-list-page'; -import { getValFromElement } from '../../views/utils'; +import { commonPages } from '../../views/shared/common'; +import { alertAndSilencesDetailsPage } from '../../views/alerts/alert-and-silence-details-page'; +import { alertsListPage } from '../../views/alerts/alerts-list-page'; +import { silenceAlertPage } from '../../views/alerts/silence-alert-page'; +import { nav } from '../../views/shared/nav'; +import { silenceDetailsPage } from '../../views/alerts/silence-details-page'; +import { silencesListPage } from '../../views/alerts/silences-list-page'; +import { getValFromElement } from '../../views/shared/utils'; import { AlertsAlertState, SilenceComment, SilenceState, WatchdogAlert, } from '../../fixtures/shared/cluster-monitoring-operator/constants'; -import { alertingRuleListPage } from '../../views/alerting-rule-list-page'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { alertingRuleListPage } from '../../views/alerts/alerting-rule-list-page'; export function testBVTAlerts(perspectiveName: CustomerPerspective) { it( @@ -22,29 +22,29 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { () => { cy.log('5.1. use sidebar nav to go to Observe > Alerting'); commonPages.titleShouldHaveText('Alerting'); - listPage.tabShouldHaveText('Alerts'); - listPage.tabShouldHaveText('Silences'); - listPage.tabShouldHaveText('Alerting rules'); + alertsListPage.tabShouldHaveText('Alerts'); + alertsListPage.tabShouldHaveText('Silences'); + alertsListPage.tabShouldHaveText('Alerting rules'); commonPages.linkShouldExist('Export as CSV'); commonPages.linkShouldExist('Clear all filters'); - listPage.ARRows.shouldBeLoaded(); + alertsListPage.ARRows.shouldBeLoaded(); cy.log('5.2. filter Alerts and click on Alert'); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); - listPage.ARRows.ARShouldBe( + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.ARShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, 1, 'Firing', ); - listPage.ARRows.expandRow(); - listPage.ARRows.AShouldBe( + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.AShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, `${WatchdogAlert.NAMESPACE}`, ); - listPage.ARRows.clickAlert(); + alertsListPage.ARRows.clickAlert(); cy.log('5.3. click on Alert Details Page'); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); @@ -60,7 +60,7 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { }); cy.log('5.4. click on Alert Rule link'); - detailsPage.clickAlertRule(`${WatchdogAlert.ALERTNAME}`); + alertAndSilencesDetailsPage.clickAlertRule(`${WatchdogAlert.ALERTNAME}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); commonPages.detailsPage.alertRule(); commonPages.detailsPage.common(`${WatchdogAlert.ALERTNAME}`); @@ -72,13 +72,13 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { }); cy.log('5.5. click on Alert Details Page'); - detailsPage.clickAlertDesc(`${WatchdogAlert.ALERT_DESC}`); + alertAndSilencesDetailsPage.clickAlertDesc(`${WatchdogAlert.ALERT_DESC}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); commonPages.detailsPage.common(`${WatchdogAlert.ALERTNAME}`); commonPages.detailsPage.alert(`${WatchdogAlert.ALERTNAME}`); cy.log('5.6. click on Inspect on Alert Details Page'); - detailsPage.clickInspectAlertPage(); + alertAndSilencesDetailsPage.clickInspectAlertPage(); cy.log('5.7. Metrics page is loaded'); commonPages.titleShouldHaveText('Metrics'); @@ -95,13 +95,13 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { it(`${perspectiveName} perspective - Creates and expires a Silence`, () => { cy.log('6.1 filter to Watchdog alert'); nav.tabs.switchTab('Alerts'); - listPage.ARRows.shouldBeLoaded(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.shouldBeLoaded(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); cy.log('6.2 silence alert'); - listPage.ARRows.expandRow(); - listPage.ARRows.silenceAlert(); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.silenceAlert(); cy.log('6.3 silence alert page'); commonPages.titleShouldHaveText('Silence alert'); @@ -157,23 +157,23 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { cy.log('6.5 Click on Firing alerts'); silenceDetailsPage.clickOnFiringAlerts(`${WatchdogAlert.ALERTNAME}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); - detailsPage.sectionHeaderShouldExist('Alert details'); - detailsPage.labelShouldExist('alertname=Watchdog'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Alert details'); + alertAndSilencesDetailsPage.labelShouldExist('alertname=Watchdog'); cy.log('6.6 Click on Silenced by'); - detailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); + alertAndSilencesDetailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); - detailsPage.sectionHeaderShouldExist('Silence details'); - detailsPage.labelShouldExist('alertname=Watchdog'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Silence details'); + alertAndSilencesDetailsPage.labelShouldExist('alertname=Watchdog'); cy.log('6.7 shows the silenced Alert in the Silenced Alerts list'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Silences'); silencesListPage.shouldBeLoaded(); - listPage.filter.removeIndividualTag(SilenceState.ACTIVE); - listPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.ACTIVE); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); silencesListPage.rows.shouldBe(`${WatchdogAlert.ALERTNAME}`, SilenceState.ACTIVE); cy.log('6.8 verify on Alerting Rules list page again'); @@ -189,10 +189,10 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { cy.log('6.9 verify on Alerts list page again'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); - listPage.filter.clearAllFilters(); - listPage.filter.selectFilterOption('Alert State', AlertsAlertState.SILENCED); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.ARShouldBe( + alertsListPage.filter.clearAllFilters(); + alertsListPage.filter.selectFilterOption('Alert State', AlertsAlertState.SILENCED); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.ARShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, 1, @@ -200,16 +200,16 @@ export function testBVTAlerts(perspectiveName: CustomerPerspective) { ); cy.log('6.10 expires the Silence'); - listPage.ARRows.expandRow(); - listPage.ARRows.clickAlert(); - detailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.clickAlert(); + alertAndSilencesDetailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); silenceDetailsPage.expireSilence(true, true); cy.log('6.11 verify on Alerts list page again'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); - listPage.filter.clearAllFilters(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.ARShouldBe( + alertsListPage.filter.clearAllFilters(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.ARShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, 1, diff --git a/web/cypress/support/alerts/alerts_bvt_namespaced.cy.ts b/web/cypress/support/alerts/alerts_bvt_namespaced.cy.ts index 50b90ca04..780b425ba 100644 --- a/web/cypress/support/alerts/alerts_bvt_namespaced.cy.ts +++ b/web/cypress/support/alerts/alerts_bvt_namespaced.cy.ts @@ -1,19 +1,19 @@ -import { commonPages } from '../../views/common'; -import { detailsPage } from '../../views/details-page'; -import { listPage } from '../../views/list-page'; -import { silenceAlertPage } from '../../views/silence-alert-page'; -import { nav } from '../../views/nav'; -import { silenceDetailsPage } from '../../views/silence-details-page'; -import { silencesListPage } from '../../views/silences-list-page'; -import { getValFromElement } from '../../views/utils'; +import { commonPages } from '../../views/shared/common'; +import { alertAndSilencesDetailsPage } from '../../views/alerts/alert-and-silence-details-page'; +import { alertsListPage } from '../../views/alerts/alerts-list-page'; +import { silenceAlertPage } from '../../views/alerts/silence-alert-page'; +import { nav } from '../../views/shared/nav'; +import { silenceDetailsPage } from '../../views/alerts/silence-details-page'; +import { silencesListPage } from '../../views/alerts/silences-list-page'; +import { getValFromElement } from '../../views/shared/utils'; import { AlertsAlertState, SilenceComment, SilenceState, WatchdogAlert, } from '../../fixtures/shared/cluster-monitoring-operator/constants'; -import { alertingRuleListPage } from '../../views/alerting-rule-list-page'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { alertingRuleListPage } from '../../views/alerts/alerting-rule-list-page'; export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspective) { it( @@ -22,29 +22,29 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec () => { cy.log('4.1. use sidebar nav to go to Observe > Alerting'); commonPages.titleShouldHaveText('Alerting'); - listPage.tabShouldHaveText('Alerts'); - listPage.tabShouldHaveText('Silences'); - listPage.tabShouldHaveText('Alerting rules'); + alertsListPage.tabShouldHaveText('Alerts'); + alertsListPage.tabShouldHaveText('Silences'); + alertsListPage.tabShouldHaveText('Alerting rules'); commonPages.linkShouldExist('Export as CSV'); commonPages.linkShouldExist('Clear all filters'); - listPage.ARRows.shouldBeLoaded(); + alertsListPage.ARRows.shouldBeLoaded(); cy.log('4.2. filter Alerts and click on Alert'); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); - listPage.ARRows.ARShouldBe( + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.ARShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, 1, 'Firing', ); - listPage.ARRows.expandRow(); - listPage.ARRows.AShouldBe( + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.AShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, `${WatchdogAlert.NAMESPACE}`, ); - listPage.ARRows.clickAlert(); + alertsListPage.ARRows.clickAlert(); cy.log('4.3. click on Alert Details Page'); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); @@ -60,7 +60,7 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec }); cy.log('4.4. click on Alert Rule link'); - detailsPage.clickAlertRule(`${WatchdogAlert.ALERTNAME}`); + alertAndSilencesDetailsPage.clickAlertRule(`${WatchdogAlert.ALERTNAME}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); commonPages.detailsPage.alertRule(); commonPages.detailsPage.common(`${WatchdogAlert.ALERTNAME}`); @@ -72,13 +72,13 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec }); cy.log('4.5. click on Alert Details Page'); - detailsPage.clickAlertDesc(`${WatchdogAlert.ALERT_DESC}`); + alertAndSilencesDetailsPage.clickAlertDesc(`${WatchdogAlert.ALERT_DESC}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); commonPages.detailsPage.common(`${WatchdogAlert.ALERTNAME}`); commonPages.detailsPage.alert(`${WatchdogAlert.ALERTNAME}`); cy.log('4.6. click on Inspect on Alert Details Page'); - detailsPage.clickInspectAlertPage(); + alertAndSilencesDetailsPage.clickInspectAlertPage(); cy.log('4.7. Metrics page is loaded'); commonPages.titleShouldHaveText('Metrics'); @@ -95,13 +95,13 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec it(`${perspectiveName} perspective - Creates and expires a Silence`, () => { cy.log('5.1 filter to Watchdog alert'); nav.tabs.switchTab('Alerts'); - listPage.ARRows.shouldBeLoaded(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.shouldBeLoaded(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); cy.log('5.2 silence alert'); - listPage.ARRows.expandRow(); - listPage.ARRows.silenceAlert(); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.silenceAlert(); cy.log('5.3 silence alert page'); commonPages.titleShouldHaveText('Silence alert'); @@ -158,23 +158,23 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec silenceDetailsPage.clickOnFiringAlerts(`${WatchdogAlert.ALERTNAME}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); commonPages.projectDropdownShouldNotExist(); - detailsPage.sectionHeaderShouldExist('Alert details'); - detailsPage.labelShouldExist('alertname=Watchdog'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Alert details'); + alertAndSilencesDetailsPage.labelShouldExist('alertname=Watchdog'); cy.log('5.6 Click on Silenced by'); - detailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); + alertAndSilencesDetailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); - detailsPage.sectionHeaderShouldExist('Silence details'); - detailsPage.labelShouldExist('alertname=Watchdog'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Silence details'); + alertAndSilencesDetailsPage.labelShouldExist('alertname=Watchdog'); cy.log('5.7 shows the silenced Alert in the Silenced Alerts list'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Silences'); silencesListPage.shouldBeLoaded(); - listPage.filter.removeIndividualTag(SilenceState.ACTIVE); - listPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.ACTIVE); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); silencesListPage.rows.shouldBe(`${WatchdogAlert.ALERTNAME}`, SilenceState.ACTIVE); cy.log('5.8 verify on Alerting Rules list page again'); @@ -190,10 +190,10 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec cy.log('5.9 verify on Alerts list page again'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); - listPage.filter.clearAllFilters(); - listPage.filter.selectFilterOption('Alert State', AlertsAlertState.SILENCED); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.ARShouldBe( + alertsListPage.filter.clearAllFilters(); + alertsListPage.filter.selectFilterOption('Alert State', AlertsAlertState.SILENCED); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.ARShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, 1, @@ -201,16 +201,16 @@ export function testBVTMonitoringTestsNamespace(perspectiveName: CustomerPerspec ); cy.log('5.10 expires the Silence'); - listPage.ARRows.expandRow(); - listPage.ARRows.clickAlert(); - detailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.clickAlert(); + alertAndSilencesDetailsPage.clickOnSilencedBy(`${WatchdogAlert.ALERTNAME}`); silenceDetailsPage.expireSilence(true, true); cy.log('5.11 verify on Alerts list page again'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); - listPage.filter.clearAllFilters(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.ARShouldBe( + alertsListPage.filter.clearAllFilters(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.ARShouldBe( `${WatchdogAlert.ALERTNAME}`, `${WatchdogAlert.SEVERITY}`, 1, diff --git a/web/cypress/support/alerts/alerts_regressions.cy.ts b/web/cypress/support/alerts/alerts_regressions.cy.ts index 25160e89c..2e9e0e6d5 100644 --- a/web/cypress/support/alerts/alerts_regressions.cy.ts +++ b/web/cypress/support/alerts/alerts_regressions.cy.ts @@ -1,12 +1,12 @@ -import { commonPages } from '../../views/common'; -import { detailsPage } from '../../views/details-page'; -import { listPage } from '../../views/list-page'; -import { silenceAlertPage } from '../../views/silence-alert-page'; -import { nav } from '../../views/nav'; -import { silenceDetailsPage } from '../../views/silence-details-page'; -import { silencesListPage } from '../../views/silences-list-page'; -import { alertingRuleListPage } from '../../views/alerting-rule-list-page'; -import { alertingRuleDetailsPage } from '../../views/alerting-rule-details-page'; +import { commonPages } from '../../views/shared/common'; +import { detailsPage } from '../../views/shared/details-page'; +import { alertsListPage } from '../../views/alerts/alerts-list-page'; +import { silenceAlertPage } from '../../views/alerts/silence-alert-page'; +import { nav } from '../../views/shared/nav'; +import { silenceDetailsPage } from '../../views/alerts/silence-details-page'; +import { silencesListPage } from '../../views/alerts/silences-list-page'; +import { alertingRuleListPage } from '../../views/alerts/alerting-rule-list-page'; +import { alertingRuleDetailsPage } from '../../views/alerts/alerting-rule-details-page'; import { AlertingRulesAlertState, Cluster, @@ -19,6 +19,7 @@ import { } from '../../fixtures/shared/cluster-monitoring-operator/constants'; import { FilterOUIAIDs } from '@/shared/constants/data-test'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { listPage } from 'cypress/views/shared/list-page'; export function testAlertsFleetManagementRegression( perspectiveName: CustomerPerspective, @@ -359,7 +360,7 @@ export function testAlertsRegression( nav.tabs.switchTab('Alerting rules'); listPage.filter.byName(`${alertName}`, FilterOUIAIDs.RuleNameFilter); alertingRuleListPage.countShouldBe(1); - listPage.filter.clearAllFilters(); + alertsListPage.filter.clearAllFilters(); cy.log('5.2 Search by Label'); listPage.filter.byLabel(`namespace=${alertNamespace}`); diff --git a/web/cypress/support/alerts/alerts_regressions_namespaced.cy.ts b/web/cypress/support/alerts/alerts_regressions_namespaced.cy.ts index 97b0f76f1..d6e55a146 100644 --- a/web/cypress/support/alerts/alerts_regressions_namespaced.cy.ts +++ b/web/cypress/support/alerts/alerts_regressions_namespaced.cy.ts @@ -1,12 +1,12 @@ -import { commonPages } from '../../views/common'; -import { detailsPage } from '../../views/details-page'; -import { listPage } from '../../views/list-page'; -import { silenceAlertPage } from '../../views/silence-alert-page'; -import { nav } from '../../views/nav'; -import { silenceDetailsPage } from '../../views/silence-details-page'; -import { silencesListPage } from '../../views/silences-list-page'; -import { alertingRuleListPage } from '../../views/alerting-rule-list-page'; -import { alertingRuleDetailsPage } from '../../views/alerting-rule-details-page'; +import { commonPages } from '../../views/shared/common'; +import { alertAndSilencesDetailsPage } from '../../views/alerts/alert-and-silence-details-page'; +import { alertsListPage } from '../../views/alerts/alerts-list-page'; +import { silenceAlertPage } from '../../views/alerts/silence-alert-page'; +import { nav } from '../../views/shared/nav'; +import { silenceDetailsPage } from '../../views/alerts/silence-details-page'; +import { silencesListPage } from '../../views/alerts/silences-list-page'; +import { alertingRuleListPage } from '../../views/alerts/alerting-rule-list-page'; +import { alertingRuleDetailsPage } from '../../views/alerts/alerting-rule-details-page'; import { AlertingRulesAlertState, MainTagState, @@ -22,28 +22,28 @@ import type { CustomerPerspective } from '@/shared/constants/perspective'; export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspective) { it(`${perspectiveName} perspective - Alerting > Alerts page - Filtering`, () => { cy.log('1.1 Header components'); - listPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.PENDING); + alertsListPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.PENDING); // Verify Source filter does not exist in namespace view cy.byOUIAID('DataViewFilters').find('.pf-v6-c-menu-toggle').first().click(); cy.get('.pf-v6-c-menu__item').should('not.contain', 'Source'); cy.byOUIAID('DataViewFilters').find('.pf-v6-c-menu-toggle').first().click(); - listPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.SILENCED); - listPage.filter.selectFilterOption('Severity', Severity.CRITICAL); - listPage.filter.selectFilterOption('Severity', Severity.WARNING); - listPage.filter.selectFilterOption('Severity', Severity.INFO); - listPage.filter.selectFilterOption('Severity', Severity.NONE); - - listPage.filter.removeIndividualTag(AlertingRulesAlertState.FIRING); - listPage.filter.removeIndividualTag(AlertingRulesAlertState.PENDING); - listPage.filter.removeIndividualTag(AlertingRulesAlertState.SILENCED); - listPage.filter.clearAllFilters(); - - listPage.exportAsCSV(true, /openshift.csv/); - - listPage.filter.byLabel('alertname=' + `${WatchdogAlert.ALERTNAME}`); - listPage.filter.removeIndividualTag('alertname=' + `${WatchdogAlert.ALERTNAME}`); - listPage.filter.byLabel('alertname=' + `${WatchdogAlert.ALERTNAME}`); - listPage.filter.removeIndividualTag('alertname=' + `${WatchdogAlert.ALERTNAME}`); + alertsListPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.SILENCED); + alertsListPage.filter.selectFilterOption('Severity', Severity.CRITICAL); + alertsListPage.filter.selectFilterOption('Severity', Severity.WARNING); + alertsListPage.filter.selectFilterOption('Severity', Severity.INFO); + alertsListPage.filter.selectFilterOption('Severity', Severity.NONE); + + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.FIRING); + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.PENDING); + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.SILENCED); + alertsListPage.filter.clearAllFilters(); + + alertsListPage.exportAsCSV(true, /openshift.csv/); + + alertsListPage.filter.byLabel('alertname=' + `${WatchdogAlert.ALERTNAME}`); + alertsListPage.filter.removeIndividualTag('alertname=' + `${WatchdogAlert.ALERTNAME}`); + alertsListPage.filter.byLabel('alertname=' + `${WatchdogAlert.ALERTNAME}`); + alertsListPage.filter.removeIndividualTag('alertname=' + `${WatchdogAlert.ALERTNAME}`); }); it(`${perspectiveName} perspective - Alerting > Silences page > Create silence`, () => { @@ -75,12 +75,12 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti cy.log('3.1 use sidebar nav to go to Observe > Alerting'); cy.log('3.2 filter to Watchdog alert'); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); cy.log('3.3 silence alert'); - listPage.ARRows.expandRow(); - listPage.ARRows.silenceAlert(); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.silenceAlert(); silenceAlertPage.addComment(SilenceComment.SILENCE_COMMENT); silenceAlertPage.clickSubmit(); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); @@ -88,22 +88,22 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti cy.log('3.4 Assert Kebab on Alert Details page'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); commonPages.titleShouldHaveText('Alerting'); - listPage.filter.clearAllFilters(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.expandRow(); - listPage.ARRows.assertNoKebab(); - listPage.ARRows.clickAlert(); + alertsListPage.filter.clearAllFilters(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.assertNoKebab(); + alertsListPage.ARRows.clickAlert(); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); - detailsPage.assertSilencedAlert(); + alertAndSilencesDetailsPage.assertSilencedAlert(); cy.log('3.5 Assert Kebab on Silence List page for Silenced alert'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Silences'); silencesListPage.shouldBeLoaded(); - listPage.filter.removeIndividualTag(SilenceState.ACTIVE); - listPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.ACTIVE); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); silencesListPage.rows.assertSilencedAlertKebab(); cy.log('3.6 Click on Silenced alert and Assert Actions button'); @@ -121,11 +121,11 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti cy.log('3.8 Assert Kebab on Silence List page for Expired alert'); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); silencesListPage.emptyState(); - listPage.filter.removeIndividualTag(SilenceState.ACTIVE); - listPage.filter.removeIndividualTag(SilenceState.PENDING); - listPage.filter.selectFilterOption('Silence State', SilenceState.EXPIRED); - listPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); - listPage.filter.selectFilterOption('Silence State', SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.ACTIVE); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.EXPIRED); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.PENDING); silencesListPage.rows.assertExpiredAlertKebab('0'); cy.log('3.9 Click on Expired alert and Assert Actions button'); @@ -168,7 +168,7 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Silences'); silencesListPage.shouldBeLoaded(); - listPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); silencesListPage.rows.editSilence(); commonPages.titleShouldHaveText('Edit silence'); @@ -205,26 +205,26 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Silences'); silencesListPage.shouldBeLoaded(); - listPage.filter.removeIndividualTag(SilenceState.ACTIVE); - listPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.ACTIVE); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); silencesListPage.rows.expireSilence(true); cy.log('3.13 Alert Details > Silence alert button > Cancel'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); - listPage.ARRows.expandRow(); - listPage.ARRows.clickAlert(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.expandRow(); + alertsListPage.ARRows.clickAlert(); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); - detailsPage.clickSilenceAlertButton(); + alertAndSilencesDetailsPage.clickSilenceAlertButton(); silenceAlertPage.addComment(SilenceComment.SILENCE_COMMENT); silenceAlertPage.clickCancelButton(); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); nav.sidenav.clickNavLink(['Observe', 'Alerting']); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); }, ); @@ -235,51 +235,51 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti listPage.filter.removeIndividualTag(Source.PLATFORM); cy.log('4.2 clear all filters, verify filters and tags'); - listPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.FIRING); - listPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.PENDING); - listPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.SILENCED); - listPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.NOT_FIRING); - listPage.filter.selectFilterOption('Severity', Severity.CRITICAL); - listPage.filter.selectFilterOption('Severity', Severity.WARNING); - listPage.filter.selectFilterOption('Severity', Severity.INFO); - listPage.filter.selectFilterOption('Severity', Severity.NONE); - listPage.filter.selectFilterOption('Source', Source.PLATFORM); - listPage.filter.selectFilterOption('Source', Source.USER); - - listPage.filter.clickOn1more(MainTagState.ALERT_STATE); - listPage.filter.clickOn1more(MainTagState.SEVERITY); - - listPage.filter.clickOnShowLess(MainTagState.ALERT_STATE); - listPage.filter.clickOnShowLess(MainTagState.SEVERITY); - - listPage.filter.clickOn1more(MainTagState.ALERT_STATE); - listPage.filter.clickOn1more(MainTagState.SEVERITY); - - listPage.filter.removeIndividualTag(AlertingRulesAlertState.FIRING); - listPage.filter.removeIndividualTag(AlertingRulesAlertState.PENDING); - listPage.filter.removeIndividualTag(AlertingRulesAlertState.SILENCED); - listPage.filter.removeIndividualTag(AlertingRulesAlertState.NOT_FIRING); - - listPage.filter.removeIndividualTag(Severity.CRITICAL); - listPage.filter.removeIndividualTag(Severity.WARNING); - listPage.filter.removeIndividualTag(Severity.INFO); - listPage.filter.removeIndividualTag(Severity.NONE); - listPage.filter.removeIndividualTag(Source.PLATFORM); - listPage.filter.removeIndividualTag(Source.USER); + alertsListPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.FIRING); + alertsListPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.PENDING); + alertsListPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.SILENCED); + alertsListPage.filter.selectFilterOption('Alert State', AlertingRulesAlertState.NOT_FIRING); + alertsListPage.filter.selectFilterOption('Severity', Severity.CRITICAL); + alertsListPage.filter.selectFilterOption('Severity', Severity.WARNING); + alertsListPage.filter.selectFilterOption('Severity', Severity.INFO); + alertsListPage.filter.selectFilterOption('Severity', Severity.NONE); + alertsListPage.filter.selectFilterOption('Source', Source.PLATFORM); + alertsListPage.filter.selectFilterOption('Source', Source.USER); + + alertsListPage.filter.clickOn1more(MainTagState.ALERT_STATE); + alertsListPage.filter.clickOn1more(MainTagState.SEVERITY); + + alertsListPage.filter.clickOnShowLess(MainTagState.ALERT_STATE); + alertsListPage.filter.clickOnShowLess(MainTagState.SEVERITY); + + alertsListPage.filter.clickOn1more(MainTagState.ALERT_STATE); + alertsListPage.filter.clickOn1more(MainTagState.SEVERITY); + + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.FIRING); + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.PENDING); + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.SILENCED); + alertsListPage.filter.removeIndividualTag(AlertingRulesAlertState.NOT_FIRING); + + alertsListPage.filter.removeIndividualTag(Severity.CRITICAL); + alertsListPage.filter.removeIndividualTag(Severity.WARNING); + alertsListPage.filter.removeIndividualTag(Severity.INFO); + alertsListPage.filter.removeIndividualTag(Severity.NONE); + alertsListPage.filter.removeIndividualTag(Source.PLATFORM); + alertsListPage.filter.removeIndividualTag(Source.USER); alertingRuleListPage.filter.assertNoClearAllFilters(); cy.log('4.3 Search by Name'); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`, FilterOUIAIDs.RuleNameFilter); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`, FilterOUIAIDs.RuleNameFilter); alertingRuleListPage.countShouldBe(1); - listPage.filter.clearAllFilters(); + alertsListPage.filter.clearAllFilters(); cy.log('4.4 Search by Label'); - listPage.filter.byLabel(`namespace=${WatchdogAlert.NAMESPACE}`); - listPage.filter.clearAllFilters(); + alertsListPage.filter.byLabel(`namespace=${WatchdogAlert.NAMESPACE}`); + alertsListPage.filter.clearAllFilters(); cy.log('4.5 Search by Name and see details'); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`, FilterOUIAIDs.RuleNameFilter); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`, FilterOUIAIDs.RuleNameFilter); alertingRuleListPage.countShouldBe(1); alertingRuleListPage.clickAlertingRule(`${WatchdogAlert.ALERTNAME}`); alertingRuleDetailsPage.assertAlertingRuleDetailsPage(`${WatchdogAlert.ALERTNAME}`); @@ -293,8 +293,8 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti cy.log('4.7 Alerting rule details > Assert Kebab'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Alerting rules'); - listPage.filter.clearAllFilters(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`, FilterOUIAIDs.RuleNameFilter); + alertsListPage.filter.clearAllFilters(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`, FilterOUIAIDs.RuleNameFilter); alertingRuleListPage.clickAlertingRule(`${WatchdogAlert.ALERTNAME}`); alertingRuleDetailsPage.assertNoKebab(); @@ -302,17 +302,17 @@ export function testAlertsRegressionNamespace(perspectiveName: CustomerPerspecti nav.sidenav.clickNavLink(['Observe', 'Alerting']); nav.tabs.switchTab('Silences'); silencesListPage.shouldBeLoaded(); - listPage.filter.removeIndividualTag(SilenceState.ACTIVE); - listPage.filter.removeIndividualTag(SilenceState.PENDING); + alertsListPage.filter.removeIndividualTag(SilenceState.ACTIVE); + alertsListPage.filter.removeIndividualTag(SilenceState.PENDING); silencesListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); + alertsListPage.filter.selectFilterOption('Silence State', SilenceState.ACTIVE); silencesListPage.rows.expireSilence(true); }); it(`${perspectiveName} perspective - Alerting > Empty state`, () => { cy.log('5.1 Empty state'); cy.changeNamespace('default'); - listPage.emptyState(); + alertsListPage.emptyState(); nav.tabs.switchTab('Silences'); silencesListPage.firstTimeEmptyState(); }); diff --git a/web/cypress/support/incidents/prometheus-mocks.ts b/web/cypress/support/incidents/prometheus-mocks.ts index eb9872db6..c2c69debf 100644 --- a/web/cypress/support/incidents/prometheus-mocks.ts +++ b/web/cypress/support/incidents/prometheus-mocks.ts @@ -1,7 +1,7 @@ import { IncidentDefinition, IncidentScenarioFixture, PrometheusResponse } from './types'; import { createAlertDetailsMock, createIncidentMock } from './mock-generators'; import { convertFixtureToIncidents, parseYamlFixture } from './schema/fixture-converter'; -import { incidentsPage } from '../../views/incidents-page'; +import { incidentsPage } from '../../views/incidents/incidents-page'; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace diff --git a/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions.cy.ts b/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions.cy.ts index 487ce706e..de3619224 100644 --- a/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions.cy.ts +++ b/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions.cy.ts @@ -1,17 +1,17 @@ -import { nav } from '../../views/nav'; -import { legacyDashboardsPage } from '../../views/legacy-dashboards'; +import { nav } from '../../views/shared/nav'; +import { legacyDashboardsPage } from '../../views/legacy-dashboards/legacy-dashboards'; import { LegacyDashboardsDashboardDropdown, MetricsPageQueryInput, WatchdogAlert, } from '../../fixtures/shared/cluster-monitoring-operator/constants'; import { Classes, DataTestIDs, LegacyDashboardPageTestIDs } from '@/shared/constants/data-test'; -import { metricsPage } from '../../views/metrics'; -import { alertingRuleDetailsPage } from '../../views/alerting-rule-details-page'; +import { metricsPage } from '../../views/metrics/metrics'; +import { alertingRuleDetailsPage } from '../../views/alerts/alerting-rule-details-page'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; -import { listPage } from '../../views/list-page'; -import { commonPages } from '../../views/common'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { alertsListPage } from '../../views/alerts/alerts-list-page'; +import { commonPages } from '../../views/shared/common'; export function testLegacyDashboardsRegression(perspectiveName: CustomerPerspective) { it(`${perspectiveName} perspective - Dashboards (legacy)`, () => { @@ -95,9 +95,9 @@ export function testLegacyDashboardsRegression(perspectiveName: CustomerPerspect nav.sidenav.clickNavLink(['Observe', 'Alerting']); commonPages.titleShouldHaveText('Alerting'); alerts.interceptWatchdogAlert(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); - listPage.ARRows.clickAlertingRule(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.clickAlertingRule(); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); alertingRuleDetailsPage.clickHideGraphButton(); cy.byTestID(DataTestIDs.MetricGraph).should('not.exist'); diff --git a/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions_namespaced.cy.ts b/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions_namespaced.cy.ts index 6c961b076..aeebbfdfd 100644 --- a/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions_namespaced.cy.ts +++ b/web/cypress/support/legacy-dashboards/legacy_dashboards_regressions_namespaced.cy.ts @@ -1,17 +1,17 @@ -import { nav } from '../../views/nav'; -import { legacyDashboardsPage } from '../../views/legacy-dashboards'; +import { nav } from '../../views/shared/nav'; +import { legacyDashboardsPage } from '../../views/legacy-dashboards/legacy-dashboards'; import { LegacyDashboardsDashboardDropdownNamespace, MetricsPageQueryInputByNamespace, WatchdogAlert, } from '../../fixtures/shared/cluster-monitoring-operator/constants'; import { Classes, DataTestIDs, LegacyDashboardPageTestIDs } from '@/shared/constants/data-test'; -import { metricsPage } from '../../views/metrics'; -import { alertingRuleDetailsPage } from '../../views/alerting-rule-details-page'; +import { metricsPage } from '../../views/metrics/metrics'; +import { alertingRuleDetailsPage } from '../../views/alerts/alerting-rule-details-page'; import { alerts } from '../../fixtures/alerts/interceptWatchdogAlert'; -import { listPage } from '../../views/list-page'; -import { commonPages } from '../../views/common'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { alertsListPage } from '../../views/alerts/alerts-list-page'; +import { commonPages } from '../../views/shared/common'; export function testLegacyDashboardsRegressionNamespace(perspectiveName: CustomerPerspective) { it(`${perspectiveName} perspective - Dashboards (legacy)`, () => { @@ -94,9 +94,9 @@ export function testLegacyDashboardsRegressionNamespace(perspectiveName: Custome cy.log('4.3 Observe > Alerting rule details - Verify graph is visible'); nav.sidenav.clickNavLink(['Observe', 'Alerting']); alerts.interceptWatchdogAlert(); - listPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); - listPage.ARRows.countShouldBe(1); - listPage.ARRows.clickAlertingRule(); + alertsListPage.filter.byName(`${WatchdogAlert.ALERTNAME}`); + alertsListPage.ARRows.countShouldBe(1); + alertsListPage.ARRows.clickAlertingRule(); commonPages.titleShouldHaveText(`${WatchdogAlert.ALERTNAME}`); alertingRuleDetailsPage.clickHideGraphButton(); cy.byTestID(DataTestIDs.MetricGraph).should('not.exist'); diff --git a/web/cypress/support/metrics/metrics_regressions.cy.ts b/web/cypress/support/metrics/metrics_regressions.cy.ts index 3ed14a4e3..766fda83d 100644 --- a/web/cypress/support/metrics/metrics_regressions.cy.ts +++ b/web/cypress/support/metrics/metrics_regressions.cy.ts @@ -1,4 +1,4 @@ -import { metricsPage } from '../../views/metrics'; +import { metricsPage } from '../../views/metrics/metrics'; import { Classes, DataTestIDs } from '@/shared/constants/data-test'; import { GraphTimespan, diff --git a/web/cypress/support/metrics/metrics_regressions_namespaced.cy.ts b/web/cypress/support/metrics/metrics_regressions_namespaced.cy.ts index 87ecb14ef..e88f24741 100644 --- a/web/cypress/support/metrics/metrics_regressions_namespaced.cy.ts +++ b/web/cypress/support/metrics/metrics_regressions_namespaced.cy.ts @@ -1,4 +1,4 @@ -import { metricsPage } from '../../views/metrics'; +import { metricsPage } from '../../views/metrics/metrics'; import { Classes, DataTestIDs } from '@/shared/constants/data-test'; import { GraphTimespan, diff --git a/web/cypress/support/perses/commands/perses-commands.ts b/web/cypress/support/perses/commands/perses-commands.ts index 7ed1914fd..135597be8 100644 --- a/web/cypress/support/perses/commands/perses-commands.ts +++ b/web/cypress/support/perses/commands/perses-commands.ts @@ -1,7 +1,7 @@ export {}; -import { nav } from '../../../views/nav'; -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; +import { nav } from '../../../views/shared/nav'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; import { listPersesDashboardsOUIAIDs } from '@/shared/constants/data-test'; import { PERSES_E2E_DASHBOARDS_DIR, diff --git a/web/cypress/support/perses/perses_bvt_admin.cy.ts b/web/cypress/support/perses/perses_bvt_admin.cy.ts index 4aec35fbc..4f2b7f050 100644 --- a/web/cypress/support/perses/perses_bvt_admin.cy.ts +++ b/web/cypress/support/perses/perses_bvt_admin.cy.ts @@ -4,19 +4,19 @@ import { persesDashboardsDashboardDropdownPersesDev, persesDashboardsEmptyDashboard, } from '../../fixtures/perses/constants'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; import { persesMUIDataTestIDs } from '@/shared/constants/data-test'; -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPanelGroup } from '../../views/perses-dashboards-panelgroup'; -import { persesDashboardsPanel } from '../../views/perses-dashboards-panel'; -import { persesDashboardsEditVariables } from '../../views/perses-dashboards-edit-variables'; -import { persesCreateDashboardsPage } from '../../views/perses-dashboards-create-dashboard'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPanelGroup } from '../../views/perses-dashboards/perses-dashboards-panelgroup'; +import { persesDashboardsPanel } from '../../views/perses-dashboards/perses-dashboards-panel'; +import { persesDashboardsEditVariables } from '../../views/perses-dashboards/perses-dashboards-edit-variables'; +import { persesCreateDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-create-dashboard'; import { persesDashboardsAddListVariableSource } from '../../fixtures/perses/constants'; import { persesDashboardSampleQueries } from '../../fixtures/perses/constants'; import { persesDashboardsAddListPanelType } from '../../fixtures/perses/constants'; -import { commonPages } from '../../views/common'; -import { nav } from '../../views/nav'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { commonPages } from '../../views/shared/common'; +import { nav } from '../../views/shared/nav'; export function testBVTCOOPerses1( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/perses_create_admin.cy.ts b/web/cypress/support/perses/perses_create_admin.cy.ts index a2e945726..732d2f69c 100644 --- a/web/cypress/support/perses/perses_create_admin.cy.ts +++ b/web/cypress/support/perses/perses_create_admin.cy.ts @@ -1,14 +1,14 @@ -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; import { persesDashboardsAddListPanelType, persesDashboardSampleQueries, persesDashboardsEmptyDashboard, } from '../../fixtures/perses/constants'; -import { persesCreateDashboardsPage } from '../../views/perses-dashboards-create-dashboard'; -import { persesDashboardsPanelGroup } from '../../views/perses-dashboards-panelgroup'; -import { persesDashboardsPanel } from '../../views/perses-dashboards-panel'; -import { persesDashboardsEditVariables } from '../../views/perses-dashboards-edit-variables'; +import { persesCreateDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-create-dashboard'; +import { persesDashboardsPanelGroup } from '../../views/perses-dashboards/perses-dashboards-panelgroup'; +import { persesDashboardsPanel } from '../../views/perses-dashboards/perses-dashboards-panel'; +import { persesDashboardsEditVariables } from '../../views/perses-dashboards/perses-dashboards-edit-variables'; import { persesDashboardsAddListVariableSource } from '../../fixtures/perses/constants'; import type { CustomerPerspective } from '@/shared/constants/perspective'; diff --git a/web/cypress/support/perses/perses_create_import_admin.cy.ts b/web/cypress/support/perses/perses_create_import_admin.cy.ts index 3dbd2b37f..f0f1bf86e 100644 --- a/web/cypress/support/perses/perses_create_import_admin.cy.ts +++ b/web/cypress/support/perses/perses_create_import_admin.cy.ts @@ -1,11 +1,11 @@ -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; import { persesDashboardsAddListPanelType } from '../../fixtures/perses/constants'; -import { persesCreateDashboardsPage } from '../../views/perses-dashboards-create-dashboard'; -import { persesDashboardsPanelGroup } from '../../views/perses-dashboards-panelgroup'; -import { persesDashboardsPanel } from '../../views/perses-dashboards-panel'; -import { persesImportDashboardsPage } from '../../views/perses-dashboards-import-dashboard'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { persesCreateDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-create-dashboard'; +import { persesDashboardsPanelGroup } from '../../views/perses-dashboards/perses-dashboards-panelgroup'; +import { persesDashboardsPanel } from '../../views/perses-dashboards/perses-dashboards-panel'; +import { persesImportDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-import-dashboard'; export function testCOOCreateImportPerses( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/perses_edit_admin.cy.ts b/web/cypress/support/perses/perses_edit_admin.cy.ts index 8f99906cb..3be4f5810 100644 --- a/web/cypress/support/perses/perses_edit_admin.cy.ts +++ b/web/cypress/support/perses/perses_edit_admin.cy.ts @@ -7,12 +7,12 @@ import { persesDashboardsDashboardDropdownCOO, persesDashboardsDashboardDropdownPersesDev, } from '../../fixtures/perses/constants'; -import { commonPages } from '../../views/common'; -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; -import { persesDashboardsPanelGroup } from '../../views/perses-dashboards-panelgroup'; -import { persesDashboardsEditVariables } from '../../views/perses-dashboards-edit-variables'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { commonPages } from '../../views/shared/common'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; +import { persesDashboardsPanelGroup } from '../../views/perses-dashboards/perses-dashboards-panelgroup'; +import { persesDashboardsEditVariables } from '../../views/perses-dashboards/perses-dashboards-edit-variables'; export function testCOOEditPerses( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/perses_edit_admin_1.cy.ts b/web/cypress/support/perses/perses_edit_admin_1.cy.ts index 33d721d84..c14110563 100644 --- a/web/cypress/support/perses/perses_edit_admin_1.cy.ts +++ b/web/cypress/support/perses/perses_edit_admin_1.cy.ts @@ -3,13 +3,13 @@ import { persesDashboardsDashboardDropdownCOO, persesDashboardsDashboardDropdownPersesDev, } from '../../fixtures/perses/constants'; -import { commonPages } from '../../views/common'; -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; -import { persesDashboardsEditVariables } from '../../views/perses-dashboards-edit-variables'; -import { persesDashboardsPanel } from '../../views/perses-dashboards-panel'; -import { persesDashboardsPanelGroup } from '../../views/perses-dashboards-panelgroup'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { commonPages } from '../../views/shared/common'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; +import { persesDashboardsEditVariables } from '../../views/perses-dashboards/perses-dashboards-edit-variables'; +import { persesDashboardsPanel } from '../../views/perses-dashboards/perses-dashboards-panel'; +import { persesDashboardsPanelGroup } from '../../views/perses-dashboards/perses-dashboards-panelgroup'; export function testCOOEditPerses1( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/perses_import_admin.cy.ts b/web/cypress/support/perses/perses_import_admin.cy.ts index 7e61a2de6..7eddc6488 100644 --- a/web/cypress/support/perses/perses_import_admin.cy.ts +++ b/web/cypress/support/perses/perses_import_admin.cy.ts @@ -1,8 +1,8 @@ -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; -import { persesImportDashboardsPage } from '../../views/perses-dashboards-import-dashboard'; -import { nav } from '../../views/nav'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; +import { persesImportDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-import-dashboard'; +import { nav } from '../../views/shared/nav'; export function testCOOImportPerses( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/perses_list_admin.cy.ts b/web/cypress/support/perses/perses_list_admin.cy.ts index 8acd32d91..c853b5ad2 100644 --- a/web/cypress/support/perses/perses_list_admin.cy.ts +++ b/web/cypress/support/perses/perses_list_admin.cy.ts @@ -2,11 +2,11 @@ import { persesDashboardsDashboardDropdownCOO, persesDashboardsDashboardDropdownPersesDev, } from '../../fixtures/perses/constants'; -import { commonPages } from '../../views/common'; -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; -import { nav } from '../../views/nav'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { commonPages } from '../../views/shared/common'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; +import { nav } from '../../views/shared/nav'; export function testCOOListPerses( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/perses_list_admin_namespace.cy.ts b/web/cypress/support/perses/perses_list_admin_namespace.cy.ts index 727131208..0b8ec8ef1 100644 --- a/web/cypress/support/perses/perses_list_admin_namespace.cy.ts +++ b/web/cypress/support/perses/perses_list_admin_namespace.cy.ts @@ -2,11 +2,11 @@ import { persesDashboardsDashboardDropdownCOO, persesDashboardsDashboardDropdownPersesDev, } from '../../fixtures/perses/constants'; -import { commonPages } from '../../views/common'; -import { listPersesDashboardsPage } from '../../views/perses-dashboards-list-dashboards'; -import { persesDashboardsPage } from '../../views/perses-dashboards'; -import { nav } from '../../views/nav'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { commonPages } from '../../views/shared/common'; +import { listPersesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesDashboardsPage } from '../../views/perses-dashboards/perses-dashboards'; +import { nav } from '../../views/shared/nav'; export function testCOOListPersesNamespace( perspectiveName: CustomerPerspective, diff --git a/web/cypress/support/perses/rbac/perses_user1.cy.ts b/web/cypress/support/perses/rbac/perses_user1.cy.ts index b38cb9989..b71051341 100644 --- a/web/cypress/support/perses/rbac/perses_user1.cy.ts +++ b/web/cypress/support/perses/rbac/perses_user1.cy.ts @@ -1,6 +1,6 @@ -import { persesDashboardsPage } from '../../../views/perses-dashboards'; -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; -import { persesCreateDashboardsPage } from '../../../views/perses-dashboards-create-dashboard'; +import { persesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-create-dashboard'; import { persesDashboardsAddListVariableSource, persesDashboardSampleQueries, @@ -8,14 +8,14 @@ import { persesDashboardsDashboardDropdownPersesDev, persesDashboardsEmptyDashboard, } from '../../../fixtures/perses/constants'; -import { persesDashboardsEditVariables } from '../../../views/perses-dashboards-edit-variables'; -import { persesDashboardsPanelGroup } from '../../../views/perses-dashboards-panelgroup'; +import { persesDashboardsEditVariables } from '../../../views/perses-dashboards/perses-dashboards-edit-variables'; +import { persesDashboardsPanelGroup } from '../../../views/perses-dashboards/perses-dashboards-panelgroup'; import { persesAriaLabels } from '@/shared/constants/data-test'; -import { persesDashboardsPanel } from '../../../views/perses-dashboards-panel'; +import { persesDashboardsPanel } from '../../../views/perses-dashboards/perses-dashboards-panel'; import { persesDashboardsAddListPanelType } from '../../../fixtures/perses/constants'; -import { persesImportDashboardsPage } from '../../../views/perses-dashboards-import-dashboard'; -import { nav } from '../../../views/nav'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { persesImportDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-import-dashboard'; +import { nav } from '../../../views/shared/nav'; /** * User1 has access to: diff --git a/web/cypress/support/perses/rbac/perses_user2.cy.ts b/web/cypress/support/perses/rbac/perses_user2.cy.ts index 963e9ff53..4c1e63b35 100644 --- a/web/cypress/support/perses/rbac/perses_user2.cy.ts +++ b/web/cypress/support/perses/rbac/perses_user2.cy.ts @@ -1,7 +1,7 @@ -import { persesDashboardsPage } from '../../../views/perses-dashboards'; -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; -import { persesCreateDashboardsPage } from '../../../views/perses-dashboards-create-dashboard'; -import { persesImportDashboardsPage } from '../../../views/perses-dashboards-import-dashboard'; +import { persesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-create-dashboard'; +import { persesImportDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-import-dashboard'; import { persesDashboardsDashboardDropdownCOO, persesDashboardsDashboardDropdownPersesDev, diff --git a/web/cypress/support/perses/rbac/perses_user3.cy.ts b/web/cypress/support/perses/rbac/perses_user3.cy.ts index e8e5bb3b2..6467ae85a 100644 --- a/web/cypress/support/perses/rbac/perses_user3.cy.ts +++ b/web/cypress/support/perses/rbac/perses_user3.cy.ts @@ -1,18 +1,18 @@ -import { persesDashboardsPage } from '../../../views/perses-dashboards'; -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; -import { persesCreateDashboardsPage } from '../../../views/perses-dashboards-create-dashboard'; +import { persesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-create-dashboard'; import { persesDashboardsAddListVariableSource, persesDashboardSampleQueries, persesDashboardsEmptyDashboard, persesDashboardsTimeRange, } from '../../../fixtures/perses/constants'; -import { persesDashboardsEditVariables } from '../../../views/perses-dashboards-edit-variables'; -import { persesDashboardsPanelGroup } from '../../../views/perses-dashboards-panelgroup'; -import { persesDashboardsPanel } from '../../../views/perses-dashboards-panel'; +import { persesDashboardsEditVariables } from '../../../views/perses-dashboards/perses-dashboards-edit-variables'; +import { persesDashboardsPanelGroup } from '../../../views/perses-dashboards/perses-dashboards-panelgroup'; +import { persesDashboardsPanel } from '../../../views/perses-dashboards/perses-dashboards-panel'; import { persesDashboardsAddListPanelType } from '../../../fixtures/perses/constants'; -import { persesImportDashboardsPage } from '../../../views/perses-dashboards-import-dashboard'; -import { nav } from '../../../views/nav'; +import { persesImportDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-import-dashboard'; +import { nav } from '../../../views/shared/nav'; import { persesAriaLabels } from '@/shared/constants/data-test'; import type { CustomerPerspective } from '@/shared/constants/perspective'; diff --git a/web/cypress/support/perses/rbac/perses_user4.cy.ts b/web/cypress/support/perses/rbac/perses_user4.cy.ts index f0c169f98..35f449030 100644 --- a/web/cypress/support/perses/rbac/perses_user4.cy.ts +++ b/web/cypress/support/perses/rbac/perses_user4.cy.ts @@ -1,7 +1,7 @@ -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; import type { CustomerPerspective } from '@/shared/constants/perspective'; -import { persesCreateDashboardsPage } from '../../views/perses-dashboards-create-dashboard'; -import { persesImportDashboardsPage } from '../../views/perses-dashboards-import-dashboard'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-create-dashboard'; +import { persesImportDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-import-dashboard'; /** * User4 has access to: diff --git a/web/cypress/support/perses/rbac/perses_user5.cy.ts b/web/cypress/support/perses/rbac/perses_user5.cy.ts index 31fc5bd34..1b0b9aefb 100644 --- a/web/cypress/support/perses/rbac/perses_user5.cy.ts +++ b/web/cypress/support/perses/rbac/perses_user5.cy.ts @@ -1,18 +1,18 @@ -import { persesDashboardsPage } from '../../../views/perses-dashboards'; -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; -import { persesCreateDashboardsPage } from '../../../views/perses-dashboards-create-dashboard'; +import { persesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-create-dashboard'; import { persesDashboardsAddListVariableSource, persesDashboardSampleQueries, persesDashboardsEmptyDashboard, } from '../../../fixtures/perses/constants'; -import { persesDashboardsEditVariables } from '../../../views/perses-dashboards-edit-variables'; -import { persesDashboardsPanelGroup } from '../../../views/perses-dashboards-panelgroup'; -import { persesDashboardsPanel } from '../../../views/perses-dashboards-panel'; +import { persesDashboardsEditVariables } from '../../../views/perses-dashboards/perses-dashboards-edit-variables'; +import { persesDashboardsPanelGroup } from '../../../views/perses-dashboards/perses-dashboards-panelgroup'; +import { persesDashboardsPanel } from '../../../views/perses-dashboards/perses-dashboards-panel'; import { persesDashboardsAddListPanelType } from '../../../fixtures/perses/constants'; -import { persesImportDashboardsPage } from '../../../views/perses-dashboards-import-dashboard'; -import { nav } from '../../../views/nav'; import type { CustomerPerspective } from '@/shared/constants/perspective'; +import { persesImportDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-import-dashboard'; +import { nav } from '../../../views/shared/nav'; let dashboardName = 'Testing Dashboard - UP '; const randomSuffix = Math.random().toString(5); diff --git a/web/cypress/support/perses/rbac/perses_user6.cy.ts b/web/cypress/support/perses/rbac/perses_user6.cy.ts index 78de7fab2..4466d305e 100644 --- a/web/cypress/support/perses/rbac/perses_user6.cy.ts +++ b/web/cypress/support/perses/rbac/perses_user6.cy.ts @@ -1,7 +1,7 @@ -import { listPersesDashboardsPage } from '../../../views/perses-dashboards-list-dashboards'; import type { CustomerPerspective } from '@/shared/constants/perspective'; -import { persesCreateDashboardsPage } from '../../views/perses-dashboards-create-dashboard'; -import { persesImportDashboardsPage } from '../../views/perses-dashboards-import-dashboard'; +import { listPersesDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-list-dashboards'; +import { persesCreateDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-create-dashboard'; +import { persesImportDashboardsPage } from '../../../views/perses-dashboards/perses-dashboards-import-dashboard'; /** * User6 has access to: diff --git a/web/cypress/support/shared/cluster-observability-operator/coo-install-commands.ts b/web/cypress/support/shared/cluster-observability-operator/coo-install-commands.ts index a01ab416a..60d54ff26 100644 --- a/web/cypress/support/shared/cluster-observability-operator/coo-install-commands.ts +++ b/web/cypress/support/shared/cluster-observability-operator/coo-install-commands.ts @@ -1,7 +1,7 @@ import 'cypress-wait-until'; -import { operatorHubPage } from '../../../views/operator-hub-page'; -import { nav } from '../../../views/nav'; import { installTimeoutMilliseconds, readyTimeoutMilliseconds } from '../../timeouts'; +import { operatorHubPage } from '../../../views/shared/operator-hub-page'; +import { nav } from '../../../views/shared/nav'; export {}; diff --git a/web/cypress/support/shared/commands/auth-commands.ts b/web/cypress/support/shared/commands/auth-commands.ts index 75e7d7d10..8e8a45fe5 100644 --- a/web/cypress/support/shared/commands/auth-commands.ts +++ b/web/cypress/support/shared/commands/auth-commands.ts @@ -1,5 +1,5 @@ -import { nav } from '../../../views/nav'; -import { guidedTour } from '../../../views/tour'; +import { nav } from '../../../views/shared/nav'; +import { guidedTour } from '../../../views/shared/tour'; export {}; declare global { diff --git a/web/cypress/support/shared/commands/traces-logging-commands.ts b/web/cypress/support/shared/commands/traces-logging-commands.ts index 40d6ea358..f8363b741 100644 --- a/web/cypress/support/shared/commands/traces-logging-commands.ts +++ b/web/cypress/support/shared/commands/traces-logging-commands.ts @@ -1,7 +1,7 @@ import 'cypress-wait-until'; -import { operatorHubPage } from '../../../views/operator-hub-page'; -import { nav } from '../../../views/nav'; import { installTimeoutMilliseconds, readyTimeoutMilliseconds } from '../../timeouts'; +import { operatorHubPage } from '../../../views/shared/operator-hub-page'; +import { nav } from '../../../views/shared/nav'; import { operatorAuthUtils } from './auth-commands'; export {}; diff --git a/web/cypress/support/shared/commands/virtualization-commands.ts b/web/cypress/support/shared/commands/virtualization-commands.ts index db59e747e..520b2ae1d 100644 --- a/web/cypress/support/shared/commands/virtualization-commands.ts +++ b/web/cypress/support/shared/commands/virtualization-commands.ts @@ -1,9 +1,9 @@ import 'cypress-wait-until'; -import { operatorHubPage } from '../../../views/operator-hub-page'; -import { nav } from '../../../views/nav'; +import { operatorHubPage } from '../../../views/shared/operator-hub-page'; +import { nav } from '../../../views/shared/nav'; import { operatorAuthUtils } from './auth-commands'; -import { guidedTour } from '../../../views/tour'; import { installTimeoutMilliseconds, readyTimeoutMilliseconds } from '../../timeouts'; +import { guidedTour } from '../../../views/shared/tour'; export {}; diff --git a/web/cypress/views/acm-alerting-page.ts b/web/cypress/views/alerts/acm-alerting-page.ts similarity index 100% rename from web/cypress/views/acm-alerting-page.ts rename to web/cypress/views/alerts/acm-alerting-page.ts diff --git a/web/cypress/views/alerts/alert-and-silence-details-page.ts b/web/cypress/views/alerts/alert-and-silence-details-page.ts new file mode 100644 index 000000000..5e8502b61 --- /dev/null +++ b/web/cypress/views/alerts/alert-and-silence-details-page.ts @@ -0,0 +1,125 @@ +import { commonPages } from '../shared/common'; +import { Classes, DataTestIDs } from '@/shared/constants/data-test'; + +export const alertAndSilencesDetailsPage = { + sectionHeaderShouldExist: (sectionHeading: string) => { + cy.log('detailsPage.sectionHeaderShouldExist'); + cy.get(Classes.SectionHeader).contains(sectionHeading).should('be.visible'); + }, + + labelShouldExist: (labelName: string) => { + cy.log('detailsPage.labelShouldExist'); + cy.get(Classes.LabelTag).contains(labelName); + }, + + clickAlertRule: (alert: string) => { + cy.log('detailsPage.clickAlertRule'); + cy.byTestID(DataTestIDs.AlertingRuleResourceLink).scrollIntoView(); + try { + cy.byTestID(DataTestIDs.AlertingRuleResourceLink) + .contains(alert) + .should('be.visible') + .click(); + commonPages.detailsPage.alertRule(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + + clickAlertDesc: (desc: string) => { + cy.log('detailsPage.clickAlertDesc'); + cy.byTestID(DataTestIDs.AlertResourceLink).scrollIntoView(); + try { + cy.byTestID(DataTestIDs.AlertResourceLink).contains(desc).should('be.visible').click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + + clickInspectAlertPage: () => { + cy.log('detailsPage.clickInspectAlertPage'); + try { + cy.byAriaLabel('Inspect').should('be.visible'); + cy.get(`a[aria-label="Inspect"]`, { timeout: 10000 }).click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + + clickOnSilencedBy: (alertname: string) => { + cy.log('detailsPage.clickOnSilencedBy'); + try { + cy.byLegacyTestID(DataTestIDs.SilenceResourceLink).contains(alertname).scrollIntoView(); + cy.byLegacyTestID(DataTestIDs.SilenceResourceLink).contains(alertname).click({ force: true }); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + + assertSilencedAlert: () => { + cy.log('detailsPage.assertSilencedAlert'); + try { + cy.byTestID(DataTestIDs.SilenceButton).should('not.exist'); + alertAndSilencesDetailsPage.clickOnSilenceByKebab(); + cy.byPFRole('menuitem').contains('Edit silence').should('be.visible'); + cy.byPFRole('menuitem').contains('Expire silence').should('be.visible'); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + + clickOnSilenceByKebab: () => { + cy.log('detailsPage.clickOnSilenceByKebab'); + try { + cy.byLegacyTestID(DataTestIDs.SilenceResourceLink).scrollIntoView(); + cy.get('table').should('be.visible'); + cy.wait(2000); + cy.get('table').find(Classes.SilenceKebabDropdown).should('be.visible'); + cy.get('table') + .find(Classes.SilenceKebabDropdown) + .should('be.visible') + .click({ force: true }); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + + editSilence: () => { + cy.log('detailsPage.editSilence'); + try { + alertAndSilencesDetailsPage.clickOnSilenceByKebab(); + cy.byPFRole('menuitem').contains('Edit silence').should('be.visible').click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + /** + * + * @param yes boolean: true to expire and false to cancel + */ + expireSilence: (yes: boolean) => { + cy.log('detailsPage.expireSilence'); + try { + alertAndSilencesDetailsPage.clickOnSilenceByKebab(); + cy.byPFRole('menuitem') + .contains('Expire silence') + .should('be.visible') + .click({ force: true }); + commonPages.confirmExpireAlert(yes); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + clickSilenceAlertButton: () => { + cy.log('detailsPage.clickSilenceAlertButton'); + cy.byTestID(DataTestIDs.SilenceButton).should('be.visible').click(); + }, +}; diff --git a/web/cypress/views/alerting-rule-details-page.ts b/web/cypress/views/alerts/alerting-rule-details-page.ts similarity index 90% rename from web/cypress/views/alerting-rule-details-page.ts rename to web/cypress/views/alerts/alerting-rule-details-page.ts index eef8226a3..8e069f82f 100644 --- a/web/cypress/views/alerting-rule-details-page.ts +++ b/web/cypress/views/alerts/alerting-rule-details-page.ts @@ -1,5 +1,5 @@ -import { commonPages } from './common'; -import { detailsPage } from './details-page'; +import { commonPages } from '../shared/common'; +import { alertAndSilencesDetailsPage } from './alert-and-silence-details-page'; import { DataTestIDs } from '@/shared/constants/data-test'; export const alertingRuleDetailsPage = { @@ -7,8 +7,8 @@ export const alertingRuleDetailsPage = { cy.log('alertingRuleDetailsPage.assertAlertingRuleDetailsPage'); commonPages.titleShouldHaveText(title); cy.byTestID(DataTestIDs.AlertingRuleResourceIcon).contains('AR').should('be.visible'); - detailsPage.sectionHeaderShouldExist('Alerting rule details'); - detailsPage.sectionHeaderShouldExist('Active alerts'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Alerting rule details'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Active alerts'); cy.byTestID(DataTestIDs.Expression).should('be.visible'); cy.byTestID(DataTestIDs.MetricHideShowGraphButton).contains('Hide graph').should('be.visible'); cy.byTestID(DataTestIDs.MetricGraph).scrollIntoView().should('be.visible'); diff --git a/web/cypress/views/alerting-rule-list-page.ts b/web/cypress/views/alerts/alerting-rule-list-page.ts similarity index 91% rename from web/cypress/views/alerting-rule-list-page.ts rename to web/cypress/views/alerts/alerting-rule-list-page.ts index fc81a50f9..d743201ba 100644 --- a/web/cypress/views/alerting-rule-list-page.ts +++ b/web/cypress/views/alerts/alerting-rule-list-page.ts @@ -1,9 +1,11 @@ import { Classes, DataTestIDs, FilterOUIAIDs } from '@/shared/constants/data-test'; -import { listPage } from './list-page'; +import { Source } from '../../fixtures/shared/cluster-monitoring-operator/constants'; +import { alertsListPage } from './alerts-list-page'; export const alertingRuleListPage = { shouldBeLoaded: () => { cy.log('alertingRuleListPage.shouldBeLoaded'); + alertsListPage.filter.removeIndividualTag(Source.PLATFORM); cy.byTestID(DataTestIDs.AlertingRuleResourceIcon).contains('AR'); cy.get(Classes.TableHeaderColumn).contains('Name').should('be.visible'); cy.get(Classes.TableHeaderColumn).contains('Severity').should('be.visible'); @@ -29,7 +31,7 @@ export const alertingRuleListPage = { byName: (name: string, ouiaId: string = FilterOUIAIDs.RuleNameFilter) => { cy.log('listPage.filter.byName'); try { - listPage.filter.selectAttribute('Name'); + alertsListPage.filter.selectAttribute('Name'); cy.byOUIAID(`${ouiaId}-input`) .find('input') .scrollIntoView() diff --git a/web/cypress/views/alerts/alerts-list-page.ts b/web/cypress/views/alerts/alerts-list-page.ts new file mode 100644 index 000000000..68f7c13e8 --- /dev/null +++ b/web/cypress/views/alerts/alerts-list-page.ts @@ -0,0 +1,291 @@ +import { Classes, DataTestIDs, FilterOUIAIDs, LegacyTestIDs } from '@/shared/constants/data-test'; + +const escapeRegExp = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + +export const alertsListPage = { + /** + * + * @param tab + */ + tabShouldHaveText: (tab: string) => { + cy.log('listPage.tabShouldHaveText'); + cy.get(Classes.HorizontalNav).contains(tab).should('exist'); + }, + + /** + * + * @param clearFolder true = clear folder, false = do not clear folder + * @param fileNameExp i.e openshift.csv + */ + exportAsCSV: (clearFolder: boolean, fileNameExp: RegExp) => { + cy.log('listPage.exportAsCSV'); + let downloadedFileName: string | null = null; + const downloadsFolder = Cypress.config('downloadsFolder'); + const expectedFileNamePattern = fileNameExp; + if (clearFolder) { + cy.task('clearDownloads'); + } + cy.byTestID(DataTestIDs.DownloadCSVButton).should('be.visible').click(); + + cy.waitUntil( + () => { + return cy.task('getFilesInFolder', downloadsFolder).then((currentFiles: string[]) => { + const matchingFile = currentFiles.find((file) => expectedFileNamePattern.test(file)); + if (matchingFile) { + downloadedFileName = matchingFile; + return true; + } + return false; + }); + }, + { + timeout: 20000, + interval: 1000, + errorMsg: [ + `CSV file matching "${expectedFileNamePattern}"`, + 'was not downloaded within timeout.', + ].join(' '), + }, + ); + + cy.then(() => { + expect(downloadedFileName).to.not.equal(null); + cy.task('doesFileExist', { fileName: downloadedFileName }).should('be.true'); + }); + }, + + filter: { + selectAttribute: (attributeName: string) => { + cy.log('listPage.filter.selectAttribute'); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.byOUIAID('DataViewFilters') + .find('.pf-v6-c-menu-toggle') + .first() + .then(($toggle) => { + if (!$toggle.text().includes(attributeName)) { + cy.wrap($toggle).click(); + cy.get('.pf-v6-c-menu__item').contains(attributeName).click(); + } + }); + }, + + /** + * @param name + */ + byName: (name: string, ouiaId: string = FilterOUIAIDs.AlertNameFilter) => { + cy.log('listPage.filter.byName'); + try { + alertsListPage.filter.selectAttribute('Name'); + cy.byOUIAID(`${ouiaId}-input`) + .find('input') + .scrollIntoView() + .as('input') + .should('be.visible'); + cy.get('@input', { timeout: 10000 }) + .scrollIntoView() + .type(name + '{enter}'); + cy.get('@input', { timeout: 10000 }).scrollIntoView().should('have.attr', 'value', name); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + /** + * @param label + */ + byLabel: (label: string) => { + cy.log('listPage.filter.byLabel'); + alertsListPage.filter.selectAttribute('Label'); + cy.byLegacyTestID(LegacyTestIDs.ItemFilter).scrollIntoView().as('input').should('be.visible'); + cy.get('@input', { timeout: 10000 }) + .scrollIntoView() + .type(label + '{enter}') + .should('have.attr', 'value', label); + cy.byTestID(DataTestIDs.LabelSuggestion).contains(label).click(); + }, + + clearAllFilters: () => { + cy.log('listPage.filter.clearAllFilters'); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.get('body').then(($body) => { + if ($body.find('[data-ouia-component-id="DataViewToolbar-clear-all-filters"]').length > 0) { + cy.byOUIAID('DataViewToolbar-clear-all-filters').first().click(); + } + }); + }, + + /** + * Select a filter option from a checkbox filter. + * First selects the filter attribute, then opens the checkbox dropdown and clicks the option. + * + * @param filterCategory The filter attribute name + * ie. 'Alert State', 'Severity', 'Source', 'Silence State' + * @param option The option value to select (e.g., 'Firing', 'Critical', 'Platform') + */ + selectFilterOption: (filterCategory: string, option: string) => { + cy.log('listPage.filter.selectFilterOption'); + alertsListPage.filter.selectAttribute(filterCategory); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.byOUIAID('DataViewFilters') + .find(Classes.FilterDropdown) + .filter(':visible') + .last() + .scrollIntoView() + .click(); + cy.get(Classes.FilterDropdownOption).contains(option).should('be.visible').click(); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.byOUIAID('DataViewFilters') + .find(Classes.FilterDropdown) + .filter(':visible') + .last() + .scrollIntoView() + .click(); + }, + + /** + * + * @param tagName alerts-tab: Firing, Pending, Silenced, Critical, Warning, Info, None, + * Platform, User + * silences: Active, Pending, Expired + * alerting-rules: Firing, Pending, Silenced, Not Firing, Critical, Warning, Info, None, + * Platform, User + */ + removeIndividualTag: (tagName: string) => { + cy.log('listPage.filter.removeIndividualTag'); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.get(Classes.IndividualTag) + .contains(new RegExp(`^${escapeRegExp(tagName)}$`)) + .parent() + .next('span') + .children('button') + .click(); + }, + + /** + * + * @param groupTagName alerts-tab (Alert State, Severity, Source), Silence State, + * alerting-rules (Alert State, Severity, Source) + */ + clickOn1more: (groupTagName: string) => { + cy.log('listPage.filter.clickOn1more'); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.get(Classes.MoreLessTag) + .contains(groupTagName) + .siblings('ul') + .children('li') + .contains('1 more') + .click(); + }, + + /** + * + * @param groupTagName alerts-tab (Alert State, Severity, Source), Silence State, + * alerting-rules (Alert State, Severity, Source) + */ + clickOnShowLess: (groupTagName: string) => { + cy.log('listPage.filter.clickOnShowLess'); + cy.byOUIAID('DataViewFilters').scrollIntoView(); + cy.get(Classes.MoreLessTag) + .contains(groupTagName) + .siblings('ul') + .children('li') + .contains('Show Less') + .click(); + }, + }, + ARRows: { + shouldBeLoaded: () => { + cy.log('listPage.ARRows.shouldBeLoaded'); + cy.byOUIAID(DataTestIDs.Table).should('be.visible'); + }, + countShouldBe: (count: number) => { + cy.log('listPage.ARRows.countShouldBe'); + cy.byTestID(DataTestIDs.AlertingRuleResourceIcon).should('have.length', count); + }, + + //pf-6 only + ARShouldBe: (alert: string, severity: string, total: number, state: string) => { + cy.log('listPage.ARRows.ARShouldBe'); + cy.byTestID(DataTestIDs.AlertingRuleResourceIcon).contains('AR'); + cy.byTestID(DataTestIDs.AlertingRuleResourceLink).contains(alert).should('exist'); + cy.byTestID(DataTestIDs.AlertingRuleSeverityBadge).contains(severity).should('exist'); + cy.byTestID(DataTestIDs.AlertingRuleTotalAlertsBadge).contains(total).should('exist'); + cy.byTestID(DataTestIDs.AlertingRuleStateBadge).contains(state).should('exist'); + }, + AShouldBe: (alert: string, severity: string, namespace: string) => { + cy.log('listPage.ARRows.AShouldBe'); + cy.byTestID(DataTestIDs.AlertResourceIcon).should('exist'); + cy.byTestID(DataTestIDs.AlertResourceLink).contains(alert).should('exist'); + cy.byTestID(DataTestIDs.SeverityBadge).contains(severity).should('exist'); + cy.byTestID(DataTestIDs.AlertNamespace).contains(namespace).should('exist'); + }, + //pf-6 only + expandRow: () => { + cy.log('listPage.ARRows.expandRow'); + try { + cy.get('body').then(($provider) => { + if ($provider.find(Classes.ExpandedRow).length > 0) { + cy.log('Already expanded'); + } else { + cy.byTestID(DataTestIDs.AlertingRuleArrow).first().find('button').click(); + } + }); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + //pf-6 only + clickAlertingRule: () => { + cy.log('listPage.ARRows.clickAlertingRule'); + try { + cy.byTestID(DataTestIDs.AlertingRuleResourceLink).should('be.visible').click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + clickAlert: () => { + cy.log('listPage.ARRows.clickAlert'); + try { + cy.byTestID(DataTestIDs.AlertResourceLink).should('be.visible').click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + assertNoKebab: () => { + cy.log('listPage.ARRows.assertNoKebab'); + try { + cy.byAriaLabel('toggle menu').should('not.exist'); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + clickAlertKebab: () => { + cy.log('listPage.ARRows.clickAlertKebab'); + try { + cy.byTestID(DataTestIDs.KebabDropdownButton).should('be.visible').click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + silenceAlert: () => { + cy.log('listPage.ARRows.silentAlert'); + try { + alertsListPage.ARRows.clickAlertKebab(); + cy.byTestID(DataTestIDs.SilenceAlertDropdownItem).should('be.visible').click(); + } catch (error) { + cy.log(`${error.message}`); + throw error; + } + }, + }, + emptyState: () => { + cy.log('listPage.emptyState'); + cy.byTestID(DataTestIDs.EmptyBoxBody).contains('No alerts found').should('be.visible'); + cy.byOUIAID(DataTestIDs.Table).should('not.exist'); + }, +}; diff --git a/web/cypress/views/silence-alert-page.ts b/web/cypress/views/alerts/silence-alert-page.ts similarity index 100% rename from web/cypress/views/silence-alert-page.ts rename to web/cypress/views/alerts/silence-alert-page.ts diff --git a/web/cypress/views/silence-details-page.ts b/web/cypress/views/alerts/silence-details-page.ts similarity index 90% rename from web/cypress/views/silence-details-page.ts rename to web/cypress/views/alerts/silence-details-page.ts index 83475b2b3..3b25e07b2 100644 --- a/web/cypress/views/silence-details-page.ts +++ b/web/cypress/views/alerts/silence-details-page.ts @@ -1,13 +1,13 @@ -import { commonPages } from './common'; -import { detailsPage } from './details-page'; +import { commonPages } from '../shared/common'; +import { alertAndSilencesDetailsPage } from './alert-and-silence-details-page'; import { DataTestIDs } from '@/shared/constants/data-test'; export const silenceDetailsPage = { assertSilenceDetailsPage: (title: string, section: string, labelname: string) => { cy.log('silenceDetailsPage.assertSilenceDetailsPage'); commonPages.titleShouldHaveText(title); - detailsPage.sectionHeaderShouldExist(section); - detailsPage.labelShouldExist(labelname); + alertAndSilencesDetailsPage.sectionHeaderShouldExist(section); + alertAndSilencesDetailsPage.labelShouldExist(labelname); }, clickOnFiringAlerts: (alertname: string) => { diff --git a/web/cypress/views/silences-list-page.ts b/web/cypress/views/alerts/silences-list-page.ts similarity index 98% rename from web/cypress/views/silences-list-page.ts rename to web/cypress/views/alerts/silences-list-page.ts index 48e14efa3..093ed1b15 100644 --- a/web/cypress/views/silences-list-page.ts +++ b/web/cypress/views/alerts/silences-list-page.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { Classes, DataTestIDs, FilterOUIAIDs } from '@/shared/constants/data-test'; export const silencesListPage = { diff --git a/web/cypress/views/incidents-page.ts b/web/cypress/views/incidents/incidents-page.ts similarity index 99% rename from web/cypress/views/incidents-page.ts rename to web/cypress/views/incidents/incidents-page.ts index f4d459e7c..5ae9cc51a 100644 --- a/web/cypress/views/incidents-page.ts +++ b/web/cypress/views/incidents/incidents-page.ts @@ -1,4 +1,4 @@ -import { nav } from './nav'; +import { nav } from '../shared/nav'; import { Classes, DataTestIDs } from '@/shared/constants/data-test'; // Hard timeout safety net for findIncidentWithAlert retry loops. diff --git a/web/cypress/views/legacy-dashboards.ts b/web/cypress/views/legacy-dashboards/legacy-dashboards.ts similarity index 98% rename from web/cypress/views/legacy-dashboards.ts rename to web/cypress/views/legacy-dashboards/legacy-dashboards.ts index f577e56e4..b617bbdcd 100644 --- a/web/cypress/views/legacy-dashboards.ts +++ b/web/cypress/views/legacy-dashboards/legacy-dashboards.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { Classes, DataTestIDs, LegacyDashboardPageTestIDs } from '@/shared/constants/data-test'; import { API_PERFORMANCE_DASHBOARD_PANELS, @@ -8,7 +8,7 @@ import { LegacyDashboardsTimeRange, MonitoringPageTitles, MonitoringRefreshInterval, -} from '../fixtures/shared/cluster-monitoring-operator/constants'; +} from '../../fixtures/shared/cluster-monitoring-operator/constants'; export const legacyDashboardsPage = { shouldBeLoaded: () => { cy.log('legacyDashboardsPage.shouldBeLoaded'); diff --git a/web/cypress/views/metrics.ts b/web/cypress/views/metrics/metrics.ts similarity index 99% rename from web/cypress/views/metrics.ts rename to web/cypress/views/metrics/metrics.ts index 3b0fa6662..681d02eae 100644 --- a/web/cypress/views/metrics.ts +++ b/web/cypress/views/metrics/metrics.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { Classes, DataTestIDs, IDs } from '@/shared/constants/data-test'; import { GraphTimespan, @@ -9,7 +9,7 @@ import { MetricsPageQueryKebabDropdown, MetricsPageUnits, MonitoringRefreshInterval, -} from '../fixtures/shared/cluster-monitoring-operator/constants'; +} from '../../fixtures/shared/cluster-monitoring-operator/constants'; export const metricsPage = { shouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards-create-dashboard.ts b/web/cypress/views/perses-dashboards/perses-dashboards-create-dashboard.ts similarity index 97% rename from web/cypress/views/perses-dashboards-create-dashboard.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-create-dashboard.ts index 123b312f2..562ff16b1 100644 --- a/web/cypress/views/perses-dashboards-create-dashboard.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-create-dashboard.ts @@ -4,7 +4,10 @@ import { persesAriaLabels, persesDashboardDataTestIDs, } from '@/shared/constants/data-test'; -import { persesCreateDashboard, persesDashboardsModalTitles } from '../fixtures/perses/constants'; +import { + persesCreateDashboard, + persesDashboardsModalTitles, +} from '../../fixtures/perses/constants'; export const persesCreateDashboardsPage = { createDashboardShouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards-edit-datasources.ts b/web/cypress/views/perses-dashboards/perses-dashboards-edit-datasources.ts similarity index 98% rename from web/cypress/views/perses-dashboards-edit-datasources.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-edit-datasources.ts index f9032a84a..4acd72adc 100644 --- a/web/cypress/views/perses-dashboards-edit-datasources.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-edit-datasources.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { editPersesDashboardsAddDatasource, IDs, @@ -8,7 +8,7 @@ import { import { persesDashboardsModalTitles, persesDashboardsRequiredFields, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; export const persesDashboardsEditDatasources = { shouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards-edit-variables.ts b/web/cypress/views/perses-dashboards/perses-dashboards-edit-variables.ts similarity index 99% rename from web/cypress/views/perses-dashboards-edit-variables.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-edit-variables.ts index c69569b22..c7b376cb2 100644 --- a/web/cypress/views/perses-dashboards-edit-variables.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-edit-variables.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { editPersesDashboardsAddVariable, IDs, @@ -10,7 +10,7 @@ import { persesDashboardsAddListVariableSource, persesDashboardsModalTitles, persesDashboardsRequiredFields, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; export const persesDashboardsEditVariables = { shouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards-import-dashboard.ts b/web/cypress/views/perses-dashboards/perses-dashboards-import-dashboard.ts similarity index 99% rename from web/cypress/views/perses-dashboards-import-dashboard.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-import-dashboard.ts index 8958f707b..1bd7085ae 100644 --- a/web/cypress/views/perses-dashboards-import-dashboard.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-import-dashboard.ts @@ -7,7 +7,7 @@ import { import { persesDashboardsImportDashboard, persesDashboardsModalTitles, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; export const persesImportDashboardsPage = { importDashboardShouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards-list-dashboards.ts b/web/cypress/views/perses-dashboards/perses-dashboards-list-dashboards.ts similarity index 98% rename from web/cypress/views/perses-dashboards-list-dashboards.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-list-dashboards.ts index 15e4a67f2..c293b85ba 100644 --- a/web/cypress/views/perses-dashboards-list-dashboards.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-list-dashboards.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { Classes, DataTestIDs, @@ -15,8 +15,8 @@ import { listPersesDashboardsPageSubtitle, persesDashboardsDuplicateDashboard, persesDashboardsRenameDashboard, -} from '../fixtures/perses/constants'; -import { MonitoringPageTitles } from '../fixtures/shared/cluster-monitoring-operator/constants'; +} from '../../fixtures/perses/constants'; +import { MonitoringPageTitles } from '../../fixtures/shared/cluster-monitoring-operator/constants'; export const listPersesDashboardsPage = { emptyState: () => { diff --git a/web/cypress/views/perses-dashboards-panel.ts b/web/cypress/views/perses-dashboards/perses-dashboards-panel.ts similarity index 99% rename from web/cypress/views/perses-dashboards-panel.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-panel.ts index d29175476..815702b6c 100644 --- a/web/cypress/views/perses-dashboards-panel.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-panel.ts @@ -1,10 +1,10 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { editPersesDashboardsAddPanel, IDs, persesAriaLabels } from '@/shared/constants/data-test'; import { persesDashboardsAddListPanelType, persesDashboardsAddPanelAddQueryType, persesDashboardsModalTitles, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; export const persesDashboardsPanel = { addPanelShouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards-panelgroup.ts b/web/cypress/views/perses-dashboards/perses-dashboards-panelgroup.ts similarity index 98% rename from web/cypress/views/perses-dashboards-panelgroup.ts rename to web/cypress/views/perses-dashboards/perses-dashboards-panelgroup.ts index 1400c7028..80efb02d2 100644 --- a/web/cypress/views/perses-dashboards-panelgroup.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards-panelgroup.ts @@ -1,9 +1,9 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { IDs, persesAriaLabels, persesMUIDataTestIDs } from '@/shared/constants/data-test'; import { persesDashboardsModalTitles, persesDashboardsRequiredFields, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; export const persesDashboardsPanelGroup = { addPanelGroupShouldBeLoaded: () => { diff --git a/web/cypress/views/perses-dashboards.ts b/web/cypress/views/perses-dashboards/perses-dashboards.ts similarity index 99% rename from web/cypress/views/perses-dashboards.ts rename to web/cypress/views/perses-dashboards/perses-dashboards.ts index 95812bd8b..05f62e03a 100644 --- a/web/cypress/views/perses-dashboards.ts +++ b/web/cypress/views/perses-dashboards/perses-dashboards.ts @@ -1,4 +1,4 @@ -import { commonPages } from './common'; +import { commonPages } from '../shared/common'; import { Classes, DataTestIDs, @@ -10,19 +10,19 @@ import { persesDashboardDataTestIDs, persesMUIDataTestIDs, } from '@/shared/constants/data-test'; -import { MonitoringPageTitles } from '../fixtures/shared/cluster-monitoring-operator/constants'; +import { MonitoringPageTitles } from '../../fixtures/shared/cluster-monitoring-operator/constants'; import { listPersesDashboardsPageSubtitle, persesDashboardsEmptyDashboard, persesDashboardsModalTitles, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; import { persesDashboardsAcceleratorsCommonMetricsPanels, persesDashboardsDashboardDropdownCOO, persesDashboardsDashboardDropdownPersesDev, persesDashboardsRefreshInterval, persesDashboardsTimeRange, -} from '../fixtures/perses/constants'; +} from '../../fixtures/perses/constants'; export const persesDashboardsPage = { shouldBeLoaded: () => { diff --git a/web/cypress/views/common.ts b/web/cypress/views/shared/common.ts similarity index 95% rename from web/cypress/views/common.ts rename to web/cypress/views/shared/common.ts index 1ec4e250c..72e9b0e4c 100644 --- a/web/cypress/views/common.ts +++ b/web/cypress/views/shared/common.ts @@ -1,4 +1,4 @@ -import { detailsPage } from './details-page'; +import { alertAndSilencesDetailsPage } from '../alerts/alert-and-silence-details-page'; import { DataTestIDs } from '@/shared/constants/data-test'; export const commonPages = { @@ -57,7 +57,7 @@ export const commonPages = { cy.log('commonPages.detailsPage.alert'); cy.byTestID(DataTestIDs.AlertResourceIcon).contains('A'); cy.byTestID(DataTestIDs.SilenceButton).should('be.visible'); - detailsPage.sectionHeaderShouldExist('Alert details'); + alertAndSilencesDetailsPage.sectionHeaderShouldExist('Alert details'); cy.byTestID(DataTestIDs.AlertingRuleResourceLink).scrollIntoView(); cy.byTestID(DataTestIDs.AlertingRuleResourceIcon).contains('AR').should('be.visible'); cy.byTestID(DataTestIDs.AlertingRuleResourceLink).contains(alert).should('be.visible'); diff --git a/web/cypress/views/details-page.ts b/web/cypress/views/shared/details-page.ts similarity index 100% rename from web/cypress/views/details-page.ts rename to web/cypress/views/shared/details-page.ts diff --git a/web/cypress/views/list-page.ts b/web/cypress/views/shared/list-page.ts similarity index 100% rename from web/cypress/views/list-page.ts rename to web/cypress/views/shared/list-page.ts diff --git a/web/cypress/views/nav.ts b/web/cypress/views/shared/nav.ts similarity index 100% rename from web/cypress/views/nav.ts rename to web/cypress/views/shared/nav.ts diff --git a/web/cypress/views/operator-hub-page.ts b/web/cypress/views/shared/operator-hub-page.ts similarity index 96% rename from web/cypress/views/operator-hub-page.ts rename to web/cypress/views/shared/operator-hub-page.ts index d60e22700..00e94bcb2 100644 --- a/web/cypress/views/operator-hub-page.ts +++ b/web/cypress/views/shared/operator-hub-page.ts @@ -1,5 +1,5 @@ -import * as helperfuncs from '../views/utils'; import { CustomerPerspectiveName } from '@/shared/constants/perspective'; +import * as helperfuncs from './utils'; export const operatorHubPage = { installOperator: (operatorName, csName, installNamespace?) => { diff --git a/web/cypress/views/overview-page.ts b/web/cypress/views/shared/overview-page.ts similarity index 100% rename from web/cypress/views/overview-page.ts rename to web/cypress/views/shared/overview-page.ts diff --git a/web/cypress/views/tour.ts b/web/cypress/views/shared/tour.ts similarity index 100% rename from web/cypress/views/tour.ts rename to web/cypress/views/shared/tour.ts diff --git a/web/cypress/views/troubleshooting-panel.ts b/web/cypress/views/shared/troubleshooting-panel.ts similarity index 100% rename from web/cypress/views/troubleshooting-panel.ts rename to web/cypress/views/shared/troubleshooting-panel.ts diff --git a/web/cypress/views/utils.ts b/web/cypress/views/shared/utils.ts similarity index 100% rename from web/cypress/views/utils.ts rename to web/cypress/views/shared/utils.ts