Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4180

OCP 4.20 - Migrate enzyme unit tests to React Testing Library

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • Migrate enzyme unit tests to React Testing Library
    • Quality / Stability / Reliability
    • 0% To Do, 0% In Progress, 100% Done
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None
    • None

      Migrate enzyme unit tests to React Testing Library for simplicity, increased productivity, and better community support. A key advantage of the React Testing Library is that it closely mimics real user interactions, similar to what can be achieved with end-to-end (e2e) tests. 

      OCP/Telco Definition of Done
      Epic Template descriptions and documentation.

      <--- Cut-n-Paste the entire contents of this description into your new Epic --->

      Epic Goal

      • Migrate enzyme unit tests to React Testing Library for simplicity, increased productivity, and better community support.

      Why is this important?

      • Simplicity: React Testing Library provides a simpler API for writing tests, making the process more straightforward.
      • Increased productivity: Due to its simplicity and intuitive API, developers can write tests more quickly and efficiently, leading to increased productivity.
      • Better community support: React Testing Library has a large and active community, which means better support, more frequent updates, and a larger pool of resources for learning and troubleshooting.
      • Real user interactions: React Testing Library closely mimics real user interactions, providing more accurate and meaningful test results. This is similar to what can be achieved with end-to-end (e2e) tests, but without the complexity and overhead of full e2e testing.

      Scenarios

      • No of unit tests files in public/{}tests{}:  275
      • No of unit tests files in packages directory:  1241

      See attached files for details. 

      Acceptance Criteria

      • Convert all existing Enzyme unit tests to React Testing Library (RTL).
      • The RTL tests MUST run successfully in CI
      • Remove all existing Enzyme unit tests.
      • Write new tests in RTL.

      Dependencies (internal and external)

      1. ...

      Previous Work (Optional):

      Open questions::

      Done Checklist

      • CI - CI is running, tests are automated and merged.
      • Release Enablement <link to Feature Enablement Presentation>
      • DEV - Upstream code and tests merged: <link to meaningful PR or GitHub Issue>
      • DEV - Upstream documentation merged: <link to meaningful PR or GitHub Issue>
      • DEV - Downstream build attached to advisory: <link to errata>
      • QE - Test plans in Polarion: <link or reference to Polarion>
      • QE - Automated tests merged: <link or reference to automated tests>
      • DOC - Downstream documentation merged: <link to meaningful PR>

        1. public_tests_dir.txt
          4 kB
          Cyril Ajieh
        2. packages_dir.txt
          60 kB
          Cyril Ajieh
        3. react-testing-library.txt
          4 kB
          Cyril Ajieh

              cajieh Cyril Ajieh
              cajieh Cyril Ajieh
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: