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

Archive Issue #2473

Merged
merged 16 commits into from
Oct 1, 2024
Merged

Archive Issue #2473

merged 16 commits into from
Oct 1, 2024

Conversation

engelhartrueben
Copy link
Collaborator

Fixes # (issue)

Broken archives. The UI failed to show that a campaign was archived, even though it is on the backend/props.

Description

The fix for the buggy archives was in src/component/AdminCampaignList.js:54-85 in the renderArchiveIcon. Effectively, when the archive/unarchive button is pressed, we update the state to filter out the campaign that was just archived/unarchived.

Additionally, this PR:

  • converts AdminCampaignList and CampaignTable to function component
  • adds @testing-library/dom: ^10.4.0, @testing-library/react: ^12.1.5, and @testing-library/user-event: ^12.1.5 to replace enzyme for both this work and future work. This was necessary, as the conversion to function components broke Enzyme in a way that could not be fixed. Enzyme needs to be removed in order to upgrade React. Plus it's super unmaintained.

Note

Only two of the tests were converted to React Testing Library. Depending, I may get around to removing enzyme entirely before the patch goes out.

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change, and any blockers that make your change a WIP

Checklist:

  • I have manually tested my changes on desktop and mobile
  • The test suite passes locally with my changes
  • If my change is a UI change, I have attached a screenshot to the description section of this pull request
  • My change is 300 lines of code or less, or has a documented reason in the description why it’s longer
  • I have made any necessary changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • My PR is labeled [WIP] if it is in progress

@engelhartrueben
Copy link
Collaborator Author

@mau11 linted + removed the unused import. Ready for review

@engelhartrueben engelhartrueben merged commit b67906b into stage-main-14.1.1 Oct 1, 2024
17 checks passed
@engelhartrueben engelhartrueben deleted the re/archives branch October 1, 2024 18:37
@mau11 mau11 mentioned this pull request Oct 1, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants