Skip to content

Comments

CONSOLE-5094: cypress test improvements#16046

Open
logonoff wants to merge 7 commits intoopenshift:mainfrom
logonoff:CONSOLE-5094-more-fixes
Open

CONSOLE-5094: cypress test improvements#16046
logonoff wants to merge 7 commits intoopenshift:mainfrom
logonoff:CONSOLE-5094-more-fixes

Conversation

@logonoff
Copy link
Member

@logonoff logonoff commented Feb 19, 2026

  • Consistently renamed all integration test folders from integration-tests-cypress to integration-tests (the prevailing pattern)
  • Fix all gherkin-lint issues and run it in CI
  • Fix cypress warnings when running certain test-cypress scripts
  • Bump cypress to latest

Summary by CodeRabbit

  • Chores
    • Consolidated integration test infrastructure for improved test maintenance and execution.
    • Unified test package structure and standardized test identifiers across all test suites.
    • Updated test script configuration and improved test runner integration for consistency.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 19, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 19, 2026

@logonoff: This pull request references CONSOLE-5094 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Consistently renamed all integration test folders from integration-tests-cypress to integration-tests (the prevailing pattern)
  • Fix all gherkin-lint issues and run it in CI
  • Fix cypress warnings when running certain test-cypress scripts

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added component/dev-console Related to dev-console component/helm Related to helm-plugin component/knative Related to knative-plugin component/olm Related to OLM component/topology Related to topology kind/cypress Related to Cypress e2e integration testing labels Feb 19, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 19, 2026

@logonoff: This pull request references CONSOLE-5094 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Consistently renamed all integration test folders from integration-tests-cypress to integration-tests (the prevailing pattern)
  • Fix all gherkin-lint issues and run it in CI
  • Fix cypress warnings when running certain test-cypress scripts

Summary by CodeRabbit

  • Chores
  • Consolidated integration test infrastructure for improved test maintenance and execution.
  • Unified test package structure and standardized test identifiers across all test suites.
  • Updated test script configuration and improved test runner integration for consistency.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Walkthrough

This pull request consolidates and restructures the frontend integration test infrastructure. The integration-tests-cypress package is being refactored into integration-tests, with all import paths, TypeScript aliases, and references updated accordingly across the entire frontend codebase. Test scenario tags are standardized to uppercase format (e.g., @odc-1234@ODC-1234). New package.json files are added to define npm scripts for test execution with proper environment configuration. Additional tooling includes adding gherkin-lint to the test pipeline and updating the Gherkin linter configuration with expanded tag patterns. Minor whitespace and formatting cleanup occurs throughout Gherkin feature files.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'CONSOLE-5094: cypress test improvements' clearly references the PR objective of improving Cypress tests and test infrastructure, covering the main changes: folder renaming, gherkin-lint fixes, and Cypress warning resolutions.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
frontend/packages/knative-plugin/integration-tests/features/serverless/create-knative-service-from-deployment-or-deployment-config.feature (1)

13-13: ⚠️ Potential issue | 🟡 Minor

Pre-existing typo: dep-worload should be dep-workload.

Line 13 references "dep-worload" (missing 'k'), but the workload is created as "dep-workload" on line 12 and referenced correctly elsewhere. This will cause a step definition mismatch and likely a test failure. While this is in unchanged code, it's worth fixing while you're in this file.

-              And workload "dep-worload" is present in topology page
+              And workload "dep-workload" is present in topology page
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/create-knative-service-from-deployment-or-deployment-config.feature`
at line 13, Fix the typo in the feature step text: replace the incorrect
workload name "dep-worload" with the correct "dep-workload" so the step matches
the created workload and existing step definitions; update the string in the
scenario step (search for "dep-worload") to "dep-workload" to prevent the step
mismatch.
frontend/packages/knative-plugin/integration-tests/features/eventing/managed-services-kafka-connection.feature (1)

1-1: ⚠️ Potential issue | 🔴 Critical

Step definitions missing for external service interactions—these tests will fail in CI.

The three scenarios on lines 14, 33, and 85 were changed from @manual to @regression, but the underlying step definitions for their external service operations don't exist:

  • user clicks on link "https://cloud.redhat.com/openshift/token"
  • user copies the API token from the link
  • user pastes the token in the API Token

These steps are not implemented in the codebase. Additionally, the cypress.config.js filter explicitly includes @regression tests in CI while excluding @manual tests. This means these scenarios will now run in CI and fail because the steps are missing.

Either implement the step definitions (with proper mocking of the external RHOAS service), or restore the @manual tags on lines 13, 32, and 84. For consistency with other feature files in the suite, if these tests require external service interaction, keeping @regression @manual`` tags is the appropriate approach.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/knative-plugin/integration-tests/features/eventing/managed-services-kafka-connection.feature`
at line 1, The three scenarios in managed-services-kafka-connection.feature now
marked `@regression` rely on missing step definitions for external interactions
("user clicks on link \"https://cloud.redhat.com/openshift/token\"", "user
copies the API token from the link", "user pastes the token in the API Token")
and will fail in CI because cypress.config.js includes `@regression` tests; either
(A) revert those three scenarios to include `@manual` (i.e., change their tags
back to "@regression `@manual`" to exclude them from CI) or (B) implement mocked
step definitions in the Cypress step files to simulate the external RHOAS flow:
add step handlers for the three steps that open a mocked token URL, extract a
fake token, and programmatically populate the API Token input (ensure mocks
avoid real network calls). Reference the feature step strings above and update
cypress.config.js filters only if you choose to run real external tests.
🧹 Nitpick comments (4)
frontend/packages/knative-plugin/integration-tests/features/serverless/side-bar-of-knative-revision-and-service.feature (1)

62-63: Typo in scenario name: "Resoruce" → "Resource".

While this line wasn't modified in this PR, since you're already touching this file for tag standardization, consider fixing the typo in the scenario title for consistency and clarity in test reports.

         `@regression`
-        Scenario: Resoruce details of knative service in side bar: KN-06-TC04
+        Scenario: Resource details of knative service in side bar: KN-06-TC04
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/side-bar-of-knative-revision-and-service.feature`
around lines 62 - 63, Fix the typo in the scenario title string: change
"Resoruce details of knative service in side bar: KN-06-TC04" to "Resource
details of knative service in side bar: KN-06-TC04" so the Scenario name is
spelled correctly (look for the Scenario line in the feature file where the
title appears).
frontend/packages/knative-plugin/integration-tests/features/serverless/serverless-function.feature (1)

1-3: Minor: Pre-existing typo in Feature title.

Line 2 has "fuctions" instead of "functions". While not part of this PR's changes, since you're already touching this file for lint compliance, it might be worth correcting the Feature title for consistency.

 `@knative-serverless` `@knative`
-Feature: Creation and Visualisation of serverless fuctions
+Feature: Creation and Visualisation of serverless functions
               As a user, I want to create and verify a serverless function from Add Options and I should be able to differentiate between a plain Knative Service and a Serverless Function when looking at the Details page of the KSVC and the details tab of the side panel in Topology.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/serverless-function.feature`
around lines 1 - 3, Fix the typo in the Gherkin Feature title string "Creation
and Visualisation of serverless fuctions" by correcting "fuctions" to
"functions" so the line reads "Creation and Visualisation of serverless
functions"; update the Feature header text (the line starting with Feature:) in
the serverless-function.feature where that exact title appears and ensure
spacing/formatting remain unchanged.
frontend/tsconfig.json (1)

46-47: Remove duplicate exclude entry.

The "**/integration-tests" entry appears twice; keeping one is sufficient.

♻️ Proposed cleanup
   "exclude": [
     ".yarn",
     "**/node_modules",
     "public/dist",
     "packages/console-dynamic-plugin-sdk/scripts",
     "**/integration-tests",
-    "**/integration-tests"
+    "**/integration-tests"
   ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/tsconfig.json` around lines 46 - 47, The tsconfig.json exclude array
contains a duplicate entry "**/integration-tests"; remove one of the two
identical entries so the exclude array only lists "**/integration-tests" once
(locate the exclude array in tsconfig.json and update it accordingly).
frontend/packages/knative-plugin/integration-tests/features/eventing/managed-services-kafka-connection.feature (1)

23-23: Minor: Typo in step definition — "buton" should be "button".

This typo appears on lines 23, 43, 78, and 95. While pre-existing, since you're touching this file anyway, consider fixing for consistency. If there's a corresponding step definition matching "buton", both would need updating together.

📝 Suggested fix
-              And user clicks on close buton
+              And user clicks on close button

Apply to lines 23, 43, 78, and 95.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/knative-plugin/integration-tests/features/eventing/managed-services-kafka-connection.feature`
at line 23, Fix the typo in the Gherkin step text "And user clicks on close
buton" by changing "buton" to "button" in all occurrences (the step at "And user
clicks on close buton" and the other instances mentioned); also update any
matching step definition/step regex or function name that currently expects
"buton" so it matches the corrected step text (search for the exact step string
or step definition regex that contains "buton" and replace it with "button" or
adjust the regex accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/create-knative-service-from-deployment-or-deployment-config.feature`:
- Around line 60-61: The feature file has a feature-level `@broken-test` tag that
causes all scenarios to be excluded despite removing scenario-level tags; to
re-enable KN-04-TC05 and KN-04-TC06 either remove the `@broken-test` tag from the
top of this feature or move the two scenarios named "Edit knative workload
created from deployment: KN-04-TC05" and its KN-04-TC06 counterpart into a new
separate feature file without the `@broken-test` tag so the Cypress filter (which
excludes `@broken-test`) will allow those scenarios to run.

In `@README.md`:
- Around line 305-306: The link text "[**_More information on Console's Cypress
usage_**]" uses underscore-based emphasis causing markdownlint MD049; update the
inline emphasis to use asterisks instead (e.g., replace the underscores around
"More information on Console's Cypress usage" with asterisks so the text uses **
*...* ** or simply ***...*** as appropriate) to satisfy markdownlint; locate
this string in README.md and adjust the emphasis markers accordingly.

---

Outside diff comments:
In
`@frontend/packages/knative-plugin/integration-tests/features/eventing/managed-services-kafka-connection.feature`:
- Line 1: The three scenarios in managed-services-kafka-connection.feature now
marked `@regression` rely on missing step definitions for external interactions
("user clicks on link \"https://cloud.redhat.com/openshift/token\"", "user
copies the API token from the link", "user pastes the token in the API Token")
and will fail in CI because cypress.config.js includes `@regression` tests; either
(A) revert those three scenarios to include `@manual` (i.e., change their tags
back to "@regression `@manual`" to exclude them from CI) or (B) implement mocked
step definitions in the Cypress step files to simulate the external RHOAS flow:
add step handlers for the three steps that open a mocked token URL, extract a
fake token, and programmatically populate the API Token input (ensure mocks
avoid real network calls). Reference the feature step strings above and update
cypress.config.js filters only if you choose to run real external tests.

In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/create-knative-service-from-deployment-or-deployment-config.feature`:
- Line 13: Fix the typo in the feature step text: replace the incorrect workload
name "dep-worload" with the correct "dep-workload" so the step matches the
created workload and existing step definitions; update the string in the
scenario step (search for "dep-worload") to "dep-workload" to prevent the step
mismatch.

---

Nitpick comments:
In
`@frontend/packages/knative-plugin/integration-tests/features/eventing/managed-services-kafka-connection.feature`:
- Line 23: Fix the typo in the Gherkin step text "And user clicks on close
buton" by changing "buton" to "button" in all occurrences (the step at "And user
clicks on close buton" and the other instances mentioned); also update any
matching step definition/step regex or function name that currently expects
"buton" so it matches the corrected step text (search for the exact step string
or step definition regex that contains "buton" and replace it with "button" or
adjust the regex accordingly).

In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/serverless-function.feature`:
- Around line 1-3: Fix the typo in the Gherkin Feature title string "Creation
and Visualisation of serverless fuctions" by correcting "fuctions" to
"functions" so the line reads "Creation and Visualisation of serverless
functions"; update the Feature header text (the line starting with Feature:) in
the serverless-function.feature where that exact title appears and ensure
spacing/formatting remain unchanged.

In
`@frontend/packages/knative-plugin/integration-tests/features/serverless/side-bar-of-knative-revision-and-service.feature`:
- Around line 62-63: Fix the typo in the scenario title string: change "Resoruce
details of knative service in side bar: KN-06-TC04" to "Resource details of
knative service in side bar: KN-06-TC04" so the Scenario name is spelled
correctly (look for the Scenario line in the feature file where the title
appears).

In `@frontend/tsconfig.json`:
- Around line 46-47: The tsconfig.json exclude array contains a duplicate entry
"**/integration-tests"; remove one of the two identical entries so the exclude
array only lists "**/integration-tests" once (locate the exclude array in
tsconfig.json and update it accordingly).

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 19, 2026

@logonoff: This pull request references CONSOLE-5094 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Consistently renamed all integration test folders from integration-tests-cypress to integration-tests (the prevailing pattern)
  • Fix all gherkin-lint issues and run it in CI
  • Fix cypress warnings when running certain test-cypress scripts
  • Bump cypress to latest

Summary by CodeRabbit

  • Chores
  • Consolidated integration test infrastructure for improved test maintenance and execution.
  • Unified test package structure and standardized test identifiers across all test suites.
  • Updated test script configuration and improved test runner integration for consistency.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@logonoff
Copy link
Member Author

/label px-approved
/label docs-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Feb 19, 2026
@logonoff logonoff force-pushed the CONSOLE-5094-more-fixes branch from 4afd41b to 71d0550 Compare February 19, 2026 17:59
@logonoff logonoff force-pushed the CONSOLE-5094-more-fixes branch from 71d0550 to 374b3b5 Compare February 19, 2026 20:37
- renamed all `integration-tests-cypress` folders to `integration-tests` - we only use cypress so this makes more sense
- moved olm and console test scripts into their own package.json to be more consistent with other packages
notable changes:
- 15.10.0 deprecates `Cypress.env()`. replacement is `cy.env()`
- Minor performance improvements
- electron/chromium version bumps
- cy.press() supports more buttons now
@logonoff logonoff force-pushed the CONSOLE-5094-more-fixes branch from 374b3b5 to abfa77a Compare February 23, 2026 16:39
@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: logonoff, vojtechszocs
Once this PR has been reviewed and has the lgtm label, please assign spadgett for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 23, 2026
@logonoff
Copy link
Member Author

/label px-approved

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 24, 2026

@logonoff: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console abfa77a link unknown /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/dev-console Related to dev-console component/helm Related to helm-plugin component/knative Related to knative-plugin component/olm Related to OLM component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants