Uploaded image for project: 'OCMUI - OpenShift Cluster Manager UI'
  1. OCMUI - OpenShift Cluster Manager UI
  2. OCMUI-3632

Come up with a strategy and fix/delete unit tests that are skipped

    • Skipped Unit-tests
    • Quality / Stability / Reliability
    • False
    • False
    • To Do
    • 100% To Do, 0% In Progress, 0% Done
    • first refinement attempt was off target, need to start another round of refinement

      Skipped Unit Tests Analysis Report

      📊 Summary

      • Total skipped tests found: ~80+ individual test cases
      • Files with skipped tests: 35+ files
      • Main skip patterns used: it.skip(), describe.skip(), xit()

      🚀 Strategy Recommendations

      High Priority - Fix Technical Issues

      1. API mocking problems in ROSA wizard queries
      2. Redux service integration issues
      3. React Markdown component mocking

      Medium Priority - Accessibility

      1. Most accessibility tests are systematically skipped - consider batch fixing
      2. Focus on Checkbox component label issue first
      3. Address PatternFly accessibility intervention needs

      Low Priority - Empty Implementations

      1. Complete empty test bodies in MarketplaceSelectField
      2. Implement pending query helper tests

      Investigation Needed

      1. ClusterDetails complex scenarios need requirements clarification
      2. Timer and business logic edge cases

      Details

      🔧 Technical Issues / Mocking Problems

      Redux/Service Integration Issues

      • File: src/redux/actions/clustersActions.test.js:45
        • Test: it.skip('calls regionalClusterService.postNewCluster when regionalId exists')
        • Reason: "skipping as test suites have issues with getClusterServiceForRegion()"

      API Mocking Issues

      • File: src/queries/RosaWizardQueries/useFetchSearchClusterName.test.ts:20
        • Test: it.skip('Get useFetchSearchClusterName valid response')
        • Reason: "skipping because the mocked request is returning 'status: 500' error"
      • File: src/queries/RosaWizardQueries/useFetchSearchDomainPrefix.test.ts:19
        • Test: it.skip('Get useFetchSearchDomainPrefix valid response')
        • Reason: "skipping because the mocked request is returning 'status: 500' error"
      • File: src/queries/RosaWizardQueries/useFetchGetOCMRole.test.ts:21
        • Test: it.skip('Get useFetchGetOCMRole valid response')
        • Reason: Similar API mocking issue

      ♿ Accessibility Test Issues

      Systematic Accessibility Skips

      Multiple files with it.skip('is accessible') pattern:

      • src/components/quota/_tests_/Quota.test.tsx:18
      • src/components/downloads/DownloadsPage/_tests_/DownloadsPage.test.tsx:48
      • src/components/dashboard/_tests_/TopOverviewSection.test.jsx:18
      • src/components/dashboard/InsightsAdvisorCard/InsightsAdvisorCard.test.jsx:67
      • src/components/common/RefreshButton/RefreshButton.test.tsx:25
      • src/components/dashboard/CostCard/_tests_/CostSummary.test.tsx:9
      • src/components/dashboard/Dashboard.test.jsx:156
      • src/components/clusters/ClusterDetailsMultiRegion/_tests_/ClusterNetwork.test.jsx:9
      • src/components/clusters/ClusterDetailsMultiRegion/components/Overview/InsightsAdvisor/InsightsAdvisor.test.jsx:25,33
      • src/components/clusters/ClusterDetailsMultiRegion/components/Overview/CostBreakdownCard/_tests_/CostBreakdownCard.test.tsx:94
      • src/components/clusters/ClusterDetailsMultiRegion/components/TabsRow/_tests_/TabsRow.test.tsx:50
      • src/components/clusters/ArchivedClusterListMultiRegion/components/ArchiveClusterListTable/_tests_/ArchivedClusterList.test.jsx:10
      • src/components/clusters/ClusterDetailsMultiRegion/_tests_/Overview.test.jsx:54,115,186
      • src/components/clusters/CreateClusterPage/CreateCluster.test.jsx:32
      • src/components/clusters/common/ResourceUsage/_tests_/ClusterUtilizationChart.test.tsx:30
      • src/components/clusters/common/ResourceUsage/_tests_/SmallClusterChart.test.tsx:33
      • src/components/clusters/common/ResourceUsage/_tests_/ResourceUsage.test.tsx:44
      • src/components/clusters/install/InstallWrapper.test.tsx:18
      • src/components/releases/ReleaseChannel.test.tsx:17
      • src/components/releases/Releases.test.tsx:38

      Specific Accessibility Issues

      • File: src/components/clusters/wizards/rosa/ControlPlaneScreen/HostedTile.test.tsx:75
        • Reason: "TODO: Skipping accessibility test for now as it is failing and requires PF intervention."
      • File: src/components/common/formik/Checkbox.test.jsx:10
        • Reason: "Checkbox is not accessible due to the lack of associated label. skipped until Checkbox accepts a label and passes it down to FormGroup"
      • File: src/components/clusters/ClusterDetailsMultiRegion/components/Monitoring/_tests_/Monitoring.test.tsx:17
        • Reason: "Skipping these tests because the Monitoring component has accessibility issues"
      • File: src/components/clusters/ClusterDetailsMultiRegion/components/Overview/InstallationLogView/_tests_/InstallationLogView.test.jsx:36
        • Reason: "Skipping because it fails with Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout."

      🧩 Component/Library Issues

      React Markdown Issues

      • File: src/common/_tests_/MarkdownParser.test.tsx:20
        • Test: describe.skip('MarkdownParser')
        • Reason:

          Fix unit test cases by mocking the ReactMarkdown component in jest.config.js -> moduleNameMapper (see markdownMock.tsx). Since these tests do not mean anything as the mock just returns the same data sent in, we can skip them. Ticket OCMUI-2682 addresses the issues of react-markdown

      Empty Test Implementations

      • File: src/components/clusters/wizards/osd/BillingModel/MarketplaceSelectField.test.tsx:78,80
        • Tests: xit('selecting Red Hat marketplace sets the right field value') and xit('selecting Google cloud marketplace sets the right field value')
        • Reason: Empty test bodies - tests not implemented yet

      🔍 Complex Test Logic Issues

      ClusterDetails Complex Test Scenarios

      • File: src/components/clusters/ClusterDetailsMultiRegion/_tests_/ClusterDetails.test.jsx:252
        • Test: describe.skip('fetches all relevant resources')
        • Reason: No specific comment, appears to be complex integration test
      • File: src/components/clusters/ClusterDetailsMultiRegion/_tests_/ClusterDetails.test.jsx:341
        • Test: it.skip('should not consider issues when cluster is installing')
        • Reason:

          This fails because the text 'monitoring' is shown but as part of the UpgradeSettingsTab. What I think is the intention of this test is that the monitoring tab is not shown but the actual intent is not known. skipping until further investigation is known

      • Multiple other describe.skip blocks in the same file for different cluster types (OSD, ARO, hypershift, GCP, etc.)

      Feature Gate/Query Issues

      • src/queries/featureGates/useFetchFeatureGate.test.tsx - Multiple skipped tests (lines 132,143,154,165)
      • src/queries/ClusterListQueries/helpers/useFetchClustersHelpers.test.tsx:119,121 - Empty test implementations
      • src/queries/ClusterListQueries/useFetchClusters.test.tsx:195
      • src/queries/ClusterListQueries/helpers/fetchClusters.test.tsx:86
      • src/queries/ClusterDetailsQueries/AccessControlTab/UserQueries/useFetchIDPsWithHTPUsers.test.ts:125

      ⚙️ Component Functionality Issues

      Modal/Dialog Issues

      • File: src/components/clusters/ClusterDetailsMultiRegion/components/MachinePools/_tests_/MachinePools.test.jsx:429
        • Test: it.skip('should open modal')
      • File: src/components/clusters/ClusterDetailsMultiRegion/components/Support/components/_tests_/AddNotificationContactDialog.test.tsx:110,131
        • Tests: Username validation tests

      Business Logic Issues

      • File: src/components/clusters/wizards/rosa/AccountsRolesScreen/AWSBillingAccount/AWSBillingAccount.test.tsx:157,185
        • Tests: Billing account setting logic
      • File: src/components/common/RefreshButton/RefreshButton.test.tsx:131
        • Test: Timer cycle logic
      • File: src/components/dashboard/Dashboard.test.jsx:259
        • Test: Telemetry card empty state logic

              dtaylor@redhat.com David Taylor
              achagarl Aneela Chagarlamudi Kaplan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: