Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Epic]: Migrate from enzyme to testing-library #21663

Closed
9 of 12 tasks
ecraig12345 opened this issue Feb 9, 2022 · 4 comments
Closed
9 of 12 tasks

[Epic]: Migrate from enzyme to testing-library #21663

ecraig12345 opened this issue Feb 9, 2022 · 4 comments
Assignees
Labels
Area: Testing Fluent UI react (v8) Issues about @fluentui/react (v8) Fluent UI react-northstar (v0) Work related to Fluent UI V0 Resolution: Soft Close Soft closing inactive issues over a certain period Type: Epic

Comments

@ecraig12345
Copy link
Member

ecraig12345 commented Feb 9, 2022

Part of CDA - internal deadline for this is May 30th 2023.

if your package currently uses Enzyme based test, we recommend that your/team perform the following actions.

  • Use React Testing Library (RTL) for authoring ‘new’ test cases starting today.
  • Convert all existing Enzyme based test to RTL by 31th May 2023.

We don't have resources to make it till that time, but we should be able to target end of Q1/2 2024.

Background

We'd like to migrate from enzyme to testing-library since enzyme is effectively unmaintained (over a year and no official React 17 adapter) and testing-library provides a better, more reliable testing experience that more closely resembles user interaction.

This has become a higher priority because we'd like to upgrade our repo to React 17 (#20145) but it's being blocked by the lack of an Enzyme adapter. EDIT: Between testing-library and cypress migrations, and possibly fixes to the unofficial adapter, the unofficial adapter now works with our remaining tests. So this is no longer a blocker for in-repo React 17 adoption. It will block React 18 adoption in-repo, but we probably won't be there for a few months at least.

testing-library has an excellent guide to migrating from enzyme -- it's a bit different way of thinking rather than a 1-1 mapping that could be automated, but overall a much better approach.

Steps

Related issues

@ecraig12345 ecraig12345 self-assigned this Feb 9, 2022
@ecraig12345 ecraig12345 added this to Backlog in V-Build - @microsoft/fluentui-react-build via automation Feb 9, 2022
@ecraig12345 ecraig12345 moved this from Backlog to In progress in V-Build - @microsoft/fluentui-react-build Feb 9, 2022
@ecraig12345 ecraig12345 removed their assignment Mar 31, 2022
@Hotell Hotell moved this from In progress to Planned in V-Build - @microsoft/fluentui-react-build Jun 7, 2022
@Hotell Hotell moved this from Planned to Triage in V-Build - @microsoft/fluentui-react-build Jun 7, 2022
@Hotell Hotell moved this from Triage to Backlog in V-Build - @microsoft/fluentui-react-build Jun 7, 2022
@msft-fluent-ui-bot
Copy link
Collaborator

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Sep 18, 2022
@TristanWatanabe TristanWatanabe removed the Resolution: Soft Close Soft closing inactive issues over a certain period label Sep 19, 2022
@sr-shifu
Copy link

Doing deprecation of Enzyme in my project, I figured out there is a way to make this process more manageable and automated: https://thesametech.com/migrate-away-from-enzyme/
Please check out my article, and let me know what you think!

@Hotell Hotell changed the title Project: Migrate from enzyme to testing-library [Epic]: Migrate from enzyme to testing-library May 4, 2023
@Hotell Hotell added Fluent UI react-northstar (v0) Work related to Fluent UI V0 Fluent UI react (v8) Issues about @fluentui/react (v8) labels May 4, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Oct 31, 2023

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Testing Fluent UI react (v8) Issues about @fluentui/react (v8) Fluent UI react-northstar (v0) Work related to Fluent UI V0 Resolution: Soft Close Soft closing inactive issues over a certain period Type: Epic
Projects
No open projects
Development

No branches or pull requests

5 participants