Skip to content

CONSOLE-4991: Reenable all unit tests#16025

Open
logonoff wants to merge 4 commits intoopenshift:mainfrom
logonoff:CONSOLE-4491-unit-tests-2
Open

CONSOLE-4991: Reenable all unit tests#16025
logonoff wants to merge 4 commits intoopenshift:mainfrom
logonoff:CONSOLE-4491-unit-tests-2

Conversation

@logonoff
Copy link
Member

@logonoff logonoff commented Feb 12, 2026

  • Firehose tests appeared to not crash so the problem may have fixed itself
  • environment.spec.tsx tests were broken because the mocked redux store didn't include the DeploymentModel used for rbac (according to claude). this has been added
  • Flaking buildconfig tests were because userEvent.type is a slow method (it types each letter one by one which can be slow to simulate, especially if CI is overloaded). We can't really get around this, but we can increase the jest timeout which is what I've done
  • Migrate all usage of userEvent to the setup pattern recommended in the latest version.

Summary by CodeRabbit

  • Tests
    • Updated test suite to use modern userEvent API patterns for improved reliability across multiple components and test scenarios
    • Re-enabled previously skipped tests for environment and firehose functionality
    • Added extended timeouts for user interaction simulations to ensure consistent test execution

@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 12, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 12, 2026

@logonoff: This pull request references CONSOLE-4991 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Firehose tests appeared to not crash so the problem may have fixed itself
  • environment.spec.tsx tests were broken because the mocked redux store didn't include the DeploymentModel used for rbac (according to claude). this has been added
  • Flaking buildconfig tests were because userEvent.type is a slow method (it types each letter one by one which can be slow to simulate, especially if CI is overloaded). We can't really get around this, but we can increase the jest timeout which is what I've done
  • Migrate all usage of userEvent to the setup pattern recommended in the latest version.

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 12, 2026

📝 Walkthrough

Walkthrough

This pull request systematically migrates test files across OpenShift Console frontend packages from direct userEvent method calls to the v14-compatible setup-based pattern. Changes include initializing user instances via userEvent.setup() and replacing calls to userEvent.click(), userEvent.type(), and userEvent.hover() with corresponding user instance methods. Several test timeouts are increased to 30000ms to accommodate slower typing simulations. Additionally, two previously disabled tests are re-enabled, and test infrastructure is added to one test file to provide Redux k8s Resources models needed for permission verification logic.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of this changeset: reenabling disabled unit tests across multiple test files and fixing related issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ 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

No actionable comments were generated in the recent review. 🎉


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

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 12, 2026

@logonoff: This pull request references CONSOLE-4991 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 story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Firehose tests appeared to not crash so the problem may have fixed itself
  • environment.spec.tsx tests were broken because the mocked redux store didn't include the DeploymentModel used for rbac (according to claude). this has been added
  • Flaking buildconfig tests were because userEvent.type is a slow method (it types each letter one by one which can be slow to simulate, especially if CI is overloaded). We can't really get around this, but we can increase the jest timeout which is what I've done
  • Migrate all usage of userEvent to the setup pattern recommended in the latest version.

Summary by CodeRabbit

  • Tests
  • Updated test suite to use modern userEvent API patterns for improved reliability across multiple components and test scenarios
  • Re-enabled previously skipped tests for environment and firehose functionality
  • Added extended timeouts for user interaction simulations to ensure consistent test execution

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 requested review from cajieh and jhadvig February 12, 2026 20:31
Comment on lines -99 to 115
it('does not display save and reload buttons without permission', () => {
it('does not display save and reload buttons without permission', async () => {
renderWithProviders(
Copy link
Member Author

Choose a reason for hiding this comment

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

@krishagarwal278 FYI since this was skipped in #15751

Comment on lines -286 to +293
// Disabling as this test is flaking. @vikram-raj to investigate.
xit('should submit right form data when user fills out an image stream tag', async () => {
it('should submit right form data when user fills out an image stream tag', async () => {
const user = userEvent.setup();
Copy link
Member Author

Choose a reason for hiding this comment

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

@vikram-raj @rhamilto FYI since this was skipped during the PF6 upgrade

@logonoff
Copy link
Member Author

logonoff commented Feb 12, 2026

test only changes:
/label px-approved
/label docs-approved
/label plugin-api-approved

@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Feb 12, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 12, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff

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

The pull request process is described 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 component/dev-console Related to dev-console approved Indicates a PR has been approved by an approver from all required OWNERS files. component/shared Related to console-shared component/topology Related to topology px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer labels Feb 12, 2026
@openshift-ci openshift-ci bot added component/sdk Related to console-plugin-sdk plugin-api-changed Categorizes a PR as containing plugin API changes labels Feb 12, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 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 ccb534b link true /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

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dev-console Related to dev-console component/sdk Related to console-plugin-sdk component/shared Related to console-shared 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. plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer plugin-api-changed Categorizes a PR as containing plugin API changes 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.

5 participants