Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing unit test coverage for the email regex blocklist feature in both the admin server (controller) and admin panel UI, aligning coverage with existing sibling blocklist/rate-limiting features.
Changes:
- Added NestJS unit tests for
EmailBlocklistControllercovering list/add/remove/removeAll and validation edge cases. - Added React Testing Library tests for
PageEmailBlocklistcovering loading/error states, add/delete flows, delete-all confirmation, and CSV/TXT upload behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/fxa-admin-server/src/rest/email-blocklist/email-blocklist.controller.spec.ts | Adds controller-level unit tests mirroring the existing domain blocklist controller test structure and validating email regex inputs. |
| packages/fxa-admin-panel/src/components/PageEmailBlocklist/index.test.tsx | Adds UI unit tests for the email regex blocklist page, mirroring PageDomainBlocklist patterns and covering add/remove/delete-all/file-upload flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
toufali
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
email-blocklist.controller.tsandPageEmailBlocklist/index.tsxhad no unit tests. Sibling features (domain-blocklist,rate-limiting) do.This pull request
email-blocklist.controller.spec.tsforlist,add(valid input plus non-array, non-string, blank, > 768 chars, invalid regex syntax),remove(success, not-found, blank, non-string), andremoveAll.PageEmailBlocklist/index.test.tsxfor render, loading, sort order, load error, button disable, submit + reload, whitespace guard, add-error alert, single delete (success + error), delete-all confirm/cancel, and CSV/TXT upload.PageDomainBlocklistanddomain-blocklist.controller.spec.ts.Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-13595
Checklist
Put an
xin the boxes that apply