zowe / zowe/api-layer

Migrate UI unit tests from Enzyme to RTL

Open
#2,144 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependencies Priority: Low size/L technical excellence V3
Dominant language
Java
Stars
92
Forks
81
Avg merge
1d 9h
Merged PRs (30d)
46

Description

At the time Enzyme publishes "officially supported" adapters for React 0.13.x, 0.14.x, 15.x, and 16.x. These adapters are npm packages of the form enzyme-adapter-react-{{version}}.
There is no official adapter for React 17 which we are using.
There is an unofficial adapter. The creator also wrote an article, where he highlights his concerns about future enzyme support, suggesting to rather migrate tests to RTL (React Testing Library).
Currently we adapted our unit tests to work even without the adapter. However we should move all UI unit tests to RTL, since Enzyme team is not working on the React 17 support.

This will mean changing tests in both API Catalog UI and Metrics Service.

Useful links:

Migrate from Enzyme to RTL

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the UI unit tests in the API Catalog UI and Metrics Service, then read the linked React Testing Library migration guidance. Done means all UI unit tests have been migrated from Enzyme to RTL and the test suites pass in both areas.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.