From 0956090b439429d7f00e5e17489e9bc68af58481 Mon Sep 17 00:00:00 2001 From: PeterYurkovich Date: Tue, 11 Aug 2026 12:16:16 -0400 Subject: [PATCH] refactor: rename tags to be the same as backend features --- .claude/commands/cypress/cypress-run.md | 88 ++++-- .cursor/commands/generate-regression-test.md | 280 +++++++++++------- .../performance/03.endurance_test_source.md | 255 ++++++++-------- web/cypress/README.md | 147 +++++---- web/cypress/e2e/coo/01.coo_bvt.cy.ts | 2 +- web/cypress/e2e/coo/01.coo_ivt.cy.ts | 2 +- web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts | 2 +- .../03.coo_lightspeed_show_timeseries.cy.ts | 6 +- web/cypress/e2e/monitoring/00.bvt_admin.cy.ts | 124 ++++---- web/cypress/e2e/monitoring/00.bvt_dev.cy.ts | 2 +- .../regression/01.reg_alerts_admin.cy.ts | 2 +- .../regression/01.reg_alerts_dev.cy.ts | 2 +- .../regression/02.reg_metrics_admin_1.cy.ts | 34 +-- .../regression/02.reg_metrics_admin_2.cy.ts | 34 +-- .../03.reg_legacy_dashboards_admin.cy.ts | 4 +- .../e2e/perses/00.coo_bvt_perses_admin.cy.ts | 2 +- .../e2e/perses/01.coo_list_perses_admin.cy.ts | 4 +- .../e2e/perses/02.coo_edit_perses_admin.cy.ts | 2 +- .../perses/03.coo_create_perses_admin.cy.ts | 2 +- .../perses/04.coo_import_perses_admin.cy.ts | 2 +- .../e2e/perses/05.coo_tempo_loki_admin.cy.ts | 2 +- .../e2e/perses/99.coo_rbac_perses_user1.cy.ts | 2 +- .../e2e/perses/99.coo_rbac_perses_user2.cy.ts | 2 +- .../e2e/perses/99.coo_rbac_perses_user3.cy.ts | 2 +- .../e2e/perses/99.coo_rbac_perses_user4.cy.ts | 2 +- .../e2e/perses/99.coo_rbac_perses_user5.cy.ts | 2 +- .../e2e/perses/99.coo_rbac_perses_user6.cy.ts | 2 +- .../e2e/virtualization/00.coo_ivt.cy.ts | 2 +- .../virtualization/01.coo_ivt_alerts.cy.ts | 46 ++- .../virtualization/02.coo_ivt_metrics_1.cy.ts | 4 +- .../virtualization/02.coo_ivt_metrics_2.cy.ts | 4 +- .../03.coo_ivt_legacy_dashboards.cy.ts | 4 +- .../virtualization/04.coo_ivt_perses.cy.ts | 2 +- web/cypress/support/test-tags.d.ts | 12 +- web/package.json | 27 +- 35 files changed, 607 insertions(+), 504 deletions(-) diff --git a/.claude/commands/cypress/cypress-run.md b/.claude/commands/cypress/cypress-run.md index 85fe2943f..3ec1e2fed 100644 --- a/.claude/commands/cypress/cypress-run.md +++ b/.claude/commands/cypress/cypress-run.md @@ -1,5 +1,5 @@ --- -name: cypress-run +name: cypress-run description: Display Cypress test commands - choose execution mode (headless recommended) parameters: - name: execution-mode @@ -10,7 +10,8 @@ parameters: # Cypress Test Commands -**Prerequisites**: +**Prerequisites**: + 1. Run `/cypress-setup` first to configure your environment. 2. Ensure the "Cypress Tests" terminal window is open (created by `/cypress-setup`) @@ -31,25 +32,28 @@ parameters: All npm commands should be executed in the "Cypress Tests" terminal using the helper scripts: **macOS:** + ```bash ./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run " ``` **Linux:** + ```bash ./.claude/commands/cypress/scripts/open-cypress-terminal-linux.sh --run "npm run " ``` **Instructions**: Based on the `execution-mode` parameter provided by the user: + - If `execution-mode` is "interactive": Display ONLY the "Interactive Mode" section below - If `execution-mode` is "headless": display ONLY the "Headless Mode" section with interactive options to be chosen - If `execution-mode` is "headed": display ONLY the "Headed Mode" section with interactive options to be chosen **IMPORTANT**: Always execute the selected command using the appropriate script: + - macOS: `./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run ""` - Linux: `./.claude/commands/cypress/scripts/open-cypress-terminal-linux.sh --run ""` - --- # Interactive Mode @@ -59,6 +63,7 @@ All npm commands should be executed in the "Cypress Tests" terminal using the he ## What is Interactive Mode? Interactive mode opens the Cypress Test Runner UI where you can: + - Browse and select tests visually - Watch tests run in real-time with time-travel debugging - Inspect DOM snapshots at each step @@ -71,16 +76,19 @@ Interactive mode opens the Cypress Test Runner UI where you can: **Open Cypress Interactive UI (run in Cypress Tests terminal):** macOS: + ```bash ./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run cypress:open" ``` Linux: + ```bash ./.claude/commands/cypress/scripts/open-cypress-terminal-linux.sh --run "npm run cypress:open" ``` This opens a visual interface where you can: + 1. Choose a browser (Chrome, Firefox, Edge, Electron) 2. Browse your test files 3. Click any test to run it @@ -113,10 +121,12 @@ All commands below run tests in headless mode (no visible browser). **IMPORTANT**: Before showing test commands, you MUST dynamically read: ### 1. Available NPM Scripts + Read `web/package.json` and extract all scripts matching `test-cypress-*` and `cypress:*` patterns. Present them as available test suite commands. -### 2. Available Test Spec Files +### 2. Available Test Spec Files + Scan `web/cypress/e2e/` directory recursively and list all `.cy.ts` files. Present them as available spec file targets for `--spec` option. @@ -125,21 +135,25 @@ Present them as available spec file targets for `--spec` option. ## Quick Reference - Base Commands **Run with npm script (if defined in package.json):** + ```bash npm run ``` **Run all tests headless:** + ```bash npm run cypress:run ``` **Run specific spec file:** + ```bash npm run cypress:run -- --spec "cypress/e2e/.cy.ts" ``` **Run with custom tags:** + ```bash npm run cypress:run -- --env grepTags="" ``` @@ -149,10 +163,12 @@ npm run cypress:run -- --env grepTags="" ## NPM Scripts from package.json **Instructions**: Read `web/package.json` and list ALL scripts that start with: + - `test-cypress-*` (predefined test suites) - `cypress:*` (base cypress commands) For each script found, display: + ```bash npm run ``` @@ -166,6 +182,7 @@ Add a brief description based on the grepTags or other flags in the script defin **Instructions**: Scan `web/cypress/e2e/` recursively and organize by folder: For each `.cy.ts` file found, show the command: + ```bash npm run cypress:run -- --spec "cypress/e2e/" ``` @@ -177,29 +194,32 @@ Group files by their parent folder (monitoring, coo, perses, virtualization, inc ## Custom Tag Combinations - Headless **Base command for custom tags:** + ```bash npm run cypress:run -- --env grepTags="YOUR_TAGS_HERE" ``` **Tag Operators:** -- `+` = AND (e.g., `@alerts+@smoke` = alerts AND smoke) -- `--` = NOT (e.g., `@monitoring --@flaky` = monitoring but NOT flaky) -- `,` = OR (e.g., `@alerts,@metrics` = alerts OR metrics) + +- `+` = AND (e.g., `@alerting+@metrics` = alerts AND metrics) +- `--` = NOT (e.g., `@alerting --@flaky` = alerting but NOT flaky) +- `,` = OR (e.g., `@alerting,@metrics` = alerts OR metrics) **Common tag patterns:** -| Goal | Command | -|------|---------| -| Smoke tests only | `npm run cypress:run -- --env grepTags="@smoke"` | -| Exclude flaky | `npm run cypress:run -- --env grepTags=" --@flaky"` | -| Exclude demo | `npm run cypress:run -- --env grepTags=" --@demo"` | -| Fast smoke | `npm run cypress:run -- --env grepTags="@smoke --@slow --@flaky"` | +| Goal | Command | +| ---------------- | ----------------------------------------------------------------- | +| Smoke tests only | `npm run cypress:run -- --env grepTags="@smoke"` | +| Exclude flaky | `npm run cypress:run -- --env grepTags=" --@flaky"` | +| Exclude demo | `npm run cypress:run -- --env grepTags=" --@demo"` | +| Fast smoke | `npm run cypress:run -- --env grepTags="@smoke --@slow --@flaky"` | --- ## Running Multiple Spec Files **Comma-separate spec paths:** + ```bash npm run cypress:run -- --spec "cypress/e2e/.cy.ts,cypress/e2e/.cy.ts" ``` @@ -209,6 +229,7 @@ npm run cypress:run -- --spec "cypress/e2e/.cy.ts,cypress/e2e/.cy. ## Advanced Headless Options **Run with specific browser:** + ```bash npm run cypress:run -- --browser firefox npm run cypress:run -- --browser edge @@ -216,11 +237,13 @@ npm run cypress:run -- --browser chrome ``` **Disable video recording:** + ```bash npm run cypress:run -- --config video=false ``` **Disable screenshots:** + ```bash npm run cypress:run -- --config screenshotOnRunFailure=false ``` @@ -234,11 +257,13 @@ All commands below open a visible browser window. ## Quick Start - Headed **Interactive Mode (Cypress UI, pick tests manually):** + ```bash npm run cypress:open ``` **Base headed mode command:** + ```bash npm run cypress:run -- --headed ``` @@ -249,11 +274,13 @@ npm run cypress:run -- --headed **IMPORTANT**: Before showing test commands, you MUST dynamically read: -### 1. Available Test Spec Files +### 1. Available Test Spec Files + Scan `web/cypress/e2e/` directory recursively and list all `.cy.ts` files. Present them as available spec file targets with `--headed` flag. ### 2. Available Tags + Extract grepTags patterns from `web/package.json` scripts to show common tag combinations. --- @@ -261,11 +288,13 @@ Extract grepTags patterns from `web/package.json` scripts to show common tag com ## Running Test Suites - Headed To run any tag-based suite in headed mode, add `--headed` flag: + ```bash npm run cypress:run -- --headed --env grepTags="" ``` **Examples based on common tags:** + ```bash # Monitoring tests (headed) npm run cypress:run -- --headed --env grepTags="@monitoring --@flaky" @@ -282,11 +311,13 @@ npm run cypress:run -- --headed --env grepTags="@coo --@flaky" ## Running Specific Files - Headed **Template:** + ```bash npm run cypress:run -- --headed --spec "cypress/e2e/.cy.ts" ``` **Instructions**: Scan `web/cypress/e2e/` and for each `.cy.ts` file, the headed command is: + ```bash npm run cypress:run -- --headed --spec "cypress/e2e/" ``` @@ -296,6 +327,7 @@ npm run cypress:run -- --headed --spec "cypress/e2e/" ## Advanced Headed Options **Headed with specific browser:** + ```bash npm run cypress:run -- --headed --browser chrome npm run cypress:run -- --headed --browser firefox @@ -303,6 +335,7 @@ npm run cypress:run -- --headed --browser edge ``` **Headed without video:** + ```bash npm run cypress:run -- --headed --config video=false ``` @@ -314,27 +347,19 @@ npm run cypress:run -- --headed --config video=false Use these tags with `--env grepTags`: **Feature Tags:** -- `@monitoring` - Core monitoring plugin tests -- `@monitoring-dev` - Developer user tests -- `@alerts` - Alert-related tests + +- `@acm-alerting` - Alert-related tests in ACM perspective +- `@alerting` - Alert-related tests +- `@legacy-dashboards` - Legacy dashboard tests - `@metrics` - Metrics explorer tests -- `@dashboards` - Legacy dashboard tests -- `@perses` - Perses dashboard tests -- `@coo` - Observability Operator tests -- `@acm` - Advanced Cluster Management tests -- `@virtualization` - OpenShift Virtualization tests +- `@targets` - Targets tests +- `@perses-dashboards` - Perses dashboard tests - `@cluster-health-analyzer` - Incidents feature tests **Modifier Tags:** -- `@smoke` - Quick smoke tests + - `@slow` - Longer running tests - `@flaky` - Known flaky tests -- `@demo` - Demo/showcase tests - -**Tag Operators:** -- `+` = AND (e.g., `@alerts+@smoke` = alerts AND smoke) -- `--` = NOT (e.g., `@monitoring --@flaky` = monitoring but NOT flaky) -- `,` = OR (e.g., `@alerts,@metrics` = alerts OR metrics) --- @@ -349,16 +374,19 @@ Use these tags with `--env grepTags`: All cypress commands should be executed in the "Cypress Tests" terminal using: **macOS:** + ```bash ./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "" ``` **Linux:** + ```bash ./.claude/commands/cypress/scripts/open-cypress-terminal-linux.sh --run "" ``` **Examples:** + ```bash # Run smoke tests (macOS) ./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run test-cypress-smoke" @@ -367,7 +395,7 @@ All cypress commands should be executed in the "Cypress Tests" terminal using: ./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run cypress:run -- --spec 'cypress/e2e/monitoring/00.bvt_admin.cy.ts'" # Run with custom tags (macOS) -./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run cypress:run -- --env grepTags='@monitoring --@flaky'" +./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run cypress:run -- --env grepTags='@alerting @legacy-dashboards @metrics @targets --@flaky'" # Open interactive mode (macOS) ./.claude/commands/cypress/scripts/open-cypress-terminal-macos.sh --run "npm run cypress:open" diff --git a/.cursor/commands/generate-regression-test.md b/.cursor/commands/generate-regression-test.md index 12a819076..8af627c75 100644 --- a/.cursor/commands/generate-regression-test.md +++ b/.cursor/commands/generate-regression-test.md @@ -14,6 +14,7 @@ Generate automated regression tests from test documentation in [`docs/incident_d **Input**: Section number (e.g., "Section 2.1", "1.2", "3") **Actions**: + - Read test flow files from [`docs/incident_detection/tests/`](../../docs/incident_detection/tests/) (e.g., `1.filtering_flows.md`, `2.ui_display_flows.md`) - Locate the specified section by number - Extract: @@ -26,18 +27,21 @@ Generate automated regression tests from test documentation in [`docs/incident_d ### 2. Analyze Test Requirements **Extract from documentation**: + - **Test data needs**: What incidents, alerts, severities are required - **Test actions**: User interactions (clicks, hovers, filters, selections) - **Assertions**: Expected outcomes (visibility, counts, content, positions) - **Edge cases**: Special scenarios to verify **Design test flows following Cypress e2e best practices**: + - **Think user journeys**: How would a real user interact with this feature? - **Combine related actions**: Don't split filtering, verification, and interaction into separate tests - **Prefer comprehensive flows**: Each `it()` should test a complete, realistic workflow - **Avoid unit test mindset**: Don't create many tiny isolated tests **Map to existing patterns**: + - Identify which `incidentsPage` elements/methods are needed - Identify any missing page object functionality - Determine fixture requirements @@ -49,14 +53,15 @@ Generate automated regression tests from test documentation in [`docs/incident_d **Naming convention**: `XX-descriptive-name.yaml` (e.g., `13-tooltip-positioning-scenarios.yaml`) **Process**: + 1. Check if appropriate fixture exists for the test requirements 2. If missing, prompt user: ``` Fixture not found for this test scenario. - + Required test data: - [List incidents, alerts, severities needed] - + Should I create a fixture using the generate-incident-fixture command? ``` 3. If user approves, delegate to `generate-incident-fixture` command @@ -70,11 +75,13 @@ Generate automated regression tests from test documentation in [`docs/incident_d **File location**: `web/cypress/e2e/incidents/regression/` **Naming convention**: `XX.reg_.cy.ts` + - Use next available number (check existing files) - Convert section title to kebab-case - Examples: `05.reg_tooltip_positioning.cy.ts`, `06.reg_silence_matching.cy.ts` **File structure**: + ```typescript /* [Brief description of what this test verifies] @@ -84,45 +91,44 @@ 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-page"; const MCP = { - namespace: 'openshift-cluster-observability-operator', - packageName: 'cluster-observability-operator', - operatorName: 'Cluster Observability Operator', + namespace: "openshift-cluster-observability-operator", + packageName: "cluster-observability-operator", + operatorName: "Cluster Observability Operator", config: { - kind: 'UIPlugin', - name: 'monitoring', + kind: "UIPlugin", + name: "monitoring", }, }; const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', + namespace: "openshift-monitoring", + operatorName: "Cluster Monitoring Operator", }; -describe('Regression: [Section Name]', () => { - +describe("Regression: [Section Name]", () => { before(() => { cy.beforeBlockCOO(MCP, MP); }); beforeEach(() => { - cy.log('Navigate to Observe → Incidents'); + cy.log("Navigate to Observe → Incidents"); incidentsPage.goTo(); - cy.log('[Brief description of scenario being loaded]'); - cy.mockIncidentFixture('incident-scenarios/XX-scenario-name.yaml'); + cy.log("[Brief description of scenario being loaded]"); + cy.mockIncidentFixture("incident-scenarios/XX-scenario-name.yaml"); }); - it('1. [First test case description]', () => { - cy.log('1.1 [First step description]'); + it("1. [First test case description]", () => { + cy.log("1.1 [First step description]"); incidentsPage.clearAllFilters(); - - incidentsPage.elements.incidentsChartContainer().should('be.visible'); - incidentsPage.elements.incidentsChartBarsGroups().should('have.length', N); + + incidentsPage.elements.incidentsChartContainer().should("be.visible"); + incidentsPage.elements.incidentsChartBarsGroups().should("have.length", N); cy.pause(); // Manual verification point - - cy.log('1.2 [Second step description]'); + + cy.log("1.2 [Second step description]"); // More test steps with assertions cy.pause(); // Manual verification point @@ -136,6 +142,7 @@ describe('Regression: [Section Name]', () => { Convert manual verification steps from documentation to automated assertions. **IMPORTANT - E2E Test Flow Design**: + - **Combine related steps**: Group filtering, verification, interaction, and results checking in one test - **Test complete workflows**: Each `it()` should tell a complete story of user interaction - **Multiple assertions per test**: Don't split every assertion into a separate test @@ -143,12 +150,14 @@ Convert manual verification steps from documentation to automated assertions. - Tests can be 50-100+ lines if they represent a complete, realistic user workflow **IMPORTANT - Two-Phase Approach**: + - **Initial test generation**: Include `cy.pause()` statements after key setup steps for manual verification - **Purpose**: Allow user to manually verify behavior before adding complex assertions - **User workflow**: User will manually delete `cy.pause()` statements once verified - **Follow-up edits**: Do NOT reintroduce `cy.pause()` if user has already removed them **When to include cy.pause()**: + - Include in newly generated test files - Include when adding new test cases to existing files - Do NOT include if editing existing test cases that already have assertions @@ -156,40 +165,52 @@ Convert manual verification steps from documentation to automated assertions. **Common assertion patterns**: #### Visibility and Existence + ```typescript -incidentsPage.elements.incidentsChartContainer().should('be.visible'); -incidentsPage.elements.incidentsTable().should('not.exist'); +incidentsPage.elements.incidentsChartContainer().should("be.visible"); +incidentsPage.elements.incidentsTable().should("not.exist"); ``` #### Counts and Length + ```typescript -incidentsPage.elements.incidentsChartBarsGroups().should('have.length', 12); -incidentsPage.elements.incidentsDetailsTableRows().should('have.length.greaterThan', 0); +incidentsPage.elements.incidentsChartBarsGroups().should("have.length", 12); +incidentsPage.elements + .incidentsDetailsTableRows() + .should("have.length.greaterThan", 0); ``` #### Text Content + ```typescript -incidentsPage.elements.daysSelectToggle().should('contain.text', '7 days'); -incidentsPage.elements.incidentsTableComponentCell(0) - .invoke('text') - .should('contain', 'monitoring'); +incidentsPage.elements.daysSelectToggle().should("contain.text", "7 days"); +incidentsPage.elements + .incidentsTableComponentCell(0) + .invoke("text") + .should("contain", "monitoring"); ``` #### Conditional Waiting + ```typescript cy.waitUntil( - () => incidentsPage.elements.incidentsChartBarsGroups().then($groups => $groups.length === 12), + () => + incidentsPage.elements + .incidentsChartBarsGroups() + .then(($groups) => $groups.length === 12), { timeout: 10000, interval: 500, - errorMsg: 'All 12 incidents should load within 10 seconds' - } + errorMsg: "All 12 incidents should load within 10 seconds", + }, ); ``` #### Position and Layout Checks + ```typescript -incidentsPage.elements.incidentsChartBarsVisiblePaths() +incidentsPage.elements + .incidentsChartBarsVisiblePaths() .first() .then(($element) => { const rect = $element[0].getBoundingClientRect(); @@ -199,25 +220,28 @@ incidentsPage.elements.incidentsChartBarsVisiblePaths() ``` #### Tooltip Interactions + ```typescript -incidentsPage.elements.incidentsChartBarsVisiblePaths() +incidentsPage.elements + .incidentsChartBarsVisiblePaths() .first() - .trigger('mouseover', { force: true }); + .trigger("mouseover", { force: true }); -cy.get('[role="tooltip"]').should('be.visible'); -cy.get('[role="tooltip"]').should('contain.text', 'Expected content'); +cy.get('[role="tooltip"]').should("be.visible"); +cy.get('[role="tooltip"]').should("contain.text", "Expected content"); ``` #### Filter Chips + ```typescript -incidentsPage.elements.severityFilterChip().should('be.visible'); -incidentsPage.elements.severityFilterChip() - .should('contain.text', 'Critical'); +incidentsPage.elements.severityFilterChip().should("be.visible"); +incidentsPage.elements.severityFilterChip().should("contain.text", "Critical"); ``` ### 6. Page Object Usage **Priority order**: + 1. Use existing `incidentsPage.elements.*` selectors 2. Use existing `incidentsPage.*` methods 3. Suggest adding new elements/methods to page object @@ -226,6 +250,7 @@ incidentsPage.elements.severityFilterChip() **When missing functionality is identified**: Prompt user: + ``` The following elements/methods are needed but not present in incidents-page.ts: @@ -246,38 +271,42 @@ Should I add these to incidents-page.ts? **Page Object Patterns**: -*Element selector*: +_Element selector_: + ```typescript elements: { simpleElement: () => cy.byTestID(DataTestIDs.Component.Element), - - parameterizedElement: (param: string) => + + parameterizedElement: (param: string) => cy.byTestID(`${DataTestIDs.Component.Element}-${param.toLowerCase()}`), - - compositeSelector: () => + + compositeSelector: () => incidentsPage.elements.toolbar().contains('span', 'Category').parent(), } ``` -*Action method*: +_Action method_: + ```typescript actionName: (param: Type) => { - cy.log('incidentsPage.actionName'); + cy.log("incidentsPage.actionName"); incidentsPage.elements.something().click(); - incidentsPage.elements.result().should('be.visible'); -} + incidentsPage.elements.result().should("be.visible"); +}; ``` -*Query method returning Chainable*: +_Query method returning Chainable_: + ```typescript getData: (): Cypress.Chainable => { - cy.log('incidentsPage.getData'); - return incidentsPage.elements.container() - .invoke('text') + cy.log("incidentsPage.getData"); + return incidentsPage.elements + .container() + .invoke("text") .then((text) => { return cy.wrap(processData(text)); }); -} +}; ``` #### 6.5. Type Safety Guidelines @@ -296,6 +325,7 @@ const verifyProperty = (selector: any, value: any) => { ... } ``` **Common Cypress patterns**: + - DOM elements: `Cypress.Chainable>` - Data returns: `Cypress.Chainable` - Actions: `Cypress.Chainable` or omit return type @@ -312,6 +342,7 @@ Handle common failure scenarios gracefully and make reasonable decisions when re **When**: Test documentation is unclear, incomplete, or contradictory. **Actions**: + 1. Check similar test sections and existing regression tests for patterns 2. Make reasonable assumptions based on common UI testing patterns 3. Document assumptions in test comments with TODO markers @@ -323,19 +354,21 @@ Handle common failure scenarios gracefully and make reasonable decisions when re ``` **Example**: + ```typescript // TODO: Documentation unclear on severity filter - assuming 'Critical' based on similar tests -incidentsPage.toggleFilter('Critical'); +incidentsPage.toggleFilter("Critical"); ``` #### 7.3. Fixture Not Found or Multiple Fixtures Match **Scenario A - No fixture exists**: + 1. Search for similar fixtures in `web/cypress/fixtures/incident-scenarios/` 2. Prompt with options: ``` No fixture found. Required: [list requirements] - + Options: 1. Create new fixture (recommended) 2. Modify existing: [list closest matches] @@ -343,6 +376,7 @@ incidentsPage.toggleFilter('Critical'); ``` **Scenario B - Multiple fixtures match**: + 1. Rank by specificity (incident count, severities, components match) 2. Prompt with comparison: ``` @@ -358,6 +392,7 @@ incidentsPage.toggleFilter('Critical'); **When**: Documentation describes behavior differently than existing tests implement. **Actions**: + ``` Conflict detected: @@ -375,12 +410,13 @@ Which to follow? **When**: `incidents-page.ts` not found or structure differs significantly. **Actions**: + 1. Search likely locations: `web/cypress/views/`, `web/cypress/support/page-objects/` 2. If different structure, attempt to adapt 3. If not found: ``` incidents-page.ts not found. - + Options: 1. Provide correct path 2. Use custom selectors (not recommended) @@ -392,6 +428,7 @@ Which to follow? **When**: Element needs DataTestID that doesn't exist in page object. **Actions**: + ``` DataTestID not found: [name] @@ -408,6 +445,7 @@ Which approach? **When**: Test needs scenarios impossible with fixtures (exact timing, external services, animations). **Actions**: + ``` Requirement may not be fully testable with fixtures: "[exact requirement]" @@ -431,6 +469,7 @@ Approaches: 4. **Document workarounds** in comments **Template**: + ``` [Issue] - [Why it matters] @@ -444,12 +483,13 @@ Continue? (y/n/specify) ``` ### 8. Refactoring -**Note on Refactoring**: Initial test generation focuses on functionality and coverage. After manual verification, use the `/refactor-regression-test` command to clean up duplications and improve readability by extracting helper functions. +**Note on Refactoring**: Initial test generation focuses on functionality and coverage. After manual verification, use the `/refactor-regression-test` command to clean up duplications and improve readability by extracting helper functions. ### 9. Validation Before Output **Automated checks (AI should verify):** + - [ ] File naming matches `XX.reg_.cy.ts` - [ ] Standard MCP/MP configuration blocks present - [ ] Uses `cy.beforeBlockCOO(MCP, MP)` in `before()` hook @@ -460,12 +500,14 @@ Continue? (y/n/specify) - [ ] **For new tests**: Includes `cy.pause()` after key verification points **Human judgment (AI provides evidence):** + - [ ] **Tests follow e2e philosophy**: Each `it()` covers a complete user flow Evidence: List test structure, count of `it()` blocks, steps per test - [ ] **Test reads like a story**: Implementation details hidden in helpers Evidence: Show helper functions extracted, test body readability **For complete detailed checklist**, see `incidents-testing-guidelines.mdc` + ## Example Usage ### Example 1: Generate Tooltip Positioning Test @@ -473,6 +515,7 @@ Continue? (y/n/specify) **User Input**: "Generate regression test for Section 2.1: Tooltip Positioning" **AI Actions**: + 1. Parse Section 2.1 from testing_flows_ui.md 2. Identify requirements: - Test tooltip positioning for incidents at different chart positions @@ -496,99 +539,105 @@ Tests both incidents chart and alerts chart tooltip behavior. Verifies: OU-XXX */ -import { incidentsPage } from '../../../views/incidents-page'; +import { incidentsPage } from "../../../views/incidents-page"; const MCP = { - namespace: 'openshift-cluster-observability-operator', - packageName: 'cluster-observability-operator', - operatorName: 'Cluster Observability Operator', + namespace: "openshift-cluster-observability-operator", + packageName: "cluster-observability-operator", + operatorName: "Cluster Observability Operator", config: { - kind: 'UIPlugin', - name: 'monitoring', + kind: "UIPlugin", + name: "monitoring", }, }; const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', + namespace: "openshift-monitoring", + operatorName: "Cluster Monitoring Operator", }; -describe('Regression: Tooltip Positioning', () => { - +describe("Regression: Tooltip Positioning", () => { before(() => { cy.beforeBlockCOO(MCP, MP); }); beforeEach(() => { - cy.log('Navigate to Observe → Incidents'); + cy.log("Navigate to Observe → Incidents"); incidentsPage.goTo(); - cy.log('Loading tooltip positioning test scenarios'); - cy.mockIncidentFixture('incident-scenarios/13-tooltip-positioning-scenarios.yaml'); + cy.log("Loading tooltip positioning test scenarios"); + cy.mockIncidentFixture( + "incident-scenarios/13-tooltip-positioning-scenarios.yaml", + ); }); - it('1. Complete tooltip interaction flow - positioning, content, and navigation', () => { - cy.log('1.1 Verify all incidents loaded'); + it("1. Complete tooltip interaction flow - positioning, content, and navigation", () => { + cy.log("1.1 Verify all incidents loaded"); incidentsPage.clearAllFilters(); - incidentsPage.setDays('7 days'); - incidentsPage.elements.incidentsChartContainer().should('be.visible'); - incidentsPage.elements.incidentsChartBarsGroups().should('have.length', 14); + incidentsPage.setDays("7 days"); + incidentsPage.elements.incidentsChartContainer().should("be.visible"); + incidentsPage.elements.incidentsChartBarsGroups().should("have.length", 14); cy.pause(); // Verify incidents loaded correctly - - cy.log('1.2 Test bottom bar tooltip positioning'); - incidentsPage.elements.incidentsChartBarsVisiblePaths() + + cy.log("1.2 Test bottom bar tooltip positioning"); + incidentsPage.elements + .incidentsChartBarsVisiblePaths() .first() - .trigger('mouseover', { force: true }); - - cy.get('[role="tooltip"]').should('be.visible'); + .trigger("mouseover", { force: true }); + + cy.get('[role="tooltip"]').should("be.visible"); cy.get('[role="tooltip"]').then(($tooltip) => { const tooltipRect = $tooltip[0].getBoundingClientRect(); expect(tooltipRect.top).to.be.greaterThan(0); expect(tooltipRect.left).to.be.greaterThan(0); }); cy.pause(); // Verify bottom tooltip positioning - - cy.log('1.3 Test middle bar tooltip and verify content'); - incidentsPage.elements.incidentsChartBarsVisiblePaths() + + cy.log("1.3 Test middle bar tooltip and verify content"); + incidentsPage.elements + .incidentsChartBarsVisiblePaths() .eq(7) - .trigger('mouseover', { force: true }); - - cy.get('[role="tooltip"]').should('be.visible'); - cy.get('[role="tooltip"]').should('contain.text', 'Incident'); + .trigger("mouseover", { force: true }); + + cy.get('[role="tooltip"]').should("be.visible"); + cy.get('[role="tooltip"]').should("contain.text", "Incident"); cy.pause(); // Verify middle tooltip - - cy.log('1.4 Test top bar tooltip positioning'); - incidentsPage.elements.incidentsChartBarsVisiblePaths() + + cy.log("1.4 Test top bar tooltip positioning"); + incidentsPage.elements + .incidentsChartBarsVisiblePaths() .last() - .trigger('mouseover', { force: true }); - - cy.get('[role="tooltip"]').should('be.visible'); + .trigger("mouseover", { force: true }); + + cy.get('[role="tooltip"]').should("be.visible"); cy.get('[role="tooltip"]').then(($tooltip) => { const tooltipRect = $tooltip[0].getBoundingClientRect(); const viewportHeight = Cypress.$(window).height(); expect(tooltipRect.bottom).to.be.lessThan(viewportHeight); }); cy.pause(); // Verify top tooltip positioning - - cy.log('1.5 Hover over multi-component incident and verify content'); - incidentsPage.elements.incidentsChartBarsVisiblePaths() + + cy.log("1.5 Hover over multi-component incident and verify content"); + incidentsPage.elements + .incidentsChartBarsVisiblePaths() .eq(3) - .trigger('mouseover', { force: true }); - + .trigger("mouseover", { force: true }); + cy.get('[role="tooltip"]') - .should('be.visible') - .should('contain.text', 'network') - .should('contain.text', 'compute') - .should('contain.text', 'storage'); + .should("be.visible") + .should("contain.text", "network") + .should("contain.text", "compute") + .should("contain.text", "storage"); cy.pause(); // Verify multi-component tooltip content - - cy.log('1.6 Click incident bar and verify details panel opens'); + + cy.log("1.6 Click incident bar and verify details panel opens"); incidentsPage.elements.incidentsChartBarsVisiblePaths().eq(3).click(); - incidentsPage.elements.incidentsDetailsPanel().should('be.visible'); - incidentsPage.elements.incidentsDetailsTableRows() - .should('have.length.greaterThan', 0); + incidentsPage.elements.incidentsDetailsPanel().should("be.visible"); + incidentsPage.elements + .incidentsDetailsTableRows() + .should("have.length.greaterThan", 0); cy.pause(); // Verify details panel - - cy.log('Verified: Complete tooltip interaction and navigation workflow'); + + cy.log("Verified: Complete tooltip interaction and navigation workflow"); }); }); ``` @@ -600,6 +649,7 @@ describe('Regression: Tooltip Positioning', () => { **User Input**: "Generate regression test for Section 1: Filtering Bugs" **AI Actions**: + 1. Parse Section 1 from testing_flows_ui.md 2. Note: Fixture `7-comprehensive-filtering-test-scenarios.yaml` already exists 3. **Design comprehensive flow**: Instead of separate tests for each filter type, create complete filtering workflows @@ -611,9 +661,10 @@ describe('Regression: Tooltip Positioning', () => { ## Output Format Provide: + 1. **Test file path and name**: Full path to generated test file 2. **Test file content**: Complete TypeScript test file -3. **Fixture status**: +3. **Fixture status**: - If existing: "Using fixture: incident-scenarios/X-name.yaml" - If new: "Created fixture: incident-scenarios/X-name.yaml" + YAML content 4. **Page object changes**: If any elements/methods need to be added, list them with implementation @@ -636,8 +687,7 @@ Provide: ## Workflow **Recommended workflow**: + 1. Use this command to generate initial test from documentation 2. Manually verify the test works (using `cy.pause()` points) 3. Once verified, use `/refactor-regression-test` to clean up and improve code quality - - 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 d8f69e29d..749a604e9 100644 --- a/docs/incident_detection/tests/performance/03.endurance_test_source.md +++ b/docs/incident_detection/tests/performance/03.endurance_test_source.md @@ -5,21 +5,21 @@ 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-page"; const MCP = { - namespace: Cypress.env('COO_NAMESPACE'), - packageName: 'cluster-observability-operator', - operatorName: 'Cluster Observability Operator', + namespace: Cypress.env("COO_NAMESPACE"), + packageName: "cluster-observability-operator", + operatorName: "Cluster Observability Operator", config: { - kind: 'UIPlugin', - name: 'monitoring', + kind: "UIPlugin", + name: "monitoring", }, }; const MP = { - namespace: 'openshift-monitoring', - operatorName: 'Cluster Monitoring Operator', + namespace: "openshift-monitoring", + operatorName: "Cluster Monitoring Operator", }; const INCIDENT_COUNT = 20; @@ -27,126 +27,147 @@ const CYCLES_PER_INCIDENT = 5; const TOTAL_CYCLES = INCIDENT_COUNT * CYCLES_PER_INCIDENT; const DEGRADATION_FACTOR = 5; -const INCIDENT_IDS = Array.from({ length: INCIDENT_COUNT }, (_, i) => - `bench-${String(i + 1).padStart(2, '0')}`, +const INCIDENT_IDS = Array.from( + { length: INCIDENT_COUNT }, + (_, i) => `bench-${String(i + 1).padStart(2, "0")}`, ); -const TRACKED_AVERAGE = 'bench-01'; -const TRACKED_HEAVIEST = 'bench-03'; - -describe('Performance: Endurance - Select/Deselect Cycling', { tags: ['@incidents', '@performance', '@endurance'] }, () => { - - before(() => { - cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false }); - }); - - it('8.1 Endurance: Incident select/deselect cycling across 20 incidents', () => { - cy.mockIncidentFixture('incident-scenarios/22-benchmark-20-incidents.yaml'); - incidentsPage.clearAllFilters(); - incidentsPage.setDays('1 day'); - incidentsPage.elements.incidentsChartBarsGroups() - .should('have.length', 20); - - const cycleTimes: number[] = []; - const trackedTimes: Record = { - [TRACKED_AVERAGE]: [], - [TRACKED_HEAVIEST]: [], - }; - - const sum = (arr: number[]) => arr.reduce((a, b) => a + b, 0); - const avg = (arr: number[]) => Math.round(sum(arr) / arr.length); - - const logTrackedSnapshot = (label: string) => { - const lines: string[] = [label]; - for (const [id, times] of Object.entries(trackedTimes)) { - if (times.length === 0) continue; - lines.push( - ` ${id} (${times.length} cycles): avg ${avg(times)}ms, last ${times[times.length - 1]}ms`, - ); - } - lines.forEach((line) => { - cy.log(line); - cy.task('log', line); +const TRACKED_AVERAGE = "bench-01"; +const TRACKED_HEAVIEST = "bench-03"; + +describe( + "Performance: Endurance - Select/Deselect Cycling", + { tags: ["@cluster-health-analyzer"] }, + () => { + before(() => { + cy.beforeBlockCOO(MCP, MP, { + dashboards: false, + troubleshootingPanel: false, }); - }; - - cy.window({ log: false }).then((win) => { - win.performance.clearMarks('endurance-start'); - win.performance.mark('endurance-start'); }); - const runCycle = (cycleIndex: number) => { - if (cycleIndex >= TOTAL_CYCLES) return; - - const incidentId = INCIDENT_IDS[cycleIndex % INCIDENT_IDS.length]; - const cycleMark = `cycle-${cycleIndex}`; + it("8.1 Endurance: Incident select/deselect cycling across 20 incidents", () => { + cy.mockIncidentFixture( + "incident-scenarios/22-benchmark-20-incidents.yaml", + ); + incidentsPage.clearAllFilters(); + incidentsPage.setDays("1 day"); + incidentsPage.elements + .incidentsChartBarsGroups() + .should("have.length", 20); + + const cycleTimes: number[] = []; + const trackedTimes: Record = { + [TRACKED_AVERAGE]: [], + [TRACKED_HEAVIEST]: [], + }; + + const sum = (arr: number[]) => arr.reduce((a, b) => a + b, 0); + const avg = (arr: number[]) => Math.round(sum(arr) / arr.length); + + const logTrackedSnapshot = (label: string) => { + const lines: string[] = [label]; + for (const [id, times] of Object.entries(trackedTimes)) { + if (times.length === 0) continue; + lines.push( + ` ${id} (${times.length} cycles): avg ${avg(times)}ms, last ${times[times.length - 1]}ms`, + ); + } + lines.forEach((line) => { + cy.log(line); + cy.task("log", line); + }); + }; cy.window({ log: false }).then((win) => { - win.performance.mark(cycleMark); + win.performance.clearMarks("endurance-start"); + win.performance.mark("endurance-start"); }); - incidentsPage.selectIncidentById(incidentId); - incidentsPage.elements.alertsChartCard().should('be.visible'); - - incidentsPage.deselectIncidentById(incidentId); + const runCycle = (cycleIndex: number) => { + if (cycleIndex >= TOTAL_CYCLES) return; + + const incidentId = INCIDENT_IDS[cycleIndex % INCIDENT_IDS.length]; + const cycleMark = `cycle-${cycleIndex}`; + + cy.window({ log: false }).then((win) => { + win.performance.mark(cycleMark); + }); + + incidentsPage.selectIncidentById(incidentId); + incidentsPage.elements.alertsChartCard().should("be.visible"); + + incidentsPage.deselectIncidentById(incidentId); + + cy.window({ log: false }).then((win) => { + const measure = win.performance.measure( + `${cycleMark}-measure`, + cycleMark, + ); + const elapsed = Math.round(measure.duration); + cycleTimes.push(elapsed); + + if (incidentId in trackedTimes) { + trackedTimes[incidentId].push(elapsed); + } + + if ((cycleIndex + 1) % 20 === 0 || cycleIndex === 0) { + const totalMeasure = win.performance.measure( + "endurance-progress", + "endurance-start", + ); + const totalElapsed = Math.round(totalMeasure.duration / 1000); + win.performance.clearMeasures("endurance-progress"); + const msg = `Cycle ${cycleIndex + 1}/${TOTAL_CYCLES} [${incidentId}]: ${elapsed}ms (${totalElapsed}s elapsed)`; + cy.log(msg); + cy.task("log", msg); + logTrackedSnapshot("--- Tracked incidents snapshot ---"); + } + }); + + cy.then(() => { + runCycle(cycleIndex + 1); + }); + }; + + runCycle(0); cy.window({ log: false }).then((win) => { - const measure = win.performance.measure(`${cycleMark}-measure`, cycleMark); - const elapsed = Math.round(measure.duration); - cycleTimes.push(elapsed); - - if (incidentId in trackedTimes) { - trackedTimes[incidentId].push(elapsed); - } - - if ((cycleIndex + 1) % 20 === 0 || cycleIndex === 0) { - const totalMeasure = win.performance.measure('endurance-progress', 'endurance-start'); - const totalElapsed = Math.round(totalMeasure.duration / 1000); - win.performance.clearMeasures('endurance-progress'); - const msg = `Cycle ${cycleIndex + 1}/${TOTAL_CYCLES} [${incidentId}]: ${elapsed}ms (${totalElapsed}s elapsed)`; - cy.log(msg); - cy.task('log', msg); - logTrackedSnapshot('--- Tracked incidents snapshot ---'); - } - }); - - cy.then(() => { runCycle(cycleIndex + 1); }); - }; - - runCycle(0); - - cy.window({ log: false }).then((win) => { - const totalMeasure = win.performance.measure('endurance-total', 'endurance-start'); - const totalElapsed = totalMeasure.duration; - - const min = Math.min(...cycleTimes); - const max = Math.max(...cycleTimes); - const mean = avg(cycleTimes); - const first10Avg = avg(cycleTimes.slice(0, 10)); - const last10Avg = avg(cycleTimes.slice(-10)); - - const summary = [ - `=== ENDURANCE TEST SUMMARY ===`, - `Total cycles: ${cycleTimes.length}`, - `Total time: ${Math.round(totalElapsed / 1000)}s`, - `Cycle times - min: ${min}ms, max: ${max}ms, avg: ${mean}ms`, - `First 10 avg: ${first10Avg}ms`, - `Last 10 avg: ${last10Avg}ms`, - `Degradation ratio: ${(last10Avg / first10Avg).toFixed(2)}x (threshold: ${DEGRADATION_FACTOR}x)`, - ]; - - summary.forEach((line) => { - cy.log(line); - cy.task('log', line); + const totalMeasure = win.performance.measure( + "endurance-total", + "endurance-start", + ); + const totalElapsed = totalMeasure.duration; + + const min = Math.min(...cycleTimes); + const max = Math.max(...cycleTimes); + const mean = avg(cycleTimes); + const first10Avg = avg(cycleTimes.slice(0, 10)); + const last10Avg = avg(cycleTimes.slice(-10)); + + const summary = [ + `=== ENDURANCE TEST SUMMARY ===`, + `Total cycles: ${cycleTimes.length}`, + `Total time: ${Math.round(totalElapsed / 1000)}s`, + `Cycle times - min: ${min}ms, max: ${max}ms, avg: ${mean}ms`, + `First 10 avg: ${first10Avg}ms`, + `Last 10 avg: ${last10Avg}ms`, + `Degradation ratio: ${(last10Avg / first10Avg).toFixed(2)}x (threshold: ${DEGRADATION_FACTOR}x)`, + ]; + + summary.forEach((line) => { + cy.log(line); + cy.task("log", line); + }); + + logTrackedSnapshot("=== TRACKED INCIDENTS FINAL ==="); + + expect( + last10Avg, + `Last 10 cycles avg (${last10Avg}ms) should not exceed ${DEGRADATION_FACTOR}x first 10 avg (${first10Avg}ms)`, + ).to.be.lessThan(first10Avg * DEGRADATION_FACTOR); }); - - logTrackedSnapshot('=== TRACKED INCIDENTS FINAL ==='); - - expect( - last10Avg, - `Last 10 cycles avg (${last10Avg}ms) should not exceed ${DEGRADATION_FACTOR}x first 10 avg (${first10Avg}ms)`, - ).to.be.lessThan(first10Avg * DEGRADATION_FACTOR); }); - }); -}); + }, +); ``` diff --git a/web/cypress/README.md b/web/cypress/README.md index 8d1213d41..2bec51cbe 100644 --- a/web/cypress/README.md +++ b/web/cypress/README.md @@ -49,14 +49,17 @@ source ./configure-env.sh ``` **Features**: -- Automatic prompting for all CYPRESS_ variables + +- Automatic prompting for all CYPRESS\_ variables - Automatic discovery and numbered selection of `*kubeconfig*` files in `$HOME/Downloads` - Validates required variables **Alternative - Generate Export File**: + ```bash ./configure-env.sh ``` + Creates `export-env.sh` that you can source later: `source export-env.sh` --- @@ -67,24 +70,24 @@ All scenarios require the [standard variables](#required-variables) (`CYPRESS_BA ### General Scenarios -| Scenario | Key Variables | Description | -|----------|---------------|-------------| -| **Released Version** | `CYPRESS_COO_UI_INSTALL=true` | Install operators from redhat-operators catalog. Production-like testing. | -| **Pre-provisioned COO** | `CYPRESS_SKIP_COO_INSTALL=true`, optionally `CYPRESS_COO_NAMESPACE=` | COO already installed. Tests still enable the monitoring plugin. Specify namespace if non-default. | -| **Pre-provisioned Virtualization** | `CYPRESS_SKIP_KBV_INSTALL=true` | OpenShift Virtualization already installed. | -| **Local Dev / PR Testing** | `CYPRESS_SKIP_ALL_INSTALL=true` | Run UI locally via `make start-feature-frontend` ([details](../../README.md#development)). Skips all setup. | -| **Custom Images** | `CYPRESS_MP_IMAGE`, `CYPRESS_MCP_CONSOLE_IMAGE`, `CYPRESS_CHA_IMAGE`, `CYPRESS_CUSTOM_COO_BUNDLE_IMAGE` | Patch component images in the CSV, or replace the operator bundle. Combine with an installation method above. | -| **FBC Image** | `CYPRESS_FBC_STAGE_COO_IMAGE` | Install COO from File-Based Catalog image. For release validation. | -| **Konflux CI Bundle** | `CYPRESS_KONFLUX_COO_BUNDLE_IMAGE=` | Install COO from Konflux CI bundle. For PR/CI testing. | +| Scenario | Key Variables | Description | +| ---------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| **Released Version** | `CYPRESS_COO_UI_INSTALL=true` | Install operators from redhat-operators catalog. Production-like testing. | +| **Pre-provisioned COO** | `CYPRESS_SKIP_COO_INSTALL=true`, optionally `CYPRESS_COO_NAMESPACE=` | COO already installed. Tests still enable the monitoring plugin. Specify namespace if non-default. | +| **Pre-provisioned Virtualization** | `CYPRESS_SKIP_KBV_INSTALL=true` | OpenShift Virtualization already installed. | +| **Local Dev / PR Testing** | `CYPRESS_SKIP_ALL_INSTALL=true` | Run UI locally via `make start-feature-frontend` ([details](../../README.md#development)). Skips all setup. | +| **Custom Images** | `CYPRESS_MP_IMAGE`, `CYPRESS_MCP_CONSOLE_IMAGE`, `CYPRESS_CHA_IMAGE`, `CYPRESS_CUSTOM_COO_BUNDLE_IMAGE` | Patch component images in the CSV, or replace the operator bundle. Combine with an installation method above. | +| **FBC Image** | `CYPRESS_FBC_STAGE_COO_IMAGE` | Install COO from File-Based Catalog image. For release validation. | +| **Konflux CI Bundle** | `CYPRESS_KONFLUX_COO_BUNDLE_IMAGE=` | Install COO from Konflux CI bundle. For PR/CI testing. | ### Test Areas -| Area | Description | Run Command | -|------|-------------|-------------| -| **Monitoring (CMO)** | Core monitoring tests against CMO stack. No additional operator installation needed. | `npm run test-cypress-monitoring` | -| **COO (Perses, Dashboards, Incidents)** | Requires COO installation. | `npm run test-cypress-coo` | -| **Incidents** | COO subset. Set `CYPRESS_TIMEZONE` to match cluster timezone. | `npm run test-cypress-incidents` | -| **Virtualization** | Requires OpenShift Virtualization (KubeVirt) installation. | `npm run test-cypress-virtualization` | +| Area | Description | Run Command | +| --------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------- | +| **Monitoring (CMO)** | Core monitoring tests against CMO stack. No additional operator installation needed. | `npm run test-cypress-monitoring` | +| **COO (Perses, Dashboards, Incidents)** | Requires COO installation. | `npm run test-cypress-coo` | +| **Incidents** | COO subset. Set `CYPRESS_TIMEZONE` to match cluster timezone. | `npm run test-cypress-incidents` | +| **Virtualization** | Requires OpenShift Virtualization (KubeVirt) installation. | `npm run test-cypress-virtualization` | --- @@ -92,65 +95,66 @@ All scenarios require the [standard variables](#required-variables) (`CYPRESS_BA ### Required Variables -| Variable | Description | Example | -|----------|-------------|---------| -| `CYPRESS_BASE_URL` | OpenShift Console URL | `https://console-openshift-console.apps...` | -| `CYPRESS_LOGIN_IDP` | Identity provider name | `flexy-htpasswd-provider` or `kube:admin` | -| `CYPRESS_LOGIN_IDP_DEV_USER`| Identity provider name for devuser | `flexy-htpasswd-provider` or `my_htpasswd_provider`| -| `CYPRESS_LOGIN_USERS` | Login credentials | `username:password` or `kubeadmin:password` or `kubeadmin:password,user1:password,user2:password` | -| `CYPRESS_KUBECONFIG_PATH` | Path to kubeconfig file | `~/Downloads/kubeconfig` | +| Variable | Description | Example | +| ---------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------- | +| `CYPRESS_BASE_URL` | OpenShift Console URL | `https://console-openshift-console.apps...` | +| `CYPRESS_LOGIN_IDP` | Identity provider name | `flexy-htpasswd-provider` or `kube:admin` | +| `CYPRESS_LOGIN_IDP_DEV_USER` | Identity provider name for devuser | `flexy-htpasswd-provider` or `my_htpasswd_provider` | +| `CYPRESS_LOGIN_USERS` | Login credentials | `username:password` or `kubeadmin:password` or `kubeadmin:password,user1:password,user2:password` | +| `CYPRESS_KUBECONFIG_PATH` | Path to kubeconfig file | `~/Downloads/kubeconfig` | ### Plugin Image Configuration -| Variable | Description | Use Case | -|----------|-------------|----------| -| `CYPRESS_MP_IMAGE` | Custom Monitoring Plugin image | Testing custom MP builds | +| Variable | Description | Use Case | +| --------------------------- | -------------------------------------- | ------------------------- | +| `CYPRESS_MP_IMAGE` | Custom Monitoring Plugin image | Testing custom MP builds | | `CYPRESS_MCP_CONSOLE_IMAGE` | Custom Monitoring Console Plugin image | Testing custom MCP builds | -| `CYPRESS_CHA_IMAGE` | Custom cluster-health-analyzer image | Testing custom CHA builds | +| `CYPRESS_CHA_IMAGE` | Custom cluster-health-analyzer image | Testing custom CHA builds | ### Operator Installation Control -| Variable | Default | Description | -|----------|---------|-------------| -| `CYPRESS_SKIP_COO_INSTALL` | `false` | Skip Cluster Observability Operator installation | -| `CYPRESS_SKIP_KBV_INSTALL` | `false` | Skip OpenShift Virtualization installation | +| Variable | Default | Description | +| -------------------------- | ------- | -------------------------------------------------------------- | +| `CYPRESS_SKIP_COO_INSTALL` | `false` | Skip Cluster Observability Operator installation | +| `CYPRESS_SKIP_KBV_INSTALL` | `false` | Skip OpenShift Virtualization installation | | `CYPRESS_SKIP_ALL_INSTALL` | `false` | Skip all operator installations (for pre-provisioned clusters) | -| `CYPRESS_COO_UI_INSTALL` | `false` | Install COO from redhat-operators catalog | -| `CYPRESS_KBV_UI_INSTALL` | `false` | Install Virtualization from redhat-operators catalog | +| `CYPRESS_COO_UI_INSTALL` | `false` | Install COO from redhat-operators catalog | +| `CYPRESS_KBV_UI_INSTALL` | `false` | Install Virtualization from redhat-operators catalog | ### Bundle Images -| Variable | Description | -|----------|-------------| -| `CYPRESS_KONFLUX_COO_BUNDLE_IMAGE` | COO bundle image from Konflux | -| `CYPRESS_CUSTOM_COO_BUNDLE_IMAGE` | Custom COO bundle image | +| Variable | Description | +| ---------------------------------- | ---------------------------------------- | +| `CYPRESS_KONFLUX_COO_BUNDLE_IMAGE` | COO bundle image from Konflux | +| `CYPRESS_CUSTOM_COO_BUNDLE_IMAGE` | Custom COO bundle image | | `CYPRESS_KONFLUX_KBV_BUNDLE_IMAGE` | Virtualization bundle image from Konflux | -| `CYPRESS_CUSTOM_KBV_BUNDLE_IMAGE` | Custom Virtualization bundle image | +| `CYPRESS_CUSTOM_KBV_BUNDLE_IMAGE` | Custom Virtualization bundle image | ### FBC images -| Variable | Description | -|----------|-------------| +| Variable | Description | +| ----------------------------- | ---------------------------------------- | | `CYPRESS_FBC_STAGE_COO_IMAGE` | Cluster Observability Operator FBC image | -| `CYPRESS_FBC_STAGE_KBV_IMAGE` | Virtualization FBC image | +| `CYPRESS_FBC_STAGE_KBV_IMAGE` | Virtualization FBC image | ### Testing Configuration -| Variable | Default | Description | -|----------|---------|-------------| +| Variable | Default | Description | +| ----------------- | ------- | ---------------------------------------------- | | `CYPRESS_SESSION` | `false` | Enable session management for faster execution | -| `CYPRESS_DEBUG` | `false` | Enable debug mode logging in headless mode | +| `CYPRESS_DEBUG` | `false` | Enable debug mode logging in headless mode | ### Incidents Testing Configuration **Used primarily for Incidents feature testing:** -| Variable | Default | Description | -|----------|---------|-------------| -| `CYPRESS_TIMEZONE` | `UTC` | Cluster timezone for incident timeline calculations | +| Variable | Default | Description | +| -------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- | +| `CYPRESS_TIMEZONE` | `UTC` | Cluster timezone for incident timeline calculations | | `CYPRESS_MOCK_NEW_METRICS` | `false` | Transform old metric names to new format in mocks (temporary workaround for testing against locally built instances) | **Example:** + ```bash export CYPRESS_TIMEZONE="America/New_York" export CYPRESS_MOCK_NEW_METRICS=true @@ -211,6 +215,7 @@ Tests are organized using tags for selective execution using [@cypress/grep](htt #### Tag Categories **1. Basic Tags:** + - `@smoke` - Fast BVT tests - `@demo` - Interactive demo tests (no assertions, skipped in CI) - `@flaky` - Tests that don't pass reliably @@ -218,25 +223,24 @@ Tests are organized using tags for selective execution using [@cypress/grep](htt - `@slow` - Long-running e2e tests (15+ minutes) **2. High-Level Component Tags:** -- `@monitoring` - Monitoring plugin tests -- `@coo` - Cluster Observability Operator functionality tests (operator installation, ACM integration) -- `@virtualization` - Virtualization integration tests -- `@alerts` - Alert-related tests -- `@metrics` - Metrics-related tests -- `@dashboards` - Dashboard-related tests (includes Perses) - -**3. Specific Feature Tags** (format: `@{component}-{label}`): -- Example: `@incidents-redux` -- Add specific feature tags as needed + +- `@acm-alerting` - Alert-related tests in ACM perspective +- `@alerting` - Alert-related tests +- `@legacy-dashboards` - Legacy dashboard tests +- `@metrics` - Metrics explorer tests +- `@targets` - Targets tests +- `@perses-dashboards` - Perses dashboard tests - `@cluster-health-analyzer` - Incidents feature tests -**4. JIRA Tags** (format: `@JIRA-{ID}`): +**3. JIRA Tags** (format: `@JIRA-{ID}`): + - Example: `@JIRA-OU-1033` - Link tests to specific JIRA issues #### Running Tests by Tags **Run smoke tests (BVT):** + ```bash npx cypress run --env grepTags=@smoke # or @@ -244,11 +248,13 @@ npm run test-cypress-smoke ``` **Run regression tests (all non-smoke tests):** + ```bash npx cypress run --env grepTags="--@smoke --@flaky --@demo" ``` **Run component-specific tests:** + ```bash npm run test-cypress-monitoring # All monitoring tests npm run test-cypress-incidents # All incidents tests @@ -260,39 +266,44 @@ npm run test-cypress-dashboards # All dashboards tests (includes Perses) ``` **Run smoke tests for specific component:** + ```bash npm run test-cypress-monitoring-bvt # Monitoring smoke tests npm run test-cypress-coo-bvt # COO smoke tests ``` **Run regression for specific component:** + ```bash npm run test-cypress-monitoring-regression # All monitoring except smoke ``` **Run tests with multiple tags (OR logic):** + ```bash npx cypress run --env grepTags="@smoke @slow" ``` **Run tests with BOTH tags (AND logic):** + ```bash npx cypress run --env grepTags="@smoke+@cluster-health-analyzer" ``` **Complex filtering:** + ```bash npx cypress run --env grepTags="@cluster-health-analyzer --@slow --@flaky" ``` --- - ## Test Results ### Videos Test recordings are saved automatically: + - **Location**: `web/cypress/videos/` - **Format**: `.mp4` - **Generated**: For all test runs (pass or fail) @@ -300,6 +311,7 @@ Test recordings are saved automatically: ### Screenshots Screenshots captured on test failures: + - **Location**: `web/cypress/screenshots/` - **Format**: `.png` - **Generated**: Only on failures @@ -311,6 +323,7 @@ Screenshots captured on test failures: ### Issue: Cypress Cannot Find Chrome/Browser **Solution**: Install Chrome or specify browser + ```bash npm run cypress:open --browser firefox ``` @@ -319,7 +332,8 @@ npm run cypress:open --browser firefox **Symptoms**: Tests fail with "BASE_URL is not defined" -**Solution**: +**Solution**: + 1. Verify variables are exported: `echo $CYPRESS_BASE_URL` 2. Re-run configuration: `source ./configure-env.sh` 3. Ensure you're in the correct shell session @@ -329,6 +343,7 @@ npm run cypress:open --browser firefox **Symptoms**: "ENOENT: no such file or directory" **Solution**: + ```bash # Check file exists ls -la $CYPRESS_KUBECONFIG_PATH @@ -342,6 +357,7 @@ export CYPRESS_KUBECONFIG_PATH=/correct/path/to/kubeconfig **Symptoms**: "User authentication failed" **Solution**: + 1. Verify IDP name: Check OpenShift OAuth configuration 2. Verify credentials are correct 3. For kubeadmin, use `kube:admin` as IDP @@ -349,6 +365,7 @@ export CYPRESS_KUBECONFIG_PATH=/correct/path/to/kubeconfig ### Issue: Tests Are Slow **Solution**: Enable session management + ```bash export CYPRESS_SESSION=true ``` @@ -416,10 +433,10 @@ For configuration scenarios, see [COO Tests](#test-configuration-scenarios) abov ### Incidents-Specific Variables -| Variable | Default | Description | -|----------|---------|-------------| -| `CYPRESS_TIMEZONE` | `UTC` | Cluster timezone for incident timeline calculations | -| `CYPRESS_MOCK_NEW_METRICS` | `false` | Transform old metric names to new format in mocks | +| Variable | Default | Description | +| -------------------------- | ------- | --------------------------------------------------- | +| `CYPRESS_TIMEZONE` | `UTC` | Cluster timezone for incident timeline calculations | +| `CYPRESS_MOCK_NEW_METRICS` | `false` | Transform old metric names to new format in mocks | ### Test Case Documentation @@ -427,4 +444,4 @@ Detailed test documentation: [`docs/incident_detection/tests/`](../../docs/incid --- -*For questions about test architecture, creating tests, or testing workflows, refer to [CYPRESS_TESTING_GUIDE.md](CYPRESS_TESTING_GUIDE.md)* +_For questions about test architecture, creating tests, or testing workflows, refer to [CYPRESS_TESTING_GUIDE.md](CYPRESS_TESTING_GUIDE.md)_ diff --git a/web/cypress/e2e/coo/01.coo_bvt.cy.ts b/web/cypress/e2e/coo/01.coo_bvt.cy.ts index 53e9f41e7..e58d47378 100644 --- a/web/cypress/e2e/coo/01.coo_bvt.cy.ts +++ b/web/cypress/e2e/coo/01.coo_bvt.cy.ts @@ -18,7 +18,7 @@ const MP = { operatorName: 'Cluster Monitoring Operator', }; -describe('BVT: COO', { tags: ['@smoke', '@coo'] }, () => { +describe('BVT: COO', { tags: ['@alerting', '@acm-alerting'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP); }); diff --git a/web/cypress/e2e/coo/01.coo_ivt.cy.ts b/web/cypress/e2e/coo/01.coo_ivt.cy.ts index 48f5d48c8..61d0d6015 100644 --- a/web/cypress/e2e/coo/01.coo_ivt.cy.ts +++ b/web/cypress/e2e/coo/01.coo_ivt.cy.ts @@ -16,7 +16,7 @@ const KBV = { }, }; -describe('IVT: Monitoring UIPlugin + Virtualization', { tags: ['@smoke', '@coo'] }, () => { +describe('IVT: Monitoring UIPlugin + Virtualization', { tags: ['@alerting'] }, () => { before(() => { cy.beforeBlockVirtualization(KBV); }); diff --git a/web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts b/web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts index a4e712a07..f4b3e26a6 100644 --- a/web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts +++ b/web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts @@ -24,7 +24,7 @@ const MP = { }; const expectedAlerts = ['Watchdog', 'Watchdog-spoke', 'ClusterCPUHealth-jb']; -describe('ACM Alerting UI', { tags: ['@coo', '@alerts', '@acm'] }, () => { +describe('ACM Alerting UI', { tags: ['@alerting', '@acm-alerting'] }, () => { before(() => { cy.beforeBlockACM(MCP, MP); }); diff --git a/web/cypress/e2e/coo/03.coo_lightspeed_show_timeseries.cy.ts b/web/cypress/e2e/coo/03.coo_lightspeed_show_timeseries.cy.ts index 808b080d9..f93101859 100644 --- a/web/cypress/e2e/coo/03.coo_lightspeed_show_timeseries.cy.ts +++ b/web/cypress/e2e/coo/03.coo_lightspeed_show_timeseries.cy.ts @@ -36,7 +36,7 @@ const SEL = { * Prerequisites: COO and OLS operators must be pre-installed. * Only authentication is needed — operator lifecycle is not managed here. */ -describe('COO-LightSpeed: show_timeseries', { tags: ['@ols'] }, () => { +describe('COO-LightSpeed: show_timeseries', { tags: ['@perses-dashboards'] }, () => { before(() => { operatorAuthUtils.loginAndAuth(); cy.visit('/'); @@ -58,7 +58,9 @@ describe('COO-LightSpeed: show_timeseries', { tags: ['@ols'] }, () => { ).then(() => { // Fallback: delete any dashboard whose CR name matches the display name pattern cy.exec( - `oc get persesdashboard -n ${DASHBOARD_PROJECT} -o name --kubeconfig ${Cypress.env('KUBECONFIG_PATH')}`, + `oc get persesdashboard -n ${DASHBOARD_PROJECT} -o name --kubeconfig ${Cypress.env( + 'KUBECONFIG_PATH', + )}`, { failOnNonZeroExit: false }, ).then((result) => { if (result.stdout) { diff --git a/web/cypress/e2e/monitoring/00.bvt_admin.cy.ts b/web/cypress/e2e/monitoring/00.bvt_admin.cy.ts index b082cab6b..7c2445512 100644 --- a/web/cypress/e2e/monitoring/00.bvt_admin.cy.ts +++ b/web/cypress/e2e/monitoring/00.bvt_admin.cy.ts @@ -9,70 +9,74 @@ const MP = { operatorName: 'Cluster Monitoring Operator', }; -describe('BVT: Monitoring', { tags: ['@smoke', '@monitoring'] }, () => { - before(() => { - cy.beforeBlock(MP); - }); +describe( + 'BVT: Monitoring', + { tags: ['@alerting', '@legacy-dashboards', '@metrics', '@targets'] }, + () => { + before(() => { + cy.beforeBlock(MP); + }); - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace('All Projects'); - alerts.getWatchdogAlert(); - nav.sidenav.clickNavLink(['Observe', 'Alerting']); - commonPages.titleShouldHaveText('Alerting'); - alerts.getWatchdogAlert(); - }); + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + alerts.getWatchdogAlert(); + nav.sidenav.clickNavLink(['Observe', 'Alerting']); + commonPages.titleShouldHaveText('Alerting'); + alerts.getWatchdogAlert(); + }); - it(`1. Admin perspective - Observe Menu`, () => { - cy.log(`Admin perspective - Observe Menu and verify all submenus`); - nav.sidenav.clickNavLink(['Administration', 'Cluster Settings']); - commonPages.detailsPage.administration_clusterSettings(); - nav.sidenav.clickNavLink(['Observe', 'Alerting']); - commonPages.titleShouldHaveText('Alerting'); - nav.tabs.switchTab('Silences'); - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - nav.sidenav.clickNavLink(['Observe', 'Dashboards']); - commonPages.titleShouldHaveText('Dashboards'); - nav.sidenav.clickNavLink(['Observe', 'Targets']); - commonPages.titleShouldHaveText('Metrics targets'); - }); - // TODO: Intercept Bell GET request to inject an alert (Watchdog to have it opened in - // Alert Details page?) - // it('Admin perspective - Bell > Alert details > Alerting rule details > Metrics flow', () => { - // cy.visit('/'); - // commonPages.clickBellIcon(); - // commonPages.bellIconClickAlert('TargetDown'); - // commonPages.titleShouldHaveText('TargetDown') + it(`1. Admin perspective - Observe Menu`, () => { + cy.log(`Admin perspective - Observe Menu and verify all submenus`); + nav.sidenav.clickNavLink(['Administration', 'Cluster Settings']); + commonPages.detailsPage.administration_clusterSettings(); + nav.sidenav.clickNavLink(['Observe', 'Alerting']); + commonPages.titleShouldHaveText('Alerting'); + nav.tabs.switchTab('Silences'); + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + nav.sidenav.clickNavLink(['Observe', 'Dashboards']); + commonPages.titleShouldHaveText('Dashboards'); + nav.sidenav.clickNavLink(['Observe', 'Targets']); + commonPages.titleShouldHaveText('Metrics targets'); + }); + // TODO: Intercept Bell GET request to inject an alert (Watchdog to have it opened in + // Alert Details page?) + // it('Admin perspective - Bell > Alert details > Alerting rule details > Metrics flow', () => { + // cy.visit('/'); + // commonPages.clickBellIcon(); + // commonPages.bellIconClickAlert('TargetDown'); + // commonPages.titleShouldHaveText('TargetDown') - // }); + // }); - it(`2. Admin perspective - Overview Page > Status - View alerts`, () => { - nav.sidenav.clickNavLink(['Home', 'Overview']); - overviewPage.clickStatusViewAlerts(); - commonPages.titleShouldHaveText('Alerting'); - }); + it(`2. Admin perspective - Overview Page > Status - View alerts`, () => { + nav.sidenav.clickNavLink(['Home', 'Overview']); + overviewPage.clickStatusViewAlerts(); + commonPages.titleShouldHaveText('Alerting'); + }); - // TODO: Intercept and inject a valid alert into status-card to be opened correctly to Alerting / - // Alerts page - // I couldn't make Watchdog working on status-card - // it('3. Admin perspective - Overview Page > Status - View details', () => { - // cy.visit('/'); - // nav.sidenav.clickNavLink(['Home', 'Overview']); - // overviewPage.clickStatusViewDetails(0); - // detailsPage.sectionHeaderShouldExist('Alert details'); - // }); + // TODO: Intercept and inject a valid alert into status-card to be opened correctly to Alerting + // Alerts page + // I couldn't make Watchdog working on status-card + // it('3. Admin perspective - Overview Page > Status - View details', () => { + // cy.visit('/'); + // nav.sidenav.clickNavLink(['Home', 'Overview']); + // overviewPage.clickStatusViewDetails(0); + // detailsPage.sectionHeaderShouldExist('Alert details'); + // }); - it(`3. Admin perspective - Cluster Utilization - Metrics`, () => { - nav.sidenav.clickNavLink(['Home', 'Overview']); - overviewPage.clickClusterUtilizationViewCPU(); - commonPages.titleShouldHaveText('Metrics'); - commonPages.projectDropdownShouldExist(); - }); + it(`3. Admin perspective - Cluster Utilization - Metrics`, () => { + nav.sidenav.clickNavLink(['Home', 'Overview']); + overviewPage.clickClusterUtilizationViewCPU(); + commonPages.titleShouldHaveText('Metrics'); + commonPages.projectDropdownShouldExist(); + }); - // Run tests in Administrator perspective - runBVTMonitoringTests({ - name: 'Administrator', - }); -}); + // Run tests in Administrator perspective + runBVTMonitoringTests({ + name: 'Administrator', + }); + }, +); diff --git a/web/cypress/e2e/monitoring/00.bvt_dev.cy.ts b/web/cypress/e2e/monitoring/00.bvt_dev.cy.ts index a5b66eb9e..ab142a647 100644 --- a/web/cypress/e2e/monitoring/00.bvt_dev.cy.ts +++ b/web/cypress/e2e/monitoring/00.bvt_dev.cy.ts @@ -8,7 +8,7 @@ const MP = { operatorName: 'Cluster Monitoring Operator', }; -describe('BVT: Monitoring - Namespaced', { tags: ['@monitoring-dev', '@smoke-dev'] }, () => { +describe('BVT: Monitoring - Namespaced', { tags: ['@alerting'] }, () => { before(() => { cy.beforeBlock(MP); }); diff --git a/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts b/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts index 832eba1dd..b24a4bfd3 100644 --- a/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts +++ b/web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts @@ -11,7 +11,7 @@ const MP = { // Test suite for Core platform perspective describe( 'Regression: Monitoring - Alerts (Core platform)', - { tags: ['@monitoring', '@alerts'] }, + { tags: ['@alerting', '@metrics'] }, () => { before(() => { cy.beforeBlock(MP); diff --git a/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts b/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts index 55e27bcb0..80e031fdf 100644 --- a/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts +++ b/web/cypress/e2e/monitoring/regression/01.reg_alerts_dev.cy.ts @@ -10,7 +10,7 @@ const MP = { describe( 'Regression: Monitoring - Alerts Namespaced (Administrator)', - { tags: ['@monitoring-dev', '@alerts-dev'] }, + { tags: ['@alerting'] }, () => { before(() => { cy.beforeBlock(MP); diff --git a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts b/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts index 7e710abbd..09a4ef6f7 100644 --- a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts +++ b/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_1.cy.ts @@ -9,31 +9,27 @@ const MP = { }; // Test suite for Administrator perspective -describe( - 'Regression: Monitoring - Metrics (Administrator)', - { tags: ['@monitoring', '@metrics'] }, - () => { - before(() => { - cy.beforeBlock(MP); - }); +describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { + before(() => { + cy.beforeBlock(MP); + }); - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace('All Projects'); - }); + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + }); - // Run tests in Administrator perspective - runAllRegressionMetricsTests1({ - name: 'Administrator', - }); - }, -); + // Run tests in Administrator perspective + runAllRegressionMetricsTests1({ + name: 'Administrator', + }); +}); // Test suite for Administrator perspective describe( 'Regression: Monitoring - Metrics Namespaced (Administrator)', - { tags: ['@monitoring', '@metrics'] }, + { tags: ['@metrics'] }, () => { before(() => { cy.beforeBlock(MP); diff --git a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts b/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts index 82e1672af..d5d7cfcdf 100644 --- a/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts +++ b/web/cypress/e2e/monitoring/regression/02.reg_metrics_admin_2.cy.ts @@ -9,31 +9,27 @@ const MP = { }; // Test suite for Administrator perspective -describe( - 'Regression: Monitoring - Metrics (Administrator)', - { tags: ['@monitoring', '@metrics'] }, - () => { - before(() => { - cy.beforeBlock(MP); - }); +describe('Regression: Monitoring - Metrics (Administrator)', { tags: ['@metrics'] }, () => { + before(() => { + cy.beforeBlock(MP); + }); - beforeEach(() => { - nav.sidenav.clickNavLink(['Observe', 'Metrics']); - commonPages.titleShouldHaveText('Metrics'); - cy.changeNamespace('All Projects'); - }); + beforeEach(() => { + nav.sidenav.clickNavLink(['Observe', 'Metrics']); + commonPages.titleShouldHaveText('Metrics'); + cy.changeNamespace('All Projects'); + }); - // Run tests in Administrator perspective - runAllRegressionMetricsTests2({ - name: 'Administrator', - }); - }, -); + // Run tests in Administrator perspective + runAllRegressionMetricsTests2({ + name: 'Administrator', + }); +}); // Test suite for Administrator perspective describe( 'Regression: Monitoring - Metrics Namespaced (Administrator)', - { tags: ['@monitoring', '@metrics'] }, + { tags: ['@metrics'] }, () => { before(() => { cy.beforeBlock(MP); diff --git a/web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts b/web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts index 5439930a9..eac3d5a38 100644 --- a/web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts +++ b/web/cypress/e2e/monitoring/regression/03.reg_legacy_dashboards_admin.cy.ts @@ -11,7 +11,7 @@ const MP = { // Test suite for Administrator perspective describe( 'Regression: Monitoring - Legacy Dashboards (Administrator)', - { tags: ['@monitoring', '@dashboards'] }, + { tags: ['@legacy-dashboards'] }, () => { before(() => { cy.beforeBlock(MP); @@ -39,7 +39,7 @@ describe( // Test suite for Administrator perspective describe( 'Regression: Monitoring - Legacy Dashboards Namespaced (Administrator)', - { tags: ['@monitoring', '@dashboards'] }, + { tags: ['@legacy-dashboards'] }, () => { before(() => { cy.beforeBlock(MP); diff --git a/web/cypress/e2e/perses/00.coo_bvt_perses_admin.cy.ts b/web/cypress/e2e/perses/00.coo_bvt_perses_admin.cy.ts index 78c6a05f0..baeecfc07 100644 --- a/web/cypress/e2e/perses/00.coo_bvt_perses_admin.cy.ts +++ b/web/cypress/e2e/perses/00.coo_bvt_perses_admin.cy.ts @@ -21,7 +21,7 @@ const MP = { //TODO: change tag to @smoke, @dashboards, @perses when customizable-dashboards gets merged describe( 'BVT: COO - Dashboards (Perses) - Core platform perspective', - { tags: ['@smoke', '@dashboards', '@perses'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false }); diff --git a/web/cypress/e2e/perses/01.coo_list_perses_admin.cy.ts b/web/cypress/e2e/perses/01.coo_list_perses_admin.cy.ts index be954d224..f3c86aafa 100644 --- a/web/cypress/e2e/perses/01.coo_list_perses_admin.cy.ts +++ b/web/cypress/e2e/perses/01.coo_list_perses_admin.cy.ts @@ -24,7 +24,7 @@ const MP = { //TODO: change tag to @dashboards when customizable-dashboards gets merged describe( 'COO - Dashboards (Perses) - List perses dashboards', - { tags: ['@perses', '@dashboards'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false }); @@ -51,7 +51,7 @@ describe( //TODO: change tag to @dashboards when customizable-dashboards gets merged describe( 'COO - Dashboards (Perses) - List perses dashboards - Namespace', - { tags: ['@perses', '@dashboards'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false }); diff --git a/web/cypress/e2e/perses/02.coo_edit_perses_admin.cy.ts b/web/cypress/e2e/perses/02.coo_edit_perses_admin.cy.ts index dda15c4a1..b3618b6c8 100644 --- a/web/cypress/e2e/perses/02.coo_edit_perses_admin.cy.ts +++ b/web/cypress/e2e/perses/02.coo_edit_perses_admin.cy.ts @@ -22,7 +22,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @dashboards when customizable-dashboards gets merged describe( 'COO - Dashboards (Perses) - Edit perses dashboard', - { tags: ['@perses', '@dashboards'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { // cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false }); diff --git a/web/cypress/e2e/perses/03.coo_create_perses_admin.cy.ts b/web/cypress/e2e/perses/03.coo_create_perses_admin.cy.ts index d0ee0c21e..3a4544a14 100644 --- a/web/cypress/e2e/perses/03.coo_create_perses_admin.cy.ts +++ b/web/cypress/e2e/perses/03.coo_create_perses_admin.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @dashboards when customizable-dashboards gets merged describe( 'COO - Dashboards (Perses) - Create perses dashboard', - { tags: ['@perses', '@dashboards'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { // cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false }); diff --git a/web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts b/web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts index 42019c82d..599f50059 100644 --- a/web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts +++ b/web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @dashboards when customizable-dashboards gets merged describe( 'COO - Dashboards (Perses) - Import perses dashboard', - { tags: ['@perses', '@dashboards'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { // cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false }); diff --git a/web/cypress/e2e/perses/05.coo_tempo_loki_admin.cy.ts b/web/cypress/e2e/perses/05.coo_tempo_loki_admin.cy.ts index c8ec6f391..e4e81cc0a 100644 --- a/web/cypress/e2e/perses/05.coo_tempo_loki_admin.cy.ts +++ b/web/cypress/e2e/perses/05.coo_tempo_loki_admin.cy.ts @@ -43,7 +43,7 @@ const CLO = { describe( 'COO - Dashboards (Perses) - Perses Global Datasources with Tempo and Loki', - { tags: ['@perses-ivt', '@dashboards', '@xfail'] }, + { tags: ['@perses-dashboards', '@xfail'] }, () => { before(() => { cy.beforeBlockTempo(TEMPO); diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts b/web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts index 8e3f7da79..1b65f2450 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts +++ b/web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts @@ -19,7 +19,7 @@ const MP = { describe( 'RBAC User1: COO - Dashboards (Perses) - Administrator perspective', - { tags: ['@perses-dev'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { // Setup COO and Perses dashboards (requires admin privileges) diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts b/web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts index 1159e59df..276867e27 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts +++ b/web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @smoke, @dashboards, @perses when customizable-dashboards gets merged describe( 'RBAC User2: COO - Dashboards (Perses) - Administrator perspective', - { tags: ['@perses-dev'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { //TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts b/web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts index 51e0ec226..6b11bf657 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts +++ b/web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @smoke, @dashboards, @perses when customizable-dashboards gets merged describe( 'RBAC User3: COO - Dashboards (Perses) - Administrator perspective', - { tags: ['@perses-dev'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { //TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts b/web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts index 8ceb2c2b6..1b1d65d0a 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts +++ b/web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @smoke, @dashboards, @perses when customizable-dashboards gets merged describe( 'RBAC User4: COO - Dashboards (Perses) - Administrator perspective', - { tags: ['@perses-dev'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { //TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts b/web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts index 261fb7ab0..399112d25 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts +++ b/web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @smoke, @dashboards, @perses when customizable-dashboards gets merged describe( 'RBAC User5: COO - Dashboards (Perses) - Administrator perspective', - { tags: ['@perses-dev'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { //TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user diff --git a/web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts b/web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts index 2e4aae3bf..70bb3ec94 100644 --- a/web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts +++ b/web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts @@ -21,7 +21,7 @@ import { operatorAuthUtils } from '../../support/commands/auth-commands'; //TODO: change tag to @smoke, @dashboards, @perses when customizable-dashboards gets merged describe( 'RBAC User6: COO - Dashboards (Perses) - Administrator perspective', - { tags: ['@perses-dev'] }, + { tags: ['@perses-dashboards'] }, () => { before(() => { //TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user diff --git a/web/cypress/e2e/virtualization/00.coo_ivt.cy.ts b/web/cypress/e2e/virtualization/00.coo_ivt.cy.ts index 30280889f..858da51b6 100644 --- a/web/cypress/e2e/virtualization/00.coo_ivt.cy.ts +++ b/web/cypress/e2e/virtualization/00.coo_ivt.cy.ts @@ -59,7 +59,7 @@ describe('Installation: Virtualization', { tags: ['@virtualization', '@slow'] }, }); }); -describe('IVT: Monitoring + Virtualization', { tags: ['@smoke', '@virtualization'] }, () => { +describe('IVT: Monitoring + Virtualization', { tags: ['@metrics', '@alerting'] }, () => { beforeEach(() => { cy.visit('/'); guidedTour.close(); diff --git a/web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts b/web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts index 3e2bb8677..0a92a542d 100644 --- a/web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts +++ b/web/cypress/e2e/virtualization/01.coo_ivt_alerts.cy.ts @@ -33,39 +33,31 @@ const KBV = { }, }; -describe( - 'Installation: COO and setting up Monitoring Plugin', - { tags: ['@virtualization', '@slow'] }, - () => { - before(() => { - cy.beforeBlockCOO(MCP, MP); - }); +describe('Installation: COO and setting up Monitoring Plugin', { tags: ['@alerting'] }, () => { + before(() => { + cy.beforeBlockCOO(MCP, MP); + }); - it('1. Installation: COO and setting up Monitoring Plugin', () => { - cy.log('Installation: COO and setting up Monitoring Plugin'); - }); - }, -); + it('1. Installation: COO and setting up Monitoring Plugin', () => { + cy.log('Installation: COO and setting up Monitoring Plugin'); + }); +}); -describe( - 'IVT: Monitoring UIPlugin + Virtualization', - { tags: ['@virtualization', '@slow'] }, - () => { - before(() => { - cy.beforeBlockVirtualization(KBV); - }); +describe('IVT: Monitoring UIPlugin + Virtualization', { tags: ['@alerting'] }, () => { + before(() => { + cy.beforeBlockVirtualization(KBV); + }); - it('1. Virtualization perspective - Observe Menu', () => { - cy.log('Virtualization perspective - Observe Menu and verify all submenus'); - cy.switchPerspective('Virtualization', 'Fleet virtualization'); - guidedTour.closeKubevirtTour(); - }); - }, -); + it('1. Virtualization perspective - Observe Menu', () => { + cy.log('Virtualization perspective - Observe Menu and verify all submenus'); + cy.switchPerspective('Virtualization', 'Fleet virtualization'); + guidedTour.closeKubevirtTour(); + }); +}); describe( 'Regression: Monitoring - Alerts (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@alerting', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); diff --git a/web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts b/web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts index ccac18457..b82e0e442 100644 --- a/web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts +++ b/web/cypress/e2e/virtualization/02.coo_ivt_metrics_1.cy.ts @@ -65,7 +65,7 @@ describe( describe( 'Regression: Monitoring - Metrics (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@metrics', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); @@ -87,7 +87,7 @@ describe( describe( 'Regression: Monitoring - Metrics Namespaced (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@metrics', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); diff --git a/web/cypress/e2e/virtualization/02.coo_ivt_metrics_2.cy.ts b/web/cypress/e2e/virtualization/02.coo_ivt_metrics_2.cy.ts index b840804fe..03c82d680 100644 --- a/web/cypress/e2e/virtualization/02.coo_ivt_metrics_2.cy.ts +++ b/web/cypress/e2e/virtualization/02.coo_ivt_metrics_2.cy.ts @@ -65,7 +65,7 @@ describe( describe( 'Regression: Monitoring - Metrics (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@metrics', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); @@ -87,7 +87,7 @@ describe( describe( 'Regression: Monitoring - Metrics Namespaced (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@metrics', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); diff --git a/web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts b/web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts index 28fe440d2..2f430596c 100644 --- a/web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts +++ b/web/cypress/e2e/virtualization/03.coo_ivt_legacy_dashboards.cy.ts @@ -64,7 +64,7 @@ describe( describe( 'Regression: Monitoring - Legacy Dashboards (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@legacy-dashboards', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); @@ -84,7 +84,7 @@ describe( describe( 'Regression: Monitoring - Legacy Dashboards Namespaced (Virtualization)', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@legacy-dashboards', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); diff --git a/web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts b/web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts index ce9a43f60..cbf31cd3f 100644 --- a/web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts +++ b/web/cypress/e2e/virtualization/04.coo_ivt_perses.cy.ts @@ -61,7 +61,7 @@ describe('Installation: Virtualization', { tags: ['@virtualization', '@slow'] }, describe( 'IVT: COO - Dashboards (Perses) - Virtualization perspective', - { tags: ['@virtualization', '@slow'] }, + { tags: ['@perses-dashboards', '@slow'] }, () => { beforeEach(() => { cy.visit('/'); diff --git a/web/cypress/support/test-tags.d.ts b/web/cypress/support/test-tags.d.ts index 3c5932162..662eb3bd2 100644 --- a/web/cypress/support/test-tags.d.ts +++ b/web/cypress/support/test-tags.d.ts @@ -1,12 +1,12 @@ -type BasicTag = '@smoke' | '@demo' | '@flaky' | '@xfail' | '@slow'; +type BasicTag = '@flaky' | '@xfail' | '@slow'; type HighLevelComponentTag = - | '@monitoring' - | '@coo' - | '@virtualization' - | '@alerts' + | '@acm-alerting' + | '@alerting' + | '@legacy-dashboards' | '@metrics' - | '@dashboards' + | '@targets' + | '@perses-dashboards' | '@cluster-health-analyzer'; type SpecificFeatureTag = `@${string}-${string}`; diff --git a/web/package.json b/web/package.json index 6e2b5916d..48f020eb8 100644 --- a/web/package.json +++ b/web/package.json @@ -30,23 +30,20 @@ "test": "npm run cypress:run:ci", "test-cypress-console": "./node_modules/.bin/cypress open --browser chrome", "test-cypress-console-headless": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless", - "test-cypress-monitoring": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@monitoring --@flaky --@demo --@xfail'", - "test-cypress-monitoring-dev": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@monitoring-dev --@demo --@xfail'", - "test-cypress-monitoring-bvt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@monitoring+@smoke --@demo --@xfail'", - "test-cypress-monitoring-regression": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@monitoring --@smoke --@flaky --@demo --@xfail'", - "test-cypress-alerts": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerts --@flaky --@demo --@xfail'", - "test-cypress-metrics": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@metrics --@flaky --@demo --@xfail'", - "test-cypress-dashboards": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@dashboards --@flaky --@demo --@xfail'", - "test-cypress-coo": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@coo --@flaky --@demo --@xfail'", - "test-cypress-coo-bvt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@coo+@smoke --@demo --@xfail'", - "test-cypress-virtualization": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@virtualization --@flaky --@demo --@xfail'", - "test-cypress-smoke": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@smoke --@flaky --@demo --@xfail'", - "test-cypress-fast": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@smoke --@slow --@demo --@flaky --@xfail'", - "test-cypress-perses-dev": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dev --@demo --@xfail'", - "test-cypress-perses": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses --@smoke --@flaky --@demo --@xfail'", - "test-cypress-perses-ivt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-ivt --@smoke --@flaky --@demo --@xfail'", + "test-cypress-monitoring": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerting+@legacy-dashboards+@metrics+@targets --@flaky --@xfail'", + "test-cypress-monitoring-dev": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerting+@legacy-dashboards+@metrics+@targets --@xfail'", + "test-cypress-monitoring-bvt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerting+@legacy-dashboards+@metrics+@targets --@xfail'", + "test-cypress-monitoring-regression": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerting+@legacy-dashboards+@metrics+@targets --@flaky --@xfail'", + "test-cypress-alerts": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerting --@flaky --@xfail'", + "test-cypress-metrics": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@metrics --@flaky --@xfail'", + "test-cypress-dashboards": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@legacy-dashboards --@flaky --@xfail'", + "test-cypress-coo": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@acm-alerting+@perses-dashboards+@cluster-health-analyzer --@flaky --@xfail'", + "test-cypress-coo-bvt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@acm-alerting+@perses-dashboards+@cluster-health-analyzer --@xfail'", "test-cypress-incidents": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@cluster-health-analyzer --@flaky --@xfail'", "test-cypress-incidents-e2e": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@cluster-health-analyzer --@flaky --@xfail'", + "test-cypress-perses-dev": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dashboards --@xfail'", + "test-cypress-perses": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dashboards --@smoke --@flaky --@xfail'", + "test-cypress-perses-ivt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dashboards --@smoke --@flaky --@xfail'", "ts-node": "ts-node -O '{\"module\":\"commonjs\"}'" }, "dependencies": {