Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-6264

Improve react-testing-library user-event extension usability (with PatternFly)

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • openshift-4.13
    • None
    • UI
    • ODC Sprint 218, ODC Sprint 227, ODC Sprint 228, ODC Sprint 229, ODC Sprint 230

      Description of problem:

      With ODC-5851 we introduced react-testing-library (or the "testing-library") to our code.

      We also added the official "user-event" extension (https://testing-library.com/docs/ecosystem-user-event/) which provides additional functions to simulate browser events. For example it can simulate that a user types a text into an input field (focus, multiple key events, blur event and change event) instead of just firing one single onChange event.

      This is really useful but it doesn't work well with our InputFields from @console/shared and TextInput from PatternFly.

      Actual results:

      userEvent.type(inputField) fails

      Expected results:

      userEvent.type(inputField) should work

      Additional notes

      As part of this PR the workaround in packages/dev-console/src/components/buildconfig/_tests_/user-event.ts should be removed and replaced with the @testing-library/user-event library.

              Unassigned Unassigned
              cjerolim Christoph Jerolimov
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Archived: